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:45:37 UTC

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

     [ 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