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 "Chris Simmons (JIRA)" <xe...@xml.apache.org> on 2006/11/09 18:43:37 UTC

[jira] Created: (XERCESJ-1211) Use of DOMInputSource causes null entries in XSNamespaceItem.getDocumentLocations().

Use of DOMInputSource causes null entries in XSNamespaceItem.getDocumentLocations().
------------------------------------------------------------------------------------

                 Key: XERCESJ-1211
                 URL: http://issues.apache.org/jira/browse/XERCESJ-1211
             Project: Xerces2-J
          Issue Type: Bug
          Components: XML Schema API
    Affects Versions: 2.8.1
         Environment: Linux.
            Reporter: Chris Simmons
            Priority: Minor


I've written a test which I will shortly attach where I load a schema grammar using DOMInputSource.  The resulting schema grammar's document locations list contains a null entry.

I think this is due to the different code path followed when using dom inputs.  The normal path loads the schema from a stream and hits the following code in XSDHandler.getSchemaDocument():-

                // now we need to store the mapping information from system id
                // to the document. also from the document to the system id.
                if (key != null)
                    fTraversed.put(key, schemaElement );
                if (schemaId != null)
                    fDoc2SystemId.put(schemaElement, schemaId );
                fLastSchemaWasDuplicate = false;
                return schemaElement;

The document isn't being put in fDoc2SystemId when using DOMInputSource.  Perhaps it would be more robust if XSDHandler was responsible for dealing with dom inputs, and just directly used the dom when it normally parses the XML?

I need the document locations field in order to figure out which documents a schema grammar depends upon, in case some are modified or reloaded.

-- 
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] Commented: (XERCESJ-1211) Use of DOMInputSource causes null entries in XSNamespaceItem.getDocumentLocations().

Posted by "Chris Simmons (JIRA)" <xe...@xml.apache.org>.
    [ https://issues.apache.org/jira/browse/XERCESJ-1211?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12661519#action_12661519 ] 

Chris Simmons commented on XERCESJ-1211:
----------------------------------------

Thanks Michael.

> Use of DOMInputSource causes null entries in XSNamespaceItem.getDocumentLocations().
> ------------------------------------------------------------------------------------
>
>                 Key: XERCESJ-1211
>                 URL: https://issues.apache.org/jira/browse/XERCESJ-1211
>             Project: Xerces2-J
>          Issue Type: Bug
>          Components: XML Schema API
>    Affects Versions: 2.8.1
>         Environment: Linux.
>            Reporter: Chris Simmons
>            Assignee: Michael Glavassevich
>            Priority: Minor
>         Attachments: NullSchemaLocations.zip
>
>
> I've written a test which I will shortly attach where I load a schema grammar using DOMInputSource.  The resulting schema grammar's document locations list contains a null entry.
> I think this is due to the different code path followed when using dom inputs.  The normal path loads the schema from a stream and hits the following code in XSDHandler.getSchemaDocument():-
>                 // now we need to store the mapping information from system id
>                 // to the document. also from the document to the system id.
>                 if (key != null)
>                     fTraversed.put(key, schemaElement );
>                 if (schemaId != null)
>                     fDoc2SystemId.put(schemaElement, schemaId );
>                 fLastSchemaWasDuplicate = false;
>                 return schemaElement;
> The document isn't being put in fDoc2SystemId when using DOMInputSource.  Perhaps it would be more robust if XSDHandler was responsible for dealing with dom inputs, and just directly used the dom when it normally parses the XML?
> I need the document locations field in order to figure out which documents a schema grammar depends upon, in case some are modified or reloaded.

-- 
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-1211) Use of DOMInputSource causes null entries in XSNamespaceItem.getDocumentLocations().

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

Michael Glavassevich updated XERCESJ-1211:
------------------------------------------

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

> Use of DOMInputSource causes null entries in XSNamespaceItem.getDocumentLocations().
> ------------------------------------------------------------------------------------
>
>                 Key: XERCESJ-1211
>                 URL: https://issues.apache.org/jira/browse/XERCESJ-1211
>             Project: Xerces2-J
>          Issue Type: Bug
>          Components: XML Schema API
>    Affects Versions: 2.8.1, 2.9.0, 2.9.1
>         Environment: Linux.
>            Reporter: Chris Simmons
>            Assignee: Michael Glavassevich
>            Priority: Minor
>             Fix For: 2.10.0
>
>         Attachments: NullSchemaLocations.zip
>
>
> I've written a test which I will shortly attach where I load a schema grammar using DOMInputSource.  The resulting schema grammar's document locations list contains a null entry.
> I think this is due to the different code path followed when using dom inputs.  The normal path loads the schema from a stream and hits the following code in XSDHandler.getSchemaDocument():-
>                 // now we need to store the mapping information from system id
>                 // to the document. also from the document to the system id.
>                 if (key != null)
>                     fTraversed.put(key, schemaElement );
>                 if (schemaId != null)
>                     fDoc2SystemId.put(schemaElement, schemaId );
>                 fLastSchemaWasDuplicate = false;
>                 return schemaElement;
> The document isn't being put in fDoc2SystemId when using DOMInputSource.  Perhaps it would be more robust if XSDHandler was responsible for dealing with dom inputs, and just directly used the dom when it normally parses the XML?
> I need the document locations field in order to figure out which documents a schema grammar depends upon, in case some are modified or reloaded.

-- 
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-1211) Use of DOMInputSource causes null entries in XSNamespaceItem.getDocumentLocations().

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

Michael Glavassevich reassigned XERCESJ-1211:
---------------------------------------------

    Assignee: Michael Glavassevich

> Use of DOMInputSource causes null entries in XSNamespaceItem.getDocumentLocations().
> ------------------------------------------------------------------------------------
>
>                 Key: XERCESJ-1211
>                 URL: https://issues.apache.org/jira/browse/XERCESJ-1211
>             Project: Xerces2-J
>          Issue Type: Bug
>          Components: XML Schema API
>    Affects Versions: 2.8.1
>         Environment: Linux.
>            Reporter: Chris Simmons
>            Assignee: Michael Glavassevich
>            Priority: Minor
>         Attachments: NullSchemaLocations.zip
>
>
> I've written a test which I will shortly attach where I load a schema grammar using DOMInputSource.  The resulting schema grammar's document locations list contains a null entry.
> I think this is due to the different code path followed when using dom inputs.  The normal path loads the schema from a stream and hits the following code in XSDHandler.getSchemaDocument():-
>                 // now we need to store the mapping information from system id
>                 // to the document. also from the document to the system id.
>                 if (key != null)
>                     fTraversed.put(key, schemaElement );
>                 if (schemaId != null)
>                     fDoc2SystemId.put(schemaElement, schemaId );
>                 fLastSchemaWasDuplicate = false;
>                 return schemaElement;
> The document isn't being put in fDoc2SystemId when using DOMInputSource.  Perhaps it would be more robust if XSDHandler was responsible for dealing with dom inputs, and just directly used the dom when it normally parses the XML?
> I need the document locations field in order to figure out which documents a schema grammar depends upon, in case some are modified or reloaded.

-- 
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-1211) Use of DOMInputSource causes null entries in XSNamespaceItem.getDocumentLocations().

Posted by "Chris Simmons (JIRA)" <xe...@xml.apache.org>.
     [ http://issues.apache.org/jira/browse/XERCESJ-1211?page=all ]

Chris Simmons updated XERCESJ-1211:
-----------------------------------

    Attachment: NullSchemaLocations.zip

A simple application showing the problem.

There are two schemas, one including the other.  The application loads the schema grammar and prints out the document locations to standard out.

I'd expect to see two distinct URI's but there's one URI and a null entry.

> Use of DOMInputSource causes null entries in XSNamespaceItem.getDocumentLocations().
> ------------------------------------------------------------------------------------
>
>                 Key: XERCESJ-1211
>                 URL: http://issues.apache.org/jira/browse/XERCESJ-1211
>             Project: Xerces2-J
>          Issue Type: Bug
>          Components: XML Schema API
>    Affects Versions: 2.8.1
>         Environment: Linux.
>            Reporter: Chris Simmons
>            Priority: Minor
>         Attachments: NullSchemaLocations.zip
>
>
> I've written a test which I will shortly attach where I load a schema grammar using DOMInputSource.  The resulting schema grammar's document locations list contains a null entry.
> I think this is due to the different code path followed when using dom inputs.  The normal path loads the schema from a stream and hits the following code in XSDHandler.getSchemaDocument():-
>                 // now we need to store the mapping information from system id
>                 // to the document. also from the document to the system id.
>                 if (key != null)
>                     fTraversed.put(key, schemaElement );
>                 if (schemaId != null)
>                     fDoc2SystemId.put(schemaElement, schemaId );
>                 fLastSchemaWasDuplicate = false;
>                 return schemaElement;
> The document isn't being put in fDoc2SystemId when using DOMInputSource.  Perhaps it would be more robust if XSDHandler was responsible for dealing with dom inputs, and just directly used the dom when it normally parses the XML?
> I need the document locations field in order to figure out which documents a schema grammar depends upon, in case some are modified or reloaded.

-- 
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-1211) Use of DOMInputSource causes null entries in XSNamespaceItem.getDocumentLocations().

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

Michael Glavassevich resolved XERCESJ-1211.
-------------------------------------------

    Resolution: Fixed

Chris, looks like the fix I applied for XERCESJ-1340 also fixed this issue. When I run your test with the current code in SVN it prints out both URIs.

> Use of DOMInputSource causes null entries in XSNamespaceItem.getDocumentLocations().
> ------------------------------------------------------------------------------------
>
>                 Key: XERCESJ-1211
>                 URL: https://issues.apache.org/jira/browse/XERCESJ-1211
>             Project: Xerces2-J
>          Issue Type: Bug
>          Components: XML Schema API
>    Affects Versions: 2.8.1
>         Environment: Linux.
>            Reporter: Chris Simmons
>            Assignee: Michael Glavassevich
>            Priority: Minor
>         Attachments: NullSchemaLocations.zip
>
>
> I've written a test which I will shortly attach where I load a schema grammar using DOMInputSource.  The resulting schema grammar's document locations list contains a null entry.
> I think this is due to the different code path followed when using dom inputs.  The normal path loads the schema from a stream and hits the following code in XSDHandler.getSchemaDocument():-
>                 // now we need to store the mapping information from system id
>                 // to the document. also from the document to the system id.
>                 if (key != null)
>                     fTraversed.put(key, schemaElement );
>                 if (schemaId != null)
>                     fDoc2SystemId.put(schemaElement, schemaId );
>                 fLastSchemaWasDuplicate = false;
>                 return schemaElement;
> The document isn't being put in fDoc2SystemId when using DOMInputSource.  Perhaps it would be more robust if XSDHandler was responsible for dealing with dom inputs, and just directly used the dom when it normally parses the XML?
> I need the document locations field in order to figure out which documents a schema grammar depends upon, in case some are modified or reloaded.

-- 
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