Altova Mailing List Archives


Re: [xsl] stylesheet expansion

From: Abel Braaksma <abel.online@--------->
To:
Date: 12/8/2007 10:56:00 AM
Geert Bormans wrote:
Hi all,



I have a stylesheet with a pipeline in it

and a large set of imported stylesheets (nicely shielded with seperate 
modes)

imported stylesheets are tested separately, so they all have a 
template match="/" outside the mode

(hence import instead of include)



I would like to deliver one expanded stylesheet.
Did anyone ever develop an expansion stylesheet (or other program)
or has anyone ever come across such a thing?

I assume you'd want the expanded stylesheet to obey the import 
precedence rules? It's trivial to concatenate the imports into one 
stylesheet, of course, but to mimic the import precedence may be 
daunting, more so because determining the import precedence means 
dissecting the matches, which I believe is done once matches are found 
(i.e., when the XML is fed to the stylesheet), not entirely at compile 
time, because matches can overlap in different ways on different 
occasions... (but I'm afraid I don't know enough of compiling 
stylesheets into some internal representation to really assert this).



If you know of one specific set where the precedence is apparent (i.e., 
only on the / match, and the rest is inside the modes you mention), 
perhaps an if/when like construct in your main concatenated stylesheet 
would suffice.



May I ask why you want them all together? It seems to me that separate 
logical units is a better approach than one big stylesheet.



Cheers,
-- Abel Braaksma

Disclaimer

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.