RE: conflict resolution suggestion for XSLT

Dhruv (or KirnSha) wrote:

> In regards to apply-imports the XSLT 2.0 spec specifically 
> states in section 
> 6.6 all templates with lower precendence are not considered.
> 
> NOTE: This is not the same as saying that the search 
> considers all template 
> rules whose import precedence is lower than that of the 
> current template rule.
> 
> I am requesting that all templates that are in conflict fire 
> instead of the 
> one with highest priority, and that priority only controls 
> the order of the firing.

There is an outstanding requirement in the XSLT 2.0 requirements list for a
"next-match" capability to make it easier to apply multiple templates to the
same node. So far, we haven't put anything in the XSLT 2.0 working draft
that addresses this requirement.

It wouldn't make sense to apply all the rules that match automatically, not
only because of backwards compatibility, but also because normally the
results of the different rules would need to be hierarchically nested, and
therefore the first rule needs some kind of instruction (like apply-imports)
to say where the results of the second rule should go.
> 
> if this requires more overhead for XSLT processors the RETE 
> algorithm could 
> remedy that.  
> 
I'm afraid I have no idea what the acronym "RETE" is referring to. But this
isn't primarily a performance issue, matching of template rules is not a
major performance overhead in XSLT processing.

I hope this answers both your questions. 

Regards,

Michael Kay

Received on Wednesday, 6 November 2002 10:49:08 UTC