Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: [xsl] a bit of distraction ' quiz of XSLT 1.0 oddities'

From: andrew welch <andrew.j.welch@--------->
To:
Date: 1/3/2006 10:11:00 AM
On 1/3/06, Ragulf Pickaxe <ragulf.pickaxe@xxxxxxxxx> wrote:
> On 1/3/06, andrew welch <andrew.j.welch@xxxxxxxxx> wrote:
> > An 'oddity' I've had to deal with a few times:
>
> <Snip/>
> >
> >
> > What is the output?
>
> I have not used import very often, but looking up a bit, I would say:
> I am in second.xsl!
>
> The reason for this is that second.xsl is imported after first.xsl and
> therefore has a higher precedence, and import precedence is considered
> before priority in matches (if I read it correctly).

Correct.  The very first rule in conflict resolution is to get rid of
all templates with lower import precedence - this is decided
ultimately by the order of the imports.  It doesn't matter about the
priority attribute, or the fact that match="node" is a better match
than match="*", it's all down to the order of the import statements.

The oddity (im my mind) is that "order of occurence" is the very last
all-else-has-failed-and-we-have-to-choose-one technique for templates
in the same stylesheet, but the very first for imported templates.

cheers
andrew


transparent
Print
Mail
Like It
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