|
[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
[Recent Entries]
[Reply To This Message]
Re: document(), apply-templates and parameters
Subject: Re: document(), apply-templates and parameters
From: "Tangi Vass" <tangivass@xxxxxxxxxxxxxx>
Date: Thu, 21 Oct 1999 10:45:30 +0200
|

|
Scott Boag from Lotus sent me a mail of explanations
:
"document('foo.xml')" selects the '/' node on foo.xml, which
has not template,
so it falls to the default template. Since parameters do not get automatically
passed from template to template, you loose the parameter in
the default
template for '/'. If you do
select="document('foo.xml')/*", you will get the
expected results.
Before his help, I found a workaround :
<xsl:for-each
select="document('foo.xml')">
<xsl:apply-templates>
<xsl:with-param
name="arg1>ok</xsl:with-param>
</xsl:apply-templates>
</xsl:for-each>
but without understanding why it works (it doesn't use the
default template for '/' ;-)
So thanks a lot for your explanations, Scott.
Tangi
----- Original Message -----
Sent: Wednesday, 20 October, 1999
16:01
Subject: document(), apply-templates and
parameters
I tried to do this:
<xsl:apply-templates
select="document('foo.xml')">
<xsl:with-param
name="arg1">ok</xsl:with-param>
</xsl:apply-templates>
But it fails: arg1's value is ignored.
Could someone tell me why ("normal" feature to prevent
potential side-effects, bug in LotusXSL 0.18.2, ...) ?
Thanks in advance,
Tangi
|

|
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format
| RSS 2.0 |
|
| Atom 0.3 |
|
|