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 11:28:54 UTC

DO NOT REPLY [Bug 17951] New: - 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

           Summary: Validator not recognizing root level XML element
           Product: Xerces2-J
           Version: 2.3.0
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: Major
          Priority: Other
         Component: XNI
        AssignedTo: xerces-j-dev@xml.apache.org
        ReportedBy: dbassu@research.telcordia.com


I have a XMLGrammarPool in which I store all my schemas - each schema has the 
same targetNamespace. Whenever I try to validate any XML instance (using SAX 
or DOM implementations), I get the following type of error...

** Error, line 3, uri file:///c:/Documents%20and%20Settings/Devasis%
20Bassu/Desktop/ELMS6/messageSpecs/ADDRESS_VALIDATION_OUTPUT.xml
   cvc-elt.1: Cannot find the declaration of 
element 'ADDRESS_VALIDATION_OUTPUT'

Here, ADDRESS_VALIDATION_OUTPUT is the root level element of the XML document -
 this happens for all the root level elements...

The XML instance doc:
<?xml version="1.0" encoding="UTF-8"?>
<ADDRESS_VALIDATION_OUTPUT xmlns="http://www.telcordia.com"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:
schemaLocation="http://www.telcordia.com ADDRESS_VALIDATION_OUTPUT.xsd" 
version="ELMS6_ADDRESS_VALIDATION_OUTPUT_v1-0">
...

The XML Schema doc:
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema targetNamespace="http://www.telcordia.com" xmlns:
xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.telcordia.com" 
elementFormDefault="qualified" attributeFormDefault="unqualified">
 <xsd:element name="ADDRESS_VALIDATION_OUTPUT">
   <xsd:complexType>
     <xsd:all>
...

Oddly enough, it seems to understand the rest of the document and validates 
everything else properly.

Note: Full-checking is turned on.

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