This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: Numbering Grouped Child Elements


Why not restructure your XML so that you identify what a Step is?  Then you
could use xsl:number.  And it would simplify the XSL you designed to get
around the problem the first time and make it easier to deal with other
forms of the same XML that want you to document more than one Data_Entry in
a group.

<Steps>
   <Step>
	<Data_Entry>
		<Field_Name>User</Field_Name>
		<General_Data>your user name</General_Data>
	</Data_Entry>
	<Data_Entry>
		<Field_Name>password</Field_Name>
		<General_Data>your password</General_Data>
	</Data_Entry>
   </Step>
   <Step>
	<Button_Click>
		<Button_Image>OK</Button_Image>
	</Button_Click>
   </Step>
   <Step>
	<Data_Entry>
		<Field_Name>Item Number</Field_Name>
		<Specific_Data>00023</Specific_Data>
	</Data_Entry>
   </Step>
</Steps>

PC2

-----Original Message-----
From: Jake Stevenson [mailto:Jake.Stevenson@dacg.com]
Sent: February 20, 2001 08:44
To: 'XSL-List@lists.mulberrytech.com'
Subject: [xsl] Numbering Grouped Child Elements


I sent this to the list some time ago and received no answer.  I'm still
banging my head on this one and hope someone new may be able to help.  

I need to be able to output numbers based on groups of child elements.  I
have an XML file similar to the following:

<Steps>
	<Data_Entry>
		<Field_Name>User</Field_Name>
		<General_Data>your user name</General_Data>
	</Data_Entry>
	<Data_Entry>
		<Field_Name>password</Field_Name>
		<General_Data>your password</General_Data>
	</Data_Entry>
	<Button_Click>
		<Button_Image>OK</Button_Image>
	</Button_Click>
	<Data_Entry>
		<Field_Name>Item Number</Field_Name>
		<Specific_Data>00023</Specific_Data>
	</Data_Entry>
</Steps>

</etc>

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]