Details
-
Bug
-
Status: Resolved
-
Resolution: Incomplete
-
2.3.0
-
None
-
None
-
Operating System: Windows XP
Platform: PC
-
17951
Description
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'
- Error, line 3, uri file:///c:/Documents%20and%20Settings/Devasis%
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.