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

Re: multiple child elements

Subject: Re: multiple child elements
From: Jeni Tennison <mail@xxxxxxxxxxxxxxxx>
Date: Sun, 9 Sep 2001 13:06:26 +0100
for each child element
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>
    ... various other stuff about the synth ...

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 match="url">
  <a href="{.}"><xsl:value-of select="@name" /></a>
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.



Jeni Tennison

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Current Thread


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.
First Name
Last Name
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.