|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] QUESTION about xsl:number
Hello, New to this list. I am currently working on a style sheet to display a XML document with numbering list. For a simple numbering, xsl:number works perfectly. But in our case, we want to skip some of the sibling nodes depends on the type attribute of the node. A sample document: <document> <section type="title" shownumber="no"> XML sample </section> <section type="index" shownumber="yes"> Definition <definition> XML </definition> <definition> XSL </definition> </sectioin> <section type="index" shownumber="yes"> Implementation </sectioin> </document> I would like to number the sections based on attribute "shownumber. The sample document will be displayed as: XML 1. Definition 2. Implementation based on the XSL: <xsl:choose> <xsl:when test="@shownumber[.='no']"> </xsl:when> <xsl:otherwise> <xsl:number format="1. " count="section[@shownumber='yes']" /> </xsl:otherwise> </xsl:choose> My question is how to number its child nodes as: XML 1. Definition 1.1 XML 1.2 XSL 2. Implementation I have tried <xsl:number level="multiple" format="1. " />, but the document looks like: XML 1. Definition 1. XML 2. XSL 2. Implementation It will be nice if someone can help me out. Thank you in advance. Regards, Kelvin 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








