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

Re: something I'd really like in XSLT

Subject: Re: something I'd really like in XSLT
From: David Carlisle <davidc@xxxxxxxxx>
Date: Tue, 23 Jan 2007 13:33:49 GMT
Re:  something I'd really like in XSLT
> now this is of course not a useful example but we can see how the
> first example template matches normal priority operation (but the
> running of the template is not affected by the priority rules of the
> template, basically the execution of the template is now affected by
> the priority of how one matches the same element in the ismatched
> mode) with the exception that I can switch execution dependent on if
> there is an import that matches. I can of course do this by running
> xsl:apply-imports and testing if there is any content of my variable
> but it seems somewhat fragile to say the least.

I didn't follow all the logic here but it seems to be very complicated,
and attempting to duplicate much of the matching semantics within xslt.

If the requirement is "if foo.xsl and bar.xsl have templates that match
this node do what they specify else do ...) 

Then you can do that without any explict xsl:if testing, just have a top
level stylesheet that says

<xsl:import href="default.xsl"/>
<xsl:import href="foo.xsl"/>
<xsl:import href="bar.xsl"/>


where default.xsl has a template that matches the node and does ... it will
have lowest import precedence so only be invoked if no other template
matches.

David

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.