[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
apply templates with parameter
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 -----
From: Tangi Vass
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
Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.