xsl-list
[Top] [All Lists]

RE: Re: Problem with conditional definition of a variable

2006-01-04 11:14:57
parameters always have a default value. If you give no select attribute
and no content the value is "" which is the same value that an variable
defined with xsl:variable with no select attribute and no content gets.
(in xslt2 there are other possibilities depending on the as attribute,
but the basic feature is the same variables always have a value)

So you can not distinguish the case that the parameter value was not
passed in, and the case that the default value was explictly passed.
If you need to distinguish these cases, you need to make the default
something that is unlikely (or impossible) to be passed in.

In this case, a default value of "" (which can be interpreted as an empty 
string), is the same as no parameter being passed in, as they will test as 
being equal.
-- 
Charles Knell
cknell(_at_)onebox(_dot_)com - email



--~------------------------------------------------------------------
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>
--~--