This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: apply templates with with-param on Xalan
- To: "'xsl-list at mulberrytech dot com'" <xsl-list at mulberrytech dot com>
- Subject: RE: apply templates with with-param on Xalan
- From: Kay Michael <Michael dot Kay at icl dot com>
- Date: Tue, 25 Jul 2000 13:30:12 +0100
- Reply-To: xsl-list at mulberrytech dot com
> So now Im unsure how to proceede. I still dont understand
> why the parameter is not set up, even though (it seems) the
> list root element has been correctly matched. But when I add
> the /list to the document() call, the parameter is correctly set up.
The document() function returns a root node (don't confuse this with the
outermost element node, which is sometimes referred to as the root element
or document element). So the call on xsl:apply-templates will result in the
template for the root node being called, with parameters. You've provided no
explicit template for the root node, so the built-in template gets called.
The built-in template does a call on <xsl:apply-templates/> for its
children, i.e. for the <list> element, but without supplying any parameters.
So your match="list" template rule gets called without parameters.
To get the parameters through, you either have to bypass processing the root
node, or you have to process it using a template that passes the parameters
on.
Mike Kay
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list