Geert Bormans wrote:
Correct, I will maintain them separately of course,
but my customer has to fit the chain in, in an application that is not
to be touched.
I will deliver in seperate stylesheets, but I would like to have some
backup if the importing should fail, caused by path issues eg.
(I have no control over the execution environment)
Considering Colin's remarks, about xsl:next-match etc, it is an exercise
which may be next to impossible (at least far from trivial), but I maybe
Can you change the URIResolver? Because if you can, you can place all
stylesheets into one stylesheet, id them (with xml:id), use use-when on
them so they won't be called prematurely, and let the URIResolver
resolve to parts of the same stylesheet (the id'ed parts). Probably the
easiest to do (if this is an option at all) to use your own scheme so
any existing schemes are not messed with. If XSLT 2.0 weren't too
strict, you would have an easy solution as follows (which illustrates my
idea, hopefully the indentation isn't messed with by my Thunderbird...):
<xsl:import href="multiple-stylesheets-in-one.xslt#include-me" />
<xsl:stylesheet xml:id="include-me" version="2.0"
Saxon will throw an "A stylesheet cannot import itself" error, even
though you aren't really importing oneself. Which is why you will have
to come up with your own scheme, or a location of your stylesheet which
is not recognized by the processor as being the same:
but I don't know (not tested), if the #-syntax is supported this way (I
remember a few W3C notes on the subject, but I can't recall whether it
is legal and whether only the node with "include-me" will get selected).
I'd be curious if this is a feasible path for you, if so, we can
elaborate a bit on it.
-- Abel Braaksma
PS: without the xsl:import the use of xsl:stylesheet inside the
extension element is legal (at any other place it wouldn't), it is
ignored by the XSLT processor.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>