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

Re: Passing parameters to an indirectly called templat

Subject: Re: Passing parameters to an indirectly called template after matching.
From: Kannan <riderchap@xxxxxxxxx>
Date: Thu, 17 Apr 2008 07:38:36 -0400
Re:  Passing parameters to an indirectly called templat
Thank you Martin for the reply.

Can I pass parameters like this.

Calling_Point => A_Named_Template, do apply-templates => {One or more
matching Templates } => A_Named_Template.

I tried to do this by passing parameters along with apply-templates,
and then passing it again from all matched templates to a named
template where I finally need it, it ended up in infinite loop. When I
just taken out the parameter passing and used global variables it
worked fine.

Thanks,
Kannan

On Thu, Apr 17, 2008 at 7:06 AM, Martin Honnen <Martin.Honnen@xxxxxx> wrote:
> Kannan wrote:
>
>
> >    <xsl:template match="ATag">
> >        <xsl:call-template name="ReplaceInXMLString">
> >            <xsl:with-param name="theNodeMatch" select="./*"/>
> >            <xsl:with-param name="stringToBeReplaced"
> select="&quot;'&quot;"/>
> >            <xsl:with-param name="replacementString"
> select="&quot;''&quot;"/>
> >
>
>  If you want to pass parameters to a named template then that named template
> should have xsl:param declarations e.g.
>
>
>
> >    <xsl:template name="ReplaceInXMLString">
> >        <xsl:param name="theTagMatch"/>
> >
>
>           <xsl:param name="stringToBeReplaced"/>
>           <xsl:param name="replacementString"/>
>
>  You can also define default values e.g.
>           <xsl:param name="stringToBeReplaced" select="&quot;'&quot;"/>
>
>
>  --
>
>         Martin Honnen
>         http://JavaScript.FAQTs.com/

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.