This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: xsl-value-of does not process xsl values?
- To: xsl-list at lists dot mulberrytech dot com
- Subject: Re: [xsl] xsl-value-of does not process xsl values?
- From: Mike Brown <mike at skew dot org>
- Date: Fri, 31 Aug 2001 10:27:36 -0600 (MDT)
- Reply-To: xsl-list at lists dot mulberrytech dot com
David Carlisle wrote:
> That's your mistake. value-of does not give the content of the elements
> it gives the string value (ie just the character data).
Not only that, but when you select multiple nodes, xsl:value-of only uses
the string value of the first node in the set.
I'm not sure why xsl:value-of needed to exist; it seems like xsl:text
could have served the same purpose, had it been allowed to contain an
XPath expression, and would have led to slightly less confusion
(xsl:text and xsl:value-of both mean "create one text node").
Of course, as long as people think of XML & XSLT documents as strings
rather than trees, and XSLT instructions as text substitution macros
rather than tree access & construction tools, this will continue to be a
FAQ.
- Mike
____________________________________________________________________________
mike j. brown, fourthought.com | xml/xslt: http://skew.org/xml/
denver/boulder, colorado, usa | personal: http://hyperreal.org/~mike/
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list