Project

Profile

Help

Bug #3184

closed

Import precedence on xsl:mode

Added by Michael Kay about 7 years ago. Updated almost 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
XSLT conformance
Sprint/Milestone:
-
Start date:
2017-03-28
Due date:
% Done:

0%

Estimated time:
Legacy ID:
Applies to branch:
9.7
Fix Committed on Branch:
trunk
Fixed in Maintenance Release:
Platforms:

Description

Test accumulator-023 is not working on either the 9.7 or 9.8 branches. The test has two xsl:mode declarations of the same mode at different import precedences, with disjoint attributes; the attributes from both declarations should be combined, but this doesn't seem to be happening. My records suggest that the test was working in 9.7.0.7, and it doesn't seem to have changed recently.

Actions #1

Updated by Michael Kay about 7 years ago

This one looks quite tricky to fix. Currently the Mode object is being updated during the processing of XSLMode.prepareAttributes(), which is called early on (during spliceIncludes) while processing raw XSLT documents, before components have been sorted into precedence order. Ideally the properties on the Mode object just be set only during the XSLMode.compileDeclaration() phase.

However, the Mode object has a mechanism for dealing with this, namely the setExplicitProperty() method which captures the value of a particular property at a particular precedence. This mechanism is being used to check for conflicts between attribute values at different precedences, but (except for the @typed attribute) it isn't being used to ensure that the effective value is the one with highest precedence.

Actions #2

Updated by Michael Kay about 7 years ago

I've fixed this particular case on the 9.8 branch by resetting the property on the mode during the checkForConflictingProperties() method. This needs to be extended to other properties where the same problem can occur.

Actions #3

Updated by Michael Kay about 7 years ago

Detecting conflicting values of xsl:mode/@use-accumulators requires particular care because it's not a simple string. The spec doesn't really say what it means by "conflicting values" but I think it should be interpreted as "the same set of names".

Actions #4

Updated by Michael Kay almost 7 years ago

  • Status changed from New to Resolved
  • Priority changed from Low to Normal
  • Applies to branch 9.7, 9.8 added
  • Fix Committed on Branch 9.8 added

I've added code to check for conflicts in the normalized value of use-accumulators. Change applied to 9.8 only; I don't propose to fix this on the 9.7 branch. Test cases mode-1510 et seq added to the XSLT 3.0 test suite.

Actions #5

Updated by O'Neil Delpratt almost 7 years ago

  • Fix Committed on Branch trunk added
  • Fix Committed on Branch deleted (9.8)
Actions #6

Updated by O'Neil Delpratt almost 7 years ago

  • Applies to branch deleted (9.8)
Actions #7

Updated by Michael Kay almost 7 years ago

  • Status changed from Resolved to Closed

This was fixed in the 9.8 release.

Please register to edit this issue

Also available in: Atom PDF