[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Creating Hierarchy
At 2008-10-17 13:47 +0100, Rowan Sylvester-Bradley wrote:
You'll find a description of an XSLT 2.0 stylesheet that does this (and some other things besides) at An ID attribute value must be a name token, so your "1","2",... won't be correct. But you could use something like "N1","N2",... So if my source file is: Assuming the current node is <node>, then <xsl:number/> can be used without attributes to count the current node amongst its siblings in the source tree: <xsl:attribute name="id">N<xsl:number/></xsl:attribute> The "video sample lesson" link in my trailer below is the YouTube copy of my lesson on <xsl:number/> if you need to make changes. I hope this helps. . . . . . . . . . . . . Ken -- Upcoming XSLT/XSL-FO hands-on courses: Wellington, NZ 2009-01 Training tools: Comprehensive interactive XSLT/XPath 1.0/2.0 video Video sample lesson: http://www.youtube.com/watch?v=PrNjJCh7Ppg Video course overview: http://www.youtube.com/watch?v=VTiodiij6gE G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ Male Cancer Awareness Nov'07 http://www.CraneSoftwrights.com/s/bc Legal business disclaimers: http://www.CraneSoftwrights.com/legal
|
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
|