Re: [xsl] multiple child elements

Subject: Re: [xsl] multiple child elements
From: Jeni Tennison <mail@xxxxxxxxxxxxxxxx>
Date: Sun, 9 Sep 2001 13:06:26 +0100
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


Current Thread