[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: <xsl:apply-imports> and rules with higher priority

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
RE:  <xsl:apply-imports> and rules with higher priority
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-----

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.