[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: find position of first occurrence in a node set
> Anyway, you can use the xsl:number instruction to get what you want: > > <?xml version="1.0" encoding="UTF-8"?> > > <xsl:stylesheet version="2.0" > xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> > > <xsl:template match="/"> > <xsl:number select="transaction_set/segment[@type='HL']"/> > </xsl:template> > > </xsl:stylesheet> > Note that the select attribute of xsl:number is new in XSLT 2.0. In 1.0 you need <xsl:for-each select="transaction_set/segment[@type='HL']"> <xsl:number/> </xsl:for-each> Michael Kay http://www.saxonica.com/
|
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
|