Bug #4229
closedThe saxon:system-id() function does not return the correct systemID when the documents contains xi:include
100%
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
Updated by Michael Kay over 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()
.
Updated by Michael Kay over 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
Updated by Michael Kay over 5 years ago
- Applies to branch 9.8 added
- Fix Committed on Branch 9.8 added
Updated by O'Neil Delpratt over 5 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.
Updated by O'Neil Delpratt about 5 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