This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
xsl:for-each
- To: <xsl-list at mulberrytech dot com>
- Subject: xsl:for-each
- From: "Michael Lepine" <mlepine at TRISECT dot com>
- Date: Mon, 20 Nov 2000 12:39:14 -0500
- Reply-To: xsl-list at mulberrytech dot com
I have an XML fragment similar to the following:
<root>
<elementX>
<elementY>
<name>name1</name>
<value>value1</value>
</elementY>
<elementY>
<name>name2</name>
<value>value2</value>
</elementY>
<elementY>
<name>name3</name>
<value>value3</value>
</elementY>
</element1.0>
</root>
and I'm trying to use xsl:for-each to iterate over the name/value tags like
so:
<xsl:for-each select="/root/elementX/elementY">
name: <xsl:value-of select="name"/>
value: <xsl:value-of select="value"/>
</xsl:for-each>
The XML is more complex than what I have above, but can someone tell me
whether this should work or not?
Thanks.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list