|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: apply-imports
Hello Michael
>
> Your xsl:apply-imports call will look for a template that matches the
> current node (i.e. the root node) that has lower import precedence than the
> current template; and there isn't one. xsl:apply-imports always processes
> the current node, not its children.
I have added the template rule matching the root node to the XSL and it
doesn't work neither:
<xsl:template match="/">
<xsl:apply-templates/>
</xsl:template>
Anyway I have fixed the problem using one XSL to redirect to one of the two
(actually they will be three in the future) I use depending on the parameter
(using <xsl:processing-instruction>):
Is this one a good solution, or is the 'copy-of' at the end going to take a
lot of time?
Thank you,
------------- redirect.xsl --------------------
<xsl:param name="print">0</xsl:param>
<xsl:template match="/">
<xsl:choose>
<xsl:when test="$print='1'">
<xsl:processing-instruction name="xml-stylesheet">
href="probaimport.xsl" type="text/xsl"
</xsl:processing-instruction>
<xsl:processing-instruction name="cocoon-process">
type="xslt"
</xsl:processing-instruction>
</xsl:when>
<xsl:otherwise>
<xsl:processing-instruction name="xml-stylesheet">
href="probanormal.xsl" type="text/xsl"
</xsl:processing-instruction>
<xsl:processing-instruction name="cocoon-process">
type="xslt"
</xsl:processing-instruction>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="@*|*|text">
<xsl:copy-of select="."/>
</xsl:template>
----------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








