|
Subject: Re: [xsl] apply-imports From: Ruben Inoto <ris2@xxxxxxxxx> Date: Tue, 20 Feb 2001 10:47:34 +0100 |
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
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| RE: [xsl] apply-imports, Michael Kay | Thread | [xsl] Text normalization problem., Nestel, Frank |
| Re: [xsl] Re: Designs for XSLT func, Jeni Tennison | Date | Re: Designs for XSLT functions (Was, Jeni Tennison |
| Month |