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

Re: multiple XML tags -> single output

Subject: Re: multiple XML tags -> single output
From: Mike Brown <mike@xxxxxxxx>
Date: Wed, 27 Dec 2000 21:05:29 -0700 (MST)
Re:  multiple XML tags -> single output
zbrown@xxxxxxxxxxxxx wrote:
> OK, the docs I've got say that '//issue' will match all <issue> elements
> anywhere in the document. As opposed to 'issue' which only matches children
> in the current context.

True, but...

<xsl:value-of select="//issue/@num"/> 

Here you are selecting the 'num' attribute of *all* issue elements in the
document.

xsl:value-of takes the string-value of its select attribute and makes a
text node out of it in the result tree. Check the XPath spec and see that
the string-value of a node-set is the string-value of only the *first*
node in the set.

So no matter what the current node is, this will only ever give you the
value of the first num attribute of the first issue element that has one.
Is this really what you want?

Also, the concat() function is standard XPath/XSLT and will work with your
processor. You just need to be sure the paths are correct. Doing 3
xsl:value-of instructions in a row is relatively wasteful.

   - Mike
____________________________________________________________________
Mike J. Brown, software engineer at            My XML/XSL resources: 
webb.net in Denver, Colorado, USA              http://skew.org/xml/


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


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.