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

RE: Importing stylesheet

Subject: RE: Importing stylesheet
From: "Michael Kay" <mhkay@xxxxxxxxxxxx>
Date: Wed, 27 Jun 2001 09:45:29 +0100
select innerhtml
> I'm looking for a bit of confirmation. I've gone through Mike
> Kay's book but
> I want to clear up the last bit of confusion.
>
> I have a library stylesheet that contains among other things a default
> wrapper for the HTML I create. The library is (approx):
> <xsl:stylesheet>
> <xsl:template name="DefaultWrapper">
>   <xsl:with-param name="innerHTML" />
>   <html><head><xsl:call-template name="getJSCode"
> /></head><body><xsl:copy-of select="innerHTML" /></body></html

A couple of typos here: xsl:with-param should be xsl:param and
select="innerHTML" should be select="$innerHTML".

>
> Now it seems to me that I should get alerts with "New this"
> and "New that"
> respectively but I'm wondering if the templates in an
> included stylesheet
> have access to all the included stylesheets or only the ones
> it includes in itself.

Yes, the call-template in the imported stylesheet should select the template
with highest import precedence, which is the one in the importing
stylesheet.
>
> In a related question, what happens when the same stylesheet
> is included in
> multiple places in an include chain.

It's exactly the same as if you included/imported two stylesheet modules
with the same content but different names: you get two copies of the same
thing. Which may be an error, especially with xsl:include, if it leads to
duplication of entries where duplicates aren't allowed, e.g. several global
variables with the same name at the same import precedence.

Mike Kay
Software AG
>


 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.