Subject: Re: [xsl] Java XSLT transformers and document('') problem From: LS <leonid@xxxxxxxxxxxxx> Date: Mon, 08 Sep 2008 15:31:41 +0600 |
but the behaviour is very different to that of call-template, any xsl instructions in the matched template will be treated as data rather than executed.
In the example that you gave there were no xsl instructions inside the template so you could just use a variable and don't need a template at all. Does your actual use case have xsl instructions inside the template, perhaps the example you posted was over-simplified?
Of course, this was very simplified example. I do this i.e. when generate web forms, based on input xml:
XML: <document> <name value="lala" mode="string"/> <password value="dede" mode="password" /> </document>
XSL: <xsl:variable name="doc" select="/"/>
<xsl:template name="caller"> <xsl:param name="n"/> <xsl:param name="i"/> <xsl:apply-templates select="document('')/*/xsl:template[@name=$n]"> <xsl:with-param name="i" select="$i"/> </xsl:apply-templates> </xsl:template>
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Java XSLT transformers an, David Carlisle | Thread | Re: [xsl] Java XSLT transformers an, Andrew Welch |
Re: [xsl] Java XSLT transformers an, Andrew Welch | Date | Re: [xsl] Java XSLT transformers an, Andrew Welch |
Month |