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 bu...@apache.org on 2003/03/13 15:14:46 UTC

DO NOT REPLY [Bug 17951] - Validator not recognizing root level XML element

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17951>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17951

Validator not recognizing root level XML element

sandygao@ca.ibm.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID



------- Additional Comments From sandygao@ca.ibm.com  2003-03-13 14:14 -------
(If you are using org.apache.xerces.util.XMLGrammarPoolImpl) the grammars are 
stored in a hashtable keyed on the namespace, so only one schema (SchemaGrammar 
object) will be reteived from the grammar pool.

The reason there is no error for the rest of the document is that, because the 
parser couldn't find a decalration for the root element, it uses anyType to 
perform lax assessment (allowed by the schema spec).

If all the schemas (with the same target namespace) are meant to be used, you 
should have a root schema document that includes all of them, and only put the 
root schema in the grammar pool.

If you just want to use one of the schemas, and the schemas *have to* have the 
same target namespace, then you need to implement you own grammar pool that 
knows which one to return when a grammar is asked.

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