[XSL-LIST Mailing List Archive Home]
Re: [xsl] multiple XML tags -> single output
Subject: Re: [xsl] multiple XML tags -> single output|
From: Mike Brown <mike@xxxxxxxx>
Date: Wed, 27 Dec 2000 21:05:29 -0700 (MST)
> 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.
Here you are selecting the 'num' attribute of *all* issue elements in the
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 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
- Re: [xsl] multiple XML tags -> single output, (continued)
- Mike Brown - Wed, 27 Dec 2000 17:06:23 -0700 (MST)
- zbrown - Wed, 27 Dec 2000 16:19:09 -0800
- Kevin McCarthy - Wed, 27 Dec 2000 16:41:30 -0800
- zbrown - Wed, 27 Dec 2000 17:37:25 -0800
- Mike Brown - Wed, 27 Dec 2000 21:05:29 -0700 (MST) <=
- zbrown - Wed, 27 Dec 2000 21:30:01 -0800
- Jiri Jirat - Thu, 28 Dec 2000 08:45:56 +0100
- Mike Brown - Thu, 28 Dec 2000 01:05:08 -0700 (MST)
- David Carlisle - Fri, 29 Dec 2000 17:20:27 GMT