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: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


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

Reply via email to