Subject: Re: [xsl] Template overriding problem with pre compilied xsl From: James Vulling <clogz@xxxxxxxxxxxxxxxx> Date: Thu, 02 Dec 2004 14:48:07 +1100 |
Thanks for the reply Rob.
What I am trying to do is I have a template named layout.xsl that I include in all my xsl pages. In there I have a template named highlight that contains the default content that I would like to be able to override.
somepage.xsl ----------------------------------------- <xsl:include href="layout.xsl"/>
<xsl:template match="/" > <xsl:call-template name="layout" /> </xsl:template>
<xsl:template name="highlight" > This page highlight. </xsl:template> -----------------------------------------
layout.xsl ----------------------------------------- <xsl:template name="layout" > <xsl:call-temaplate name="highlight" /> </xsl:template>
<xsl:template name="highlight" > Default highlight </xsl:template> -----------------------------------------
Is this what you meant by different locations?
I am compiling all these files together into their individual pre-compiled files.
Does this help explain the situation better?
Robert Koberg wrote:
Hi,
Are you trying to have different locations for different compiled versions or do you want this all in one?
If you are trying to get different locations for different compiled stylesheets, you have to use com.caucho.xsl.AbstractStylesheetFactory.setWorkPath (not jaxp)
Overall, if you want to do anything complex with Resin XSL, you might be out of luck. I only use it for relatively simple transformation scenarios.
best, -Rob
Lee Kemp wrote:
Hi all,
I am having an issue using pre-compiled XSL, which is transformed by the Caucho XSL parser.
I would like to be able to override templates from included XSL documents, but I am getting the following output when the compilation process occurs.
"com.caucho.java.JavaCompileException: /test.xsl:42:
_xsl_macro_layout(com.caucho.xsl.XslWriter,org.w3c.dom.Node,com.caucho.xpath.Env)
is already defined in test__xsl void _xsl_macro_layout(XslWriter out, Node inputNode, Env env) "
Does anyone have any insight or experience when dealing with overridden
templates in a precompiled environment? How have you dealt with this issue?
I believe the problem lies in having two templates with the same name, but I do not know how to get around it.
Thanks,
Lee.
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] [Illegal?] setting xsl:va, Michael Kay | Thread | [xsl] Custom paging and counting su, Anthony DiSalvo |
RE: [xsl] [Illegal?] setting xsl:va, Raffaele Sena | Date | [xsl] Custom paging and counting su, Anthony DiSalvo |
Month |