[ 
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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to