xsl-list
[Top] [All Lists]

RE: [xsl] <xsl:apply-imports> and rules with higher priority; And more!

2008-06-04 13:15:51
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(_dot_)neubauer(_at_)cs(_dot_)tu-dortmund(_dot_)de] 
Sent: 04 June 2008 20:37
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: Re: [xsl] <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-----

--~------------------------------------------------------------------
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>
--~--



--~------------------------------------------------------------------
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>
--~--