xsl-list
[Top] [All Lists]

RE: multiple output targets (was use-when attribute?)

2004-12-21 18:17:11
You have specified tunnel="yes" in the xsl:with-param, but 
not in the
xsl:param, so they don't match up.

Thanks; removing that not only solved the error problem, but also got 
the correct templates applied!

The question is: why is this now working, but not before.  AFAIK, the 
only difference was the addition of the as="xs:string" 
attribute to the param element.

I'm not sure I followed the history closely enough to do a reliable
post-mortem. I think the "tunnel" bug was always there, but it only became
evident when you added as="xs:string" that no value was being supplied for
the parameter. This brought the following rule into play:

[ERR XT0610] If an optional parameter has no select attribute and has an
empty sequence constructor, and if there is an as attribute, then the
default value of the parameter is an empty sequence. If the empty sequence
is not a valid instance of the required type defined in the as attribute,
then the parameter is treated as a required parameter, which means that it
is a non-recoverable dynamic error if the caller supplies no value for the
parameter.

which revealed that no value had been supplied for the parameter: and in
trying to understand why, I spotted the discrepancy in the "tunnel" values.

Michael Kay
http://www.saxonica.com/


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