Subject: RE: <xsl:apply-imports> and rules with higher priority; And more!
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Wed, 4 Jun 2008 21:14:50 +0100
|
Why not have
module A
import module B
overriding xsl:param declarations
module B
include main stylesheet
non-overriding template declarations
Michael Kay
http://www.saxonica.com/
> -----Original Message-----
> From: Johannes Neubauer [mailto:johannes.neubauer@xxxxxxxxxxxxxxxxx]
> Sent: 04 June 2008 20:37
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: Re: <xsl:apply-imports> and rules with higher
> priority; And more!
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi,
>
> Michael Kay schrieb:
> | And the answer to that is: no, you can't change the language
> specification.
>
> That was of course not what I meant.
>
> | But you didn't say anywhere in your message what you
> needed, you only
> | said what you wanted. If you describe your problem, rather than a
> | proposed solution which doesn't work, then we can help you.
>
> My problem is, that I have built a graphical abstraction
> layer on top of XSLT, which is transformed to XSLT. I like to
> group template rules that are imported into the main
> stylesheet. I use xsl:import, because I have technically
> caused global parameter declarations that would collide with
> xsl:include. But although the stylesheets are imported, I'd
> like to decide which rule is taken by priority.
>
> One possible solution might be:
> * code the priority into the mode (<ident>_<prio>) during the
> stylesheet generation,
> * use a fallback dummy template returning an unique
> identifier for all the modes and
> * call apply-templates for all modes (descending order)
> * until the first does not return the dummy identificator.
>
> But that isn't intended at all, I think. Another way would be
> to copy the template rules to the main stylesheet, remove
> duplicate template signatures and import only the rest of the
> top-level-declaration of the stylesheet modules (like
> parameters and keys).
>
> wfg,
> Jonny.
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFIRu7jGaEJacf6i/cRAsIBAKCL19ewvHZNZMrwZroNSLs6VAYxPwCeJfS8
> 7+cKwGMN5AvgIMMkyGlqfwM=
> =OqUZ
> -----END PGP SIGNATURE-----
|