[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: apply-imports

Subject: Re: apply-imports
From: Ruben Inoto <ris2@xxxxxxxxx>
Date: Tue, 20 Feb 2001 10:47:34 +0100
ruben 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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.