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 "Bas de Bakker (JIRA)" <xe...@xml.apache.org> on 2006/09/05 15:51:23 UTC

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

Entity resolver returning DOMInputSource causes base URI to be lost
-------------------------------------------------------------------

                 Key: XERCESJ-1183
                 URL: http://issues.apache.org/jira/browse/XERCESJ-1183
             Project: Xerces2-J
          Issue Type: Bug
          Components: XNI
    Affects Versions: 2.8.0
         Environment: Sun JDK 1.5 for Linux/AMD64
            Reporter: Bas de Bakker


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.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


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

Posted by "Michael Glavassevich (JIRA)" <xe...@xml.apache.org>.
     [ https://issues.apache.org/jira/browse/XERCESJ-1183?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Glavassevich resolved XERCESJ-1183.
-------------------------------------------

    Resolution: Fixed

There was some important code which missing from the non-stream schema loading paths that populates the table read in doc2systemId(). This should be fixed now.

> 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
>         Environment: Sun JDK 1.5 for Linux/AMD64
>            Reporter: Bas de Bakker
>            Assignee: Michael Glavassevich
>
> 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


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

Posted by "Michael Glavassevich (JIRA)" <xe...@xml.apache.org>.
     [ https://issues.apache.org/jira/browse/XERCESJ-1183?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Glavassevich reassigned XERCESJ-1183:
---------------------------------------------

    Assignee: Michael Glavassevich

> 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
>         Environment: Sun JDK 1.5 for Linux/AMD64
>            Reporter: Bas de Bakker
>            Assignee: Michael Glavassevich
>
> 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


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

Posted by "Michael Glavassevich (JIRA)" <xe...@xml.apache.org>.
     [ 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