|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: displaying position of nodes
> Notice that position() gives you the position of an element relative to > the top of the subtree it is in when matched by a template, and not > necessarily the element count as you might have been expecting. This is not true. The value of position() is determined by the relative position of the current node in the node-list when the template is instantiated -- that is by the expression in the "select" attribute of the xsl:apply templates that caused the instantiation. For example, if the instantiation was caused by: <xsl:apply-templates select="node()[3]"/> then in the instantiated template <xsl:value-of select="position()"/> will produce '1' ===== Cheers, Dimitre Novatchev. http://fxsl.sourceforge.net/ -- the home of FXSL XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








