Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


RE: [xsl] Priority and import precedence

From: "Andrew Welch" <ajwelch@--------------->
To:
Date: 2/1/2005 10:24:00 AM
> > Would it be possible to add a warning message to Saxon,
> like ambiguous
> > rule match, when one template is chosen over another purely
> by import
> > precedence
>
> wouldn't that make import virtually unusable?
> Usually when I use import _every_ template in the importing
> stylesheet is overriding a template in the imported one
> (often because the latter has a template matching *).  I
> thought your earlier suggestion was that certain special
> templates could have an attribute to flag they should be top
> of the import tree and generate a warning if not.

Yes it was :) But if we can't have that then at least we should know
when it has happened (just like ambiguous rule match) rather than
silently getting the wrong output.  (Wrong as in 'not intended').

When I talk about 'one template being chosen over another just because
of import precedence' I am talking about the order of the imports - the
following import winning over the preceding import - *not* stylesheet A
importing stylesheet B.

So, in your example above, you would only get the warning message if you
imported two stylesheets that each had a template with the same match
pattern, that weren't overridden in your importing stylesheet, and one
of those templates was chosen over the other because it was in a
stylesheet that was imported later than the other one.

It may not be feasible, but I had a bug recently because of this and
thought it was a bit poor that the fix involved either re-ordering the
imports or moving the template into the importing stylesheet.  At least
if we have a warning, we could re-order the imports with confidence and
keep templates in the stylesheets they logically belong in.

cheers
andrew


transparent
Print
Mail
Digg
delicious
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent