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

xsl:for-each

Subject: xsl:for-each
From: ram ragu <xmlram@xxxxxxxxx>
Date: Thu, 5 Jul 2001 05:06:14 -0700 (PDT)
xsl for each leave

XML:  Data ==> 

<Info>

<Response>

<PDetail>

    <CDetail>
	  <ROIN>1111</ROIN>
          <CNo>111111</CNo>
          <Type>B</Type>
          <CTType>W</CTType>
	
         <CoDetail>
	       <CoNo>1</CoNo>				 </CoDetail>
     </CDetail>


</PDetail>

</Response>

</Info>


Here is my  XSL - COde: 

<xsl:template  match="Info">
 
<xsl:for-each select="Response">

<xsl:apply-templates select="PDetail"/>		
			
</xsl:for-each>

</xsl:template> 


<xsl:template match="PDetail"> 
	<xsl:for-each select="CDetail"/>
		<xsl:apply-templates select="CDetail"/>
</xsl:template>


Hello!!

I have a question related to using xsl:for-each 
in my code above  I Stated with my first pair of 
<xsl:for-each> & </xsl:for-each>  but when I tried to
give the same  for "CDetail"  XML Spy gives a
malformed XML error ... so I couldn't give an closing
</xsl:for-each> 

if I leave my code as shown above it works.. I am
getting the desired output but when I give 

<xsl:template match="PDetail"> 
	<xsl:for-each select="CDetail">
		<xsl:apply-templates select="CDetail"/>
        </xsl:for-each>
</xsl:template>

I am not getting a mal formed xml for the XSL sheet
but I am not getting the desired result.. please
advise if you find anything wrong with my code

Basically I want to make sure if each occurance of
xsl:for-each need to be terminated with a matching
</xsl:for-each>


thanks

ram





__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/

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


Current Thread
  • xsl:for-each
    • ram ragu - Thu, 5 Jul 2001 08:11:25 -0400 (EDT) <=

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.