[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

RE: [xsl] Re: Language-specific output


Subject: RE: [xsl] Re: Language-specific output
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Thu, 2 Feb 2006 13:35:56 -0000

> Now it is true that some stylesheets are not valid by 
> themselves but are 
> ok if they are imported or included from other stylesheets.

Yes: I've never felt that was one of the most elegant properties of the
language!
 
> 
> Now the problem is how that situation is handled:
> 
> 1. One possibility is to allow the user to specify the main 
> stylesheet through some action 
> 
> 2. Another approach is to analyze all the stylesheets from 
> the current 
> project and see how they are related wrt include/import and determine 
> automatically the main stylesheet.

I think you have to do 1. A common scenario is to have A and B as
alternative entry points with the bulk of the real logic in C: so the user
can invoke A or B as the entry module, and both of these import C.

Even if 2 yields one stylesheet A that imports all the others (say B, C, and
D), that doesn't stop B being a valid entry point.

To take a concrete example, when I format the XSLT spec for publication, B
is the entry point for producing the main published document; A (which
imports B) is an overlay that produces the version with diff markup.

Michael Kay
http://www.saxonica.com/


Current Thread
Keywords