Subject: Re: [xsl] <xsl:apply-imports> and rules with higher priority; And more! From: Johannes Neubauer <johannes.neubauer@xxxxxxxxxxxxxxxxx> Date: Wed, 04 Jun 2008 21:37:07 +0200 |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Michael Kay schrieb: | And the answer to that is: no, you can't change the language specification.
| 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-----
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] <xsl:apply-imports> and r, Michael Kay | Thread | RE: [xsl] <xsl:apply-imports> and r, Michael Kay |
RE: [xsl] <xsl:apply-imports> and r, Michael Kay | Date | Re: [xsl] XQuery basics, Andrew Welch |
Month |