|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] xsl:for-each
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
|
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








