Subject: Re: Processing Modes... From: James Clark <jjc@xxxxxxxxxx> Date: Mon, 11 Jan 1999 16:18:58 +0700 |
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. James XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Processing Modes..., Tyler Baker | Thread | Re: Processing Modes..., Tyler Baker |
Processing Modes..., Tyler Baker | Date | RE: <xsl:template><xsl:value-of/></, Paul Spencer |
Month |