Project

Profile

Help

Bug #4229

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

Added by Octavian Nadolu 4 months ago. Updated 13 days ago.

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

100%

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

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

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

History

#1 Updated by Michael Kay 4 months 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().

#2 Updated by Michael Kay 4 months 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

#3 Updated by Michael Kay 4 months ago

  • Applies to branch 9.8 added
  • Fix Committed on Branch 9.8 added

#4 Updated by O'Neil Delpratt 3 months 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.

#5 Updated by O'Neil Delpratt 13 days 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