Subject: RE: include error
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Thu, 29 Nov 2007 10:10:33 -0000
|
It seems you should be using xsl:import rather than xsl:include.
If you use xsl:include then the declarations in both modules have the same
precedence and any conflicts can cause an error. With xsl:import, the
importing module overrides the imported module.
Michael Kay
http://www.saxonica.com/
> -----Original Message-----
> From: Torsten Schassan [mailto:schassan@xxxxxx]
> Sent: 29 November 2007 10:05
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: include error
>
> Hi,
>
> I encounter a problem which hasn't been a problem before and
> I wonder why:
>
> I have a main xsl where, at the end, I include another xsl in
> order to customize some of the templates. Both stylesheets
> contain templates which match the same element and I (seem
> to) remember that Saxon reported the ambigouos match before
> but still applied the included template while now it records
> an error and doesn't process the respective element at all.
> Even worse for named templates, Saxon stops with an error and
> refuses to apply the stylesheet in general. Is this behaviour
> correct? What do I have to change in order to keep the system
> of main-xsl-with-general-rules and
> secondary-xsl-with-customizations-for-special-cases? I can't
> use modes because I have (a small set of) special rules for
> too many cases and I can't foresee how the templates have to
> process the contents.
>
> Best, Torsten
>
> PS: I leave out the examples because I simply have matching templates:
> <xsl:template match="tei:msIdentifier">...<xsl:template>
>
> --
> Torsten Schassan
> Herzog August Bibliothek, Postfach 1364, D-38299 Wolfenbuettel
> Tel.: +49-5331-808-130, schassan {at} hab.de
> http://www.hab.de; http://www.hab.de/forschung/projekte/weiss64.htm
|