xsl-list
[Top] [All Lists]

RE: Can I use a boolean variable in an xsl:if test

2005-02-08 13:11:35
My guess is that newbies imagine xsl:value-of to be
some kind of "evaluate" function. Of course what it
really is, is an instruction to write a string to a
result tree (to "the" result tree or to a
result-tree-fragment, as the case may be). Since this
is generally what we want to have happen to our
results, there seems to be nothing to get confused
about.

Until it breaks, that is, because we're not writing it
out, but doing something else with it instead. Like
testing whether it's true, while imagining we're
testing the expression that was evaluated for it.

I find that I stay out of hot water with xsl:value-of if I just remember 
that it returns a string. If I use xsl:value-of on a string, I get a 
string. If I use xsl:value-of on a node, I get a string representation of 
that node. Either way, though, I get a string.

Jay Bryant
Bryant Communication Services
(presently consulting at Synergistic Solution Technologies)

--~------------------------------------------------------------------
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(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--