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

RE: Displaying multiple instances of the same tag

Subject: RE: Displaying multiple instances of the same tag
From: "Josh Canfield" <Josh.Canfield@xxxxxxxxxxxx>
Date: Sat, 12 Jun 2004 12:41:38 -0700
josh canfield
You can use xsl:for-each, or create a template that matches quote and use apply-templates.

something like:

<xsl:template match="reference">
	<xsl:for-each select="quote">
		<xsl:value-of select=".">
	</xsl:for-each>
</xsl:template>

Josh


-----Original Message-----
From: Daniel Palmer [mailto:Daniel.Palmer@xxxxxxxxxxxxxxxxxxxxxxx]
Sent: Saturday, June 12, 2004 9:45 AM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject:  Displaying multiple instances of the same tag


The xml I've been playing with looks like this:

	<reference>
		<title>Empire</title>
		<artist>Book</artist>
		<country>USA</country>
		<company>Columbia</company>
		<price>10.90</price>
		<year>1985</year>
		<quote>I am cool</quote>
		<quote>You are cool</quote>
		<quote>We are cool</quote>
	</reference>

In xsl,  <xsl:value-of select="quote"/> of course displays only the 
first quote.  Can someone tell me how to specify in xsl which and how 
many of the quotes to display in xml?  I searched the archives and the
other recommended FAQ page unsuccessfully.

Best,
Dan Palmer


--+------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe@xxxxxxxxxxxxxxxxxxxxxx>
--+--


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.