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

Re: Importing stylesheet

Subject: Re: Importing stylesheet
From: Dimitre Novatchev <dnovatchev@xxxxxxxxx>
Date: Tue, 26 Jun 2001 23:52:48 -0700 (PDT)
include stylesheet in mail
Adam Van Den Hoven wrote:

[snip]

> ... 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.
> 
> In a related question, what happens when the same stylesheet is included in
> multiple places in an include chain. I've had it where my final stylesheet
> depends on transforms from two other stylesheets, so it included both. As it
> turns out, the third stylesheet was also dependant on the second. The import
>  tree looked something like
> 
>     +--B
> A--|
>     +--C --B
> (Man that looks crappy on my machine)
> 
> Everything worked fine but MSXML3SP1 seemed to be painfully slow. Eventually
> I realized that C was unnecessary on its own so every was suddenly a lot
> faster but I'm still curious about the effects on performance this should
> have..

Hi Adam,

I think you're actually asking about imported, not included, stylesheets.

The very brief answer is: Be aware that importing more than one stylesheet that
imports and overrides some templates of a fixed (the same) stylesheet -- this is
generally not working correctly.

As Jeni Tennisson and David Carlisle pointed out in ("Reliance on import precedence
considered dangerous" http://sources.redhat.com/ml/xsl-list/2001-02/msg00996.html, 
and http://sources.redhat.com/ml/xsl-list/2001-02/msg01003.html), 
only the overrides in the last imported stylesheet will be used.

The reason for this problem is that in XSLT QName resolution is carried out
statically (by offset from the beginning of the outermost stylesheet).

To overcome this serious limitation, use generic templates:
http://lists.fourthought.com/pipermail/exslt/2001-May/000169.html
http://www.vbxml.com/downloads/default.asp?id=v2001611171627
http://sources.redhat.com/ml/xsl-list/2001-06/msg01147.html

Generic templates use unique template references, therefore the above problem does
not exist by definition.

Generic templates are the basis for true polymorphism in XSLT.


Hope this helped.

Cheers,
Dimitre Novatchev. 



__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/

 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.