|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Conditional Assigining
Michael,
Again apologies for this intrusion. I am in desperate need for an answer to this solution can you please please help me out from this?? Here is my xml section.xml ---------------- <Section> <sectionID>1</sectionID> <parentID>0</parentID> <bulletinID>1</bulletinID> <groupID>1</groupID> <dictionaryID>1000</dictionaryID> <text>Section 1</text> </Section> <Section> <sectionID>2</sectionID> <parentID>0</parentID> <bulletinID>1</bulletinID> <groupID>1</groupID> <dictionaryID>1001</dictionaryID> <text>Section 2</text> </Section> <Section> <sectionID>5</sectionID> <parentID>1</parentID> <bulletinID>1</bulletinID> <groupID>1</groupID> <dictionaryID>1004</dictionaryID> <text>Section 1.1</text> </Section> <Section> <sectionID>11</sectionID> <parentID>1</parentID> <bulletinID>1</bulletinID> <groupID>1</groupID> <dictionaryID>1008</dictionaryID> <text>Section 1.2</text> </Section> <Section> <sectionID>10</sectionID> <parentID>5</parentID> <bulletinID>1</bulletinID> <groupID>1</groupID> <dictionaryID>1012</dictionaryID> <text>Section 1.1.1</text> </Section>
<sectionID>6</sectionID> <parentID>2</parentID> <bulletinID>1</bulletinID> <groupID>1</groupID> <dictionaryID>1005</dictionaryID> <text>Section 2.1</text> </Section> <Section> <sectionID>12</sectionID> <parentID>2</parentID> <bulletinID>1</bulletinID> <groupID>1</groupID> <dictionaryID>1009</dictionaryID> <text>Section 2.2</text> </Section>
<xsl:template match="First"> <!--<xsl:for-each select="Section[parentID='0']"> --> <xsl:for-each select="Section"> <xsl:variable name="ID" select="sectionID"/> <xsl:value-of select="text"/> <xsl:for-each select="../Section[parentID=$ID]"> <xsl:value-of select="text"/><br/> <xsl:variable name="ID" select="sectionID"/> <!-- currentID = <xsl:value-of select="$ID" />--> </xsl:for-each> <!-- <xsl:variable name="ID" select="sectionID"/> sectionid afterloop= <xsl:value-of select="$ID" />--> <!-- <xsl:variable name="ID" select="text"/> text afterloop = <xsl:value-of select="$ID" />--> </xsl:for-each> </xsl:template> </xsl:stylesheet>
id 5 pid 1 text Section 1.1 id 10 pid 5 text Section 1.1.1 id 19 pid 10 text Section 1.1.1.1
id 5 pid 1 text Section 1.1 id 10 pid 5 text Section 1.1.1 id 19 pid 10 text Section 1.1.1.1 id 11 pid 1 text Section 1.2 I am able to loop through the first part of the xml but when it comes to the second part of the subsection i am not getting that output at all. Can anyone please please help me out. Thanks in advance, Srini _________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. 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








