OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   <xsl:number> question

[ Lists Home | Date Index | Thread Index ]


 Would anyone care to point in me in the right direction in solving a
numbering problem?

  Here is the xml
	<Product>
		<page>
			<PageId>Business</PageId>
		</page>
 		<page>
			<PageId>Business</PageId>
		</page>
		<page>
			<PageId>Sports</PageId>
		</page>
		<page>
			<PageId>Sports</PageId>
		</page>
		<page>
			<PageId>Business</PageId>
		</page>
		<page>
			<PageId>Business</PageId>
		</page>
	</Product>

 I am trying to get text output like this
  
			Business-01	
			Business-02
			Sports-01
			Sports-02
			Business-04
			Business-05

  Using the "<xsl:text>-</xsl:text><xsl:number   format="01" />" after each
"<PageId>" tag numbers gets the correct format,
  however, "Sports" is numbered 03 and 04, with the last two "Business"
numbered with 05 and 06.
  I am working on a way to breaking the number count when a new text value
is encountered in the "PageId" tag.
  and resuming the number if the text is again resumed.

  Can the attributes associated with <xsl:number> do the trick, or will I
need to start looking at using other xsl tag logic ?

  thanks for any help that can be provided
			





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS