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

number formatting....

Subject: number formatting....
From: "Khaja, Saif" <Saif.Khaja@xxxxxxxxxxxxxxx>
Date: Thu, 15 Jun 2000 09:32:15 -0700
n2key
Hi there,
I have two sibling subtree's. And I have to produce a master-detail form of
representation. 
Its like an Inner FOR Loop in an outer FOR Loop. 

eg:
<xsl:for-each select="//number1">
	<xsl:number value="position()" format="1."/>
	<xsl:value-of select="@N1Key"/>
	<xsl:value-of select="@Name"/>

	<xsl:variable name="varKey" select="@N1Key"/>
		
	<xsl:for-each select="ancestor::*/number2">
		<xsl:if test="$varKey = @N2Key" >
			<xsl:number format="a."/>
			<xsl:value-of select="@BKey"/>
			<xsl:value-of select="@Qty"/>
		</xsl:if>
	</xsl:for-each>
</xsl:for-each>

/* ******************************* */

Now in the inner FOR Loop, the number format produces the actual position
sequence, which I dont want in this case. I want the numbering to be related
to the inner FOR Loop number. i.e. should start with "a." every time it
enters the FOR Loop the first time....

Output:
	1.	Key1	Name1
	a.	RKey1	Qty1
	b.	RKey2	Qty2
	c.	RKey3	Qty3
	2.	Key2	Name2
	a.	RKey6	Qty6
	b.	RKey9	Qty9
.....

Is there any way, I can achieve this sequence....

Thanx in advance,
Saif Khaja



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.