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

Re: initial template parameters

Subject: Re: initial template parameters
From: Wolfgang Laun <wolfgang.laun@xxxxxxxxx>
Date: Thu, 18 Mar 2010 07:48:14 +0100
Re:  initial template parameters
On Thu, Mar 18, 2010 at 6:29 AM, Max Toro <maxtoroq@xxxxxxxxx> wrote:
> "Parameters passed to the transformation by the client application are
> matched against stylesheet parameters (see 9.5 Global Variables and
> Parameters), not against the template parameters declared within the
> initial template. All template parameters within the initial template
> to be executed will take their default values."
>
> Why? :-(

Because that would result in different ways of dealing with the values
passed in from the invocation, depending on whether you specify an
initial template or not: Not using an initial template would require them
to go to the stylesheet's parameter set; otherwise they'd have to be
passed straight to the template.

If you want the parameters passed to the template, you can always do

<xsl:param name="pp1" select="42"/>

<xsl:template name="init">
  <xsl:param name="tp1" select="$pp1"/>
  tp1=<xsl:value-of select="$tp1"/>
</xsl:template>

which will let you pass a value, via pp1, into template "init".

Why does this bother you?

-W

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-2011 All Rights Reserved.