xsl-list
[Top] [All Lists]

RE: Infinite Loop when param empty

2004-07-23 08:09:40

I would NEVER want a parameter to be the result of the 
prinicpal source
document if the user did not supply the parameter.  I would 
ALWAYS want the
parameter to default to an EMPTY node set if none was supplied.

then use select="/.." in 1.0, or select="()" in 2.0.

..and actually I think all node tests would fail even if a 
valid xml source
was supplied to the above parameter.  Example:

<xsl:apply-templates select="$ENTRY_TEMPLATE"/>  (would fail??).


No, the select expression is ignored if the parameter value is supplied.
(Well, at any rate, the *value* of the select expression is ignored).

XSLT 2.0 might give you a type error (because the default value is a string,
not a node-set), but 1.0 shouldn't.

Michael Kay



<Prev in Thread] Current Thread [Next in Thread>