[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re[2]: numerating nodes in doc-flow

Subject: Re[2]: numerating nodes in doc-flow
From: Alexey Nickolaenkov <nikolaenkov@xxxxxxxxxxxx>
Date: Thu, 25 Jan 2007 17:30:56 +0300
Re[2]:  numerating nodes in doc-flow
Thank you very much. It works great!

Thursday, January 25, 2007, 4:53:49 PM, you wrote:

AW> On 1/25/07, Alexey Nickolaenkov <nikolaenkov@xxxxxxxxxxxx> wrote:
>> Hello guys!
>>
>> I have to enumerate nodes in the document-flow order using xslt 1.0. I
>> thought that's not difficult but the following template does nothing.
>> Can you help me?
>>
>>    <xsl:template match="node()">
>>       <xsl:param name="counter" select="0"/>
>>       <xsl:copy>
>>          <xsl:apply-templates select="@*"/>
>>          <xsl:attribute name="new_id" select="concat('item_', $counter)"/>
>>          <xsl:apply-templates select="occurrence/art">
>>             <xsl:with-param name="counter" select="$counter+1"/>
>>          </xsl:apply-templates>
>>       </xsl:copy>
>>    </xsl:template>

AW> Without sample input or output XML it's difficult to give a good
AW> answer, but its likely <xsl:number count="*" level="any"/> will give
AW> you the numbering you're after.

AW> cheers
AW> andrew




-- 
Alexey                            mailto:nikolaenkov@xxxxxxxxxxxx

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.