This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Line SVG charts via XSLT


Hi Thorsten,

> My idea is something like ...
> natrium[position + 1] ... for the following value. Can anybody help me??
> Thanks a lot...
> Thorsten Richter
> 
> <?xml version="1.0"?>
> <laborviewer>
> 	<labor>
> 		<natrium>144</natrium>
> 		<kalium>4.3</kalium>
> 		<hb>9.1</hb>
> 	</labor>
> 	<labor>
> 		<natrium>150</natrium>
> 		<kalium>4.9</kalium>
> 		<hb>8.8</hb>
> 	</labor>
> 	<labor>
> 		<natrium>140</natrium>
> 		<kalium>5.0</kalium>
> 		<hb>8.0</hb>
> 	</labor>
> </laborviewer>
> 
[...]

> <xsl:with-param name="y-natrium-after"><xsl:value-of
> select="natrium[(position() + 1)]"/></xsl:with-param>

It seems to me you want
<xsl:with-param name="y-natrium-after" 
                select="following-sibling::labor/natrium" />

Btw: using the select attribute of xsl:with-param and xsl:variable
makes the code shorter and more readable.
(There's a small semantic difference, but in your case it should give
the same result.)

Cheers,
Oliver


/-------------------------------------------------------------------\
|  ob|do        Dipl.Inf. Oliver Becker                             |
|  --+--        E-Mail: obecker@informatik.hu-berlin.de             |
|  op|qo        WWW:    http://www.informatik.hu-berlin.de/~obecker |
\-------------------------------------------------------------------/


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]