You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by "Michael Glavassevich (JIRA)" <xe...@xml.apache.org> on 2009/11/22 19:35:39 UTC

[jira] Updated: (XERCESJ-1183) Entity resolver returning DOMInputSource causes base URI to be lost

     [ https://issues.apache.org/jira/browse/XERCESJ-1183?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Glavassevich updated XERCESJ-1183:
------------------------------------------

    Affects Version/s: 2.9.1
                       2.9.0
                       2.8.1
        Fix Version/s: 2.10.0

> Entity resolver returning DOMInputSource causes base URI to be lost
> -------------------------------------------------------------------
>
>                 Key: XERCESJ-1183
>                 URL: https://issues.apache.org/jira/browse/XERCESJ-1183
>             Project: Xerces2-J
>          Issue Type: Bug
>          Components: XNI
>    Affects Versions: 2.8.0, 2.8.1, 2.9.0, 2.9.1
>         Environment: Sun JDK 1.5 for Linux/AMD64
>            Reporter: Bas de Bakker
>            Assignee: Michael Glavassevich
>             Fix For: 2.10.0
>
>
> I'm trying to preparse an XML Schema (let us call it schema1) that includes schema2, which again includes schema3. These are specified in the including schemas using a relative path. I have schema2 and schema3 available as a DOM tree from a non-Xerces DOM implementation. To avoid serializing and reparsing them, I'm trying to return a DOMInputSource from my implementation of XMLEntityResolver.resolveEntity().
> While schema2 is found correctly, my application cannot find schema3. The reason is that the resourceIdentifier passed to resolveEntity() does not contain a baseSystemId, unlike the one passed when looking up schema2.
> I have traced this behaviour to the doc2systemId() method in org.apache.xerces.impl.xs.traversers.XSDHandler. If I remove the instanceof check and unconditionally call getDocumentURI() on the element supplied by my entity resolver, my application works correctly.
> Alternatively, I would expect Xerces to construct a baseSystemId to be used for schema3 from the baseSystemId and the systemId that I set on the DOMInputSource that I create for schema2. Apparently it does do so if instead of the DOMInputSource I return an XMLInputSource for schema2 (using a StringReader on the serialized representation of schema2).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org