This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: multiple child elements
Hi Sean,
> the XML file has the following structure which has more than one
> <synth> in the root element hence my orginal <xsl:for-each
> select="kitlist/synth">
Perhaps, then, you need to put the xsl:for-each that selects the URLs
within an xsl:for-each that selects the synth elements:
<xsl:for-each select="kitlist/synth">
... various stuff about the synth ...
<xsl:for-each select="links/url">
<a href="{.}"><xsl:value-of select="@name" /></a>
</xsl:for-each>
... various other stuff about the synth ...
</xsl:for-each>
Or of course you could use templates:
<xsl:template match="synth">
... various stuff about the synth ...
<xsl:apply-templates select="links" />
... various other stuff about the synth ...
</xsl:template>
<xsl:template match="url">
<a href="{.}"><xsl:value-of select="@name" /></a>
</xsl:template>
If that doesn't hit the spot, I suggest that you send a sample of the
XSLT that you have and the result that you're trying to achieve.
Cheers,
Jeni
---
Jeni Tennison
http://www.jenitennison.com/
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list