[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: accumulator needed

Subject: Re: accumulator needed
From: Karim Barkati <barkati@xxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 09 Jul 2001 21:28:10 +0200
xsl accumulator
You're right, the sum of previous durations should sufficiant for me.
The other tip seem more difficult to me.
Thank you.

Karim Barkari


Jarno.Elovirta@xxxxxxxxx a écrit :

> Hip hei!
>
> >   <!-- Draw a quarter note. -->
> >   <xsl:template match="note">
>
> You need to declare the parameters used here, i.e.
>
>   <xsl:param name="x_offset" select="0">
>   <xsl:param name="y_offset" select="0">
>
> >     <xsl:if test="type='quarter'">
> >       <xsl:element name="g">
> >  <xsl:attribute name="transform">
> >    <xsl:text>translate(</xsl:text>
> >    <xsl:value-of select="$x_offset"></xsl:value-of>
> >    <xsl:text>,</xsl:text>
> >    <xsl:value-of select="$y_offset"></xsl:value-of>
> >    <xsl:text>)</xsl:text>
> >  </xsl:attribute>
> >
> >  <xsl:element name="use">
> >    <xsl:attribute name="xlink:href"
> > namespace="http://www.w3.org/1999/xlink">
> >      <xsl:text>MusicGlyphs.svg#BLACKHEAD</xsl:text>
> >    </xsl:attribute>
> >  </xsl:element>
> >       </xsl:element>
> >     </xsl:if>
> >   </xsl:template>
>
> You could make the accumulator thingy to work by either counting the
> durations of previous notes with something like
>
>   sum(preceding-sibling::note/duration)
>
> which wouldn't actually accumulate anything, but would get the job done; or,
> you could process the notes by first selecting only the first one and then
> in the template for "note" continue by select the following-sibling::note
> with the offset parameter.
>
> Hope this helps,
>
> Jarno
>
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.