Your import tree looks like this

  - SUB1
    - FUNC
  - SUB2
    - FUNC

Note that importing the same module twice at different points in the tree is equivalent to importing two different modules that happen to have identical content.

So the import precedences are

FRONT               5
  - SUB1             4
    - FUNC          3
  - SUB2             2
    - FUNC          1

which means that the highest precedence rule matching sub2/test is the match="*" template in the instance of FUNC with precedence 3.

>I do - however - still considder this to be a bug.

You can regard it either as a bug in your code, or as the language spec not being designed the way you would have liked it to be designed. But the processors are all conforming to the spec.

Michael Kay

On 23/09/2010 3:13 PM, Jens Henrik Gabe wrote:
When overriding a template from a 2nd level import in several 1st level imports, only the last overriding template "survives"!
We are using SAXON v9.2.1.1
The attached files details the issue:
test.func.xsl are imported by both test.sub1.xsl and test.sub2.xsl, and the template with mode="value" are overridden in both importing files.
Transforming the test.xml with test.front.xsl should result in
but the result is:
------------------------------------------------------------------------------ Nokia and AT&T present the 2010 Calling All Innovators-North America contest Create new apps & games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
_______________________________________________ saxon-help mailing list archived at