This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: xsl-value-of does not process xsl values?


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]