← Prev in month ← Prev in thread

<xsl:number> question

From
Culler, Jeff S. <>
To
"''" <>
Date
2006-05-23T23:07:20Z
ID
<>
Thread
<xsl:number> question
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
← Prev in month ← Prev in thread