Counting Qualified Elements

   



Index Values of Elements in a List

If you want to display only the contents of the desc element of the first and the third chapters, you can use something like this:

<xsl:value-of select="//chapter[1]/desc"/> <xsl:value-of select="//chapter[3]/desc"/>

Unlike other programming languages such as Java, C, and C++, indexes start from 1 instead of 0. If you apply an XSL stylesheet that processes individual elements in a list of elements and you notice that you are 'off by one' (or nothing is displayed), verify that your index value is correct.



   



Fundamentals of SVG Programming. Concepts to Source Code
Fundamentals of SVG Programming: Concepts to Source Code (Graphics Series)
ISBN: 1584502983
EAN: 2147483647
Year: 2003
Pages: 362

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net