Project

Profile

Help

Bug #5107

Base URI of validated document is incorrect

Added by Michael Kay 20 days ago. Updated 20 days ago.

Status:
New
Priority:
Normal
Assignee:
Category:
Schema-Aware processing
Sprint/Milestone:
-
Start date:
2021-09-28
Due date:
% Done:

0%

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

Description

Unit test TestValidator.testValidationWithEntities() is failing, on both the 10 and 11 branches, both Java and C# (but failing in slightly different ways).

The XdmDestination used as the result of validation is supposed to copy the base URIs of the corresponding elements in the source document. That's achievedby having the underlying TinyBuilder have the property useEventLocation=true. The logic in XdmDestination.setReceiver() sets this property only if no BaseUri property is set on the XdmDestination. But if no BaseUri property is set on the XdmDestination, then the document nodewill have no base URI, rather than having its base URI be a copy of that on the source document. The base URIs of element nodes are OK on Java because the absent URI is delivered as "" (zero-length URI) whereas on C# it is delivered as null (see XdmDestination.BaseUri property); this is because System.Uri doesnot accept "" as a legal URI value. But I added a check for the base URI of the document node, and this fails on both platforms.

Please register to edit this issue

Also available in: Atom PDF