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

please help: why <xsl:foreach select="node()"> not works her

Subject: please help: why <xsl:foreach select="node()"> not works here?
From: Jia Ming Li <jmingli@xxxxxxxx>
Date: Wed, 24 May 2000 20:20:25 -0700
xsl row for each select
My XML has a structure:
	Can somebody please help me figure out what was wrong with my XSL
page.

test.xml
----------------------------------------------------------------------------
------------
<?xml version="1.0" encoding="ISO-8859-1"?>
<RESULT>
	<DATA>
		<ROW>
			<A>a1</A>
			<B>b1</B>
		</ROW>
		<ROW>
			<A>a2</A>
			<B>b2</B>
		</ROW>
	</DATA>	
	<DATA>
		<ROW>
			<D>d1</D>
			<E>e1</E>		
			<F>f1</F>
		</ROW>
		<ROW>
			<D>d2</D>
			<E>e2</E>		
			<F>f2</F>
		</ROW>
	</DATA>	
</RESULT>
----------------------------------------------------------------------------
-------

test.xsl
----------------------------------------------------------------------------
-----
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:template match="/">
<HTML>
<BODY>
<xsl:for-each select="RESULT/DATA">
	<TABLE BORDER="2">
	<xsl:for-each select="ROW">
		<TR>
		<xsl:for-each select="node()">
			<TD><xsl:value-of select="."/></TD>
		</xsl:for-each>
		</TR>
	</xsl:for-each>
	</TABLE>
	<BR/>
</xsl:for-each>
</BODY>
</HTML>
</xsl:template>
</xsl:stylesheet>
----------------------------------------------------------------------------
------------------
I want the ouput to be like this.

<TABLE>
<TR><TD>a1</TD><TD>b1</TD></TR>
<TR><TD>a2</TD><TD>b2</TD></TR>
</TABLE>

<TABLE>
<TR><TD>d1</TD><TD>e1</TD>><TD>f1</TD></TR>
<TR><TD>d2</TD><TD>e2</TD>><TD>f2</TD></TR>
</TABLE>

----------------------------------------------------------------------------
-



 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.