[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Processing Modes...
James Clark wrote: > Tyler Baker wrote: > > > > One thing I am not too completely clear about is the order in which > > processing modes eliminate template rules from being processed. > > > > In other words, should an XSL Processor: > > > > (1) First try and find the most specific matching template rule and if > > there is one, then conditionally process it if the mode of the template > > is the same as the current processing mode. > > > > (2) Try and find the most specific matching template rule and while > > searching for a match eliminate all template rules from consideration > > that do not match the current mode. > > > > I am under the assumption that #2 is the way to go, but it is not > > totally clear to me what the spec says I should do. > > #2 is the way to go, but there's no such thing as specificity any more. > > Here's what you're supposed to do: > > Find the set of rules such that > > 1. The pattern on the template matches the node being processed, and > > 2. The mode on the xsl:template is the mode specified on the > xsl:apply-templates (or neither has a mode) > > Then eliminate rules by importance (import order). > > Then eliminate rules by priority. > > Finally if there's more than one rule left, either give an error or > choose the rule that's last in the stylesheet; f there are no rules > left, use the built-in rule. > > Concrete suggestions for wording changes to the spec that would make > this clearer are welcome. As usual thanx for the feedback. I think that a simple example (the spec has a note that examples are needed) would do just fine. I think that general purpose algorithms like the one you suggested help people understand the spec the most. Again thanx, Tyler XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|