[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: passing parameters with apply-template and documen

Subject: RE: passing parameters with apply-template and document()
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Fri, 8 Oct 2004 11:58:19 +0100
passing parameters through function
Sorry I missed that! I'm getting too accustomed to XSLT 2.0, where built-in
templates *do* pass the parameters through.

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

> -----Original Message-----
> From: Oleg Tkachenko [mailto:oleg@xxxxxxxxxxxxx] 
> Sent: 08 October 2004 11:16
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: Re:  passing parameters with apply-template and 
> document()
> 
> Robert McGrath wrote:
> 
> >       <xsl:apply-templates select="document('docB.xml')">
> >         <xsl:with-param name="paramB" select="$paramA"/>
> >       </xsl:call-template>
> 
> Beware that document() function returns root node (not to be confused 
> with outermost element node). So you are applying templates 
> to the root 
> node of the docB.xml and if you don't have a template that 
> matches "/" 
> or "node()", built-in template for a root node will be used. 
> And as all 
> built-in templates it doesn't pass parameters through.
> Use <xsl:apply-templates select="document('docB.xml')/*">
> -- 
> Oleg Tkachenko
> http://blog.tkachenko.com
> Multiconn Technologies, Israel

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.