|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Add attribute to copied element
Tempore 17:50:00, die 02/02/2005 AD, hinc in
xsl-list@xxxxxxxxxxxxxxxxxxxxxx scripsit Robert Soesemann
<rsoesemann@xxxxxxxxxxx>:
How can I copy elements from a key and add an attribute to every copied element containing its position in the sequence. Hi, Use something like: <xsl:for-each select="key('textItems',generate-id())[name() ='my-include']"> <xsl:copy> <xsl:copy-of select="@*"/> <xsl:attribute name="position"> <xsl:value-of select="position()"/> </xsl:attribute> <xsl:copy-of select="node()"/> </xsl:copy> </xsl:for-each>
|
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








