Re: [xsl] Do Templates Conflict?

Subject: Re: [xsl] Do Templates Conflict?
From: Dimitre Novatchev <dnovatchev@xxxxxxxxx>
Date: Tue, 10 May 2005 06:37:09 +1000
On 5/9/05, Edward Bryant <bryant_edward@xxxxxxxxxxx> wrote:
> Thanks for everyone's answers to this issue, they were very helpful and I
> sorry that I didn't research this one further before posting.
> Now I do have a remaining question.
> If I know I have a conflict (i.e., a template for all paragraphs and
> for the first paragraph within a certain context) and I know that according
> to the conflict rules that they will be resolved as I want them to without
> explicit priorities, should I use explicit priorities anyway?
> I mean to ask what the better practice is--
> (1) rely on implied conflict rules, only using explicit priorities to
> counteract the implied rules, or
> (2) to be explicit when I anticipate the conflict, een if the implied rules
> should give the same result?

In case of a library of xslt templates and functions one cannot avoid
the case that the (unknown) user, who imports them may have a template
with higher import precedence that captures all kind of nodes (e.g.
has the identity rule in the importing stylesheet).

What has been proven to work even in such cases is to uses unique
modes on all templates for the library, such as:


where the prefix "f" is bound to:


Dimitre Novatchev

Current Thread