This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Line SVG charts via XSLT
- To: xsl-list at lists dot mulberrytech dot com
- Subject: Re: [xsl] Line SVG charts via XSLT
- From: Oliver Becker <obecker at informatik dot hu-berlin dot de>
- Date: Fri, 6 Jul 2001 16:28:06 +0200 (MET DST)
- Reply-To: xsl-list at lists dot mulberrytech dot com
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