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

Re: Act as xsl:next-match in XSLT 1 with xsl:apply-im

Subject: Re: Act as xsl:next-match in XSLT 1 with xsl:apply-imports (not possible?)
From: David Carlisle <davidc@xxxxxxxxx>
Date: Fri, 23 Mar 2007 16:49:46 GMT
Re:  Act as xsl:next-match in XSLT 1 with  xsl:apply-im
> The reason is obvious: the XSLT 1.0 spec mandates that when two imports 
> are of equal import precedence (i.e., in the same file) then template 
> matches that appear lowest in the importing file take precedence and the 
> rest is discarded. Because of "being discarded", I believe the 
> <xsl:apply-imports /> does not work recursively.

I don't think that the spec describes these templates as being discarded,
and in fact two imports are never in equal precedence.
However (unfortunately) apply-imports is not defined to mean "next match
in import precedence order" it is only defined to consider stylesheets
that are imported into _this_ stylesheet module, so in a situation where
one stylesheet imports all the rest, any apply-imports in the imported
files will be a no-op as they don't themeselves have any imports.

As you said You need a thin deep tree, not a short fat one if you want
to use xsl:apply-imports.


The semantics of xslt 2's next match are a lot easier to understand,
more or less: "choose the template you would have chosen if this one had
not been here".

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.