Project

Profile

Help

Bug #4229

closed

The saxon:system-id() function does not return the correct systemID when the documents contains xi:include

Added by Octavian Nadolu almost 5 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Saxon extensions
Sprint/Milestone:
-
Start date:
2019-05-31
Due date:
% Done:

100%

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

Description

It seems that the saxon:system-id() function does not return the correct systemID when you have a document that contains xi:include. For example if I apply the "printSysID.xsl" stylesheet on the "refentry2.xml", for the "@remap" attribute from the "refentry2.xml" file it returns "file:/.../para.xml" systemId in some cases. I tested with Saxon 9.9.1.2 and Saxon 9.8.0.12 PE and EE


Files

printSysID.xsl (404 Bytes) printSysID.xsl Octavian Nadolu, 2019-05-31 07:46
para.xml (449 Bytes) para.xml Octavian Nadolu, 2019-05-31 07:48
refentry2.xml (3.6 KB) refentry2.xml Octavian Nadolu, 2019-05-31 08:07
Actions #1

Updated by Michael Kay almost 5 years ago

The problem is that TinyAttributeImpl does not implement the method getSystemId(), so it is defaulting to the implementation in TinyNodeImpl.getSystemId(), which is incorrect for attribute nodes because it uses an attribute node number to index into the table of system IDs, when this table is indexed by element node numbers.

Therefore the system ID returned for attribute nodes (in a tinyTree) is incorrect.

Fix by adding to TinyAttributeImpl:

@Override
    public String getSystemId() {
        NodeInfo parent = getParent();
        return parent == null ? null : getParent().getSystemId();
    }

Workaround: use ../saxon:system-id().

Actions #2

Updated by Michael Kay almost 5 years ago

  • Category set to Saxon extensions
  • Status changed from New to Resolved
  • Assignee set to Michael Kay
  • Applies to branch 9.9, trunk added
  • Fix Committed on Branch 9.9, trunk added
Actions #3

Updated by Michael Kay almost 5 years ago

  • Applies to branch 9.8 added
  • Fix Committed on Branch 9.8 added
Actions #4

Updated by O'Neil Delpratt over 4 years ago

  • % Done changed from 0 to 100
  • Fixed in Maintenance Release 9.9.1.4 added

Bug fix applied in the Saxon 9.9.1.4 maintenance release.

Actions #5

Updated by O'Neil Delpratt over 4 years ago

  • Status changed from Resolved to Closed
  • Fixed in Maintenance Release 9.9.1.5 added
  • Fixed in Maintenance Release deleted (9.9.1.4)

Bug fix applied in the Saxon 9.9.1.5 maintenance release.

Please register to edit this issue

Also available in: Atom PDF