namespace defined in a complexType doesn't take effect
------------------------------------------------------

                 Key: XERCESC-1719
                 URL: https://issues.apache.org/jira/browse/XERCESC-1719
             Project: Xerces-C++
          Issue Type: Bug
          Components: Validating Parser (Schema) (Xerces 1.5 or up only)
    Affects Versions: 2.7.0
         Environment: Windows XP 
            Reporter: HangKong Yan


If we define a namespace in a complexType definition like this:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"; targetNamespace="MyNS" 
elementFormDefault="qualified" attributeFormDefault="unqualified">
    <xs:element name="ElemForRef" type="xs:string"/>      
    <xs:complexType name="CompType" xmlns="MyNS">
        <xs:sequence>
           <xs:element ref="ElemForRef" minOccurs="0"/>
        </xs:sequence> 
    </xs:complexType>
</xs:schema>

I think the schema file above should be valid(I tried to use XMLSpy to check, 
it's ok), but when I use XercesDOMParser::loadGrammar() to check the validity 
of this schema file, the following error info is reported:
"Schema Representation Constraint: Namespace '' is referenced without <import> 
declaration - Line 6, Col 56"
 




-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to