I have encounter the following problem when validating with xerces1.4.1
parser
Schema file:
<?xml version="1.0" ?>
<xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema'
     xmlns:tns="mynamespace"
     targetNamespace="mynamespace"
        elementFormDefault="qualified" >

<xs:element name="message" type="tns:email" />
<xs:complexType name="email" >
  <xs:sequence>
    <xs:element name="from" type="xs:string" />
    <xs:element name="to" type="xs:string" />
    <xs:any namespace="another"
        minOccurs="0" maxOccurs="unbounded" processContents="skip"/>
  </xs:sequence>
  <xs:anyAttribute/>
</xs:complexType>
</xs:schema>

Instance file:
<?xml version="1.0" ?>
<tns:message xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
           xmlns:tns="mynamespace"
                 xmlns:a="another"
                 tns:myAttribute="something"
           xsi:schemaLocation='mynamespace anyAtr.xsd' >

  <tns:from>[EMAIL PROTECTED]</tns:from>
  <tns:to>[EMAIL PROTECTED]</tns:to>
  <a:subject>Mail Down</a:subject>
  <a:some>whatever</a:some>
</tns:message>

Error message:
error: Attribute "ANY---tns:myAttribute" must be declared for element type
"tns:message". line#6 col#49

If I don't have anyAttribute line in schema at all, the error message is
(understandablely)
error: Attribute "tns:myAttribute" must be declared for element type
"tns:message". line#6 col#49

What did I miss?



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

Reply via email to