xsl-list
[Top] [All Lists]

RE: [xsl] using xsl:call-template dynamicly

2010-04-21 06:44:44

You're using Saxon extensions here, so it's a Saxon question rather than a
general XSLT question - so please take it to the saxon-help list or forum at
SourceForge.

However, I suspect you shouldn't really be using these extensions. Code that
uses saxon:assign is nearly always questionable, and saxon:allow-avt (which
in any case is not supported by recent Saxon versions) can often be done
better in a different way sticking entirely within standard XSLT.

So perhaps you need to explain your problem, and we can then see how to
solve it in pure XSLT.

Regards,

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

-----Original Message-----
From: Red Light [mailto:skydelta98(_at_)yahoo(_dot_)com] 
Sent: 21 April 2010 12:18
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] using xsl:call-template dynamicly

Hi ,

i'm using apache fop , and i want in my xsl to dynamicly call 
a template

for example i got a main xsl file==> main.xsl  (which i mport 
a xsl file ==> subreport1.xsl)

in this subreport1.xsl file i got a template that i declare 
like that :

 <xsl:template  match="projectDetailSection">
 <xsl:template>

and in my main template (main.xsl)

i call the template with:

<xsl:call-template name="projectDetailSection" />

that's the normal case it's working.Now how could i  call a 
templace dynamicly like:


i define the variable:

<xsl:variable name="var1" 
saxon:assignable="yes">projectDetailSection         </xsl:variable>

and then i call the tempalte dynamicly:

<xsl:call-template
 name="{$var1}" saxon:allow-avt="yes" ></xsl:call-template>


my actual code doens't work even if i use saxon ....


and thanks a lot for your help





      


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--