> XML Schema gurus-
Not really, at least not me :)

> I have the Schema Catalogue.xsd and an instance of it
> Catalogue.xml. The validator gives the below error , 
> eventhough i have defined And , match elements in the
> schema. Please help me.
I didn't get the point of your schema (with those abstract 
declarations), so I wrote it new my style. Works fine with 
Xerces-J 1.3.1

Catalogue.xml
-------------------
<?xml version="1.0" encoding="UTF-8" ?> 
 <Search xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance";
         xsi:noNamespaceSchemaLocation="Catalogue.xsd">
  <And> 
   <match property="CONTENT" value="transmembrane" /> 
   <match property="CONTENT" value="HUMINSR" /> 
  </And> 
 </Search>

Catalogue.xsd
------------
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2000/10/XMLSchema";>

<xsd:element name="Search">
 <xsd:complexType>
  <xsd:sequence>
   <xsd:element name="And" type="And"/>
  </xsd:sequence>
 </xsd:complexType>
</xsd:element>

<xsd:complexType name="And">
 <xsd:sequence>
  <xsd:element name="match" maxOccurs="unbounded">
   <xsd:complexType>
    <xsd:attribute name="property">
     <xsd:simpleType>
      <xsd:restriction base="xsd:string">
       <xsd:enumeration value="CONTENT"/> 
      </xsd:restriction> 
     </xsd:simpleType> 
    </xsd:attribute> 
    <xsd:attribute name="value">
     <xsd:simpleType>
      <xsd:restriction base="xsd:string">
       <xsd:enumeration value="transmembrane"/> 
       <xsd:enumeration value="HUMINSR"/> 
      </xsd:restriction> 
     </xsd:simpleType> 
    </xsd:attribute> 
   </xsd:complexType>
  </xsd:element>
 </xsd:sequence>
</xsd:complexType>
</xsd:schema>

Regards.

--
Bjoern Martin                                [EMAIL PROTECTED]



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

Reply via email to