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

xsl:apply-imports?

Subject: xsl:apply-imports?
From: Tyler Baker <tyler@xxxxxxxxxxx>
Date: Mon, 21 Dec 1998 16:34:17 -0500
xsl apply import
In the latest XSL spec the following is defined:

"xsl:apply-imports processes the current node using only template rules
that were imported into the stylesheet containing the current rule; the
node is processed in the current rule's mode."

What happens when you nest apply-imports statements inside of each
other, e.g.

<xsl:template match="foo">
  <xsl:apply-imports>
    <xsl:apply-templates/>
    <xsl:apply-imports>
       <xsl:apply-templates/>
          <xsl:apply-imports>
             <xsl:apply-templates/>
             OK now what is the stylesheet context?
          </xsl:apply-imports>
      </xsl:apply-imports>
  </xsl:apply-imports>
</xsl:template>

It looks as an XSL implementation will need to have each template
element maintain a pointer to the stylesheet that it is a member of in
order to determine what stylesheet the current rule refers to.  This is
of course easily doable in the implementation I have, but for
implementations which pass in a DOM Document as the stylesheet tree
(e.g. Koala) this would force the XSL implementor to have a global table
mapping templates to the stylesheet that owns them.

The other thing I am not so sure about is the scope of
xsl:apply-imports.  In the example above, should scope be inherited from
any ancestor xsl:apply-import elements of a particular template node or
should a nested use of xsl:apply-imports override any ancestor
xsl:apply-import elements.

Regards,

Tyler


 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.