This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
From LSResourceResolver-resolveResource: "The public identifier of the external entity being referenced, or null if no public identifier was supplied or if the resource is not an entity." [1] In the test case, the publicID of the external entity "ref", of the document loaded (test4.xml) is null. The expected publicID should be null and hence assertEquals("er_public", "-//X-Hive//native xml storage//EN", publicId); needs to be changed or removed. assertURIEquals("er_system", null, null, null, null, "test5", null, null, Boolean.TRUE, systemId); should be changed to assertURIEquals("er_system", null, null, null, null, "test5", null, null, Boolean.FALSE, systemId); since the systemID of the external entity to be resolved is a relative URI and not absolute. input.setStringData("") [2] this sets the LSInput to parse to an empty string or null, which should result in a parse exception (since other inputs on LSInput are also null). Thanks, Neil. [1] http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save.html#LS- LSResourceResolver-resolveResource [2] http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save.html#LS- LSInput-stringData [3] http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save.html#LS- LSInput
Agree with all the above. In addition I believe the baseURI assertion is a bit off. The base URI that resolution of external entity/external subset systemIds are relative to should be the URI of the entity containing the externalId token - the [declaration base URI] in infoset terms. In this case this is the documentURI of the root Document ('...test4.xml'), *not* the baseURI of the LSInput originally used to fetch the Document ('http://www.example.com/new_base').