Subject: [Simple] Filtering XSD Document Problem

From: Rajesh Karunamurthy <[email-masked]>
Date: Fri, 30 Apr 2004 13:03:36 -0700 (PDT)

Hi,
 
I am using the latest draft " draft-ietf-simple-filter-format-00" for XML filtering.
 
I took the XML Schema from the document and tried to validate it, which gave the error I specified in the last mail.
 
For your reference I have copied the XML Schema in this mail.
 
Please have a look and advice me if I am missing something.
 
Thanks,
 
Rajesh
 
 XML Schema for Filter Criteria:
 
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema targetNamespace="urn:ietf:params:xml:ns:simple-filter"
    xmlns="urn:ietf:params:xml:ns:simple-filter"
    xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:import namespace="http://www.w3.org/XML/1998/namespace"
       schemaLocation="http://www.w3.org/2001/xml.xsd"/>
    <xs:annotation>
      <xs:documentation xml:lang="en">
        XML Schema Definition for Filter Criteria.
      </xs:documentation>
    </xs:annotation>
    <xs:element name="filter-set" type="FilterSetType"/>
    <xs:complexType name="FilterSetType">
      <xs:sequence>
        <xs:element name="filter" type="FilterType"
                     minOccurs="1"    maxOccurs="unbounded"/>
      </xs:sequence>
      <xs:attribute name="package" type="xs:string" use="optional"/>
    </xs:complexType>
    <xs:complexType name="FilterType">
       <xs:sequence>
           <xs:element name="what" type="WhatType" minOccurs="0" maxOccurs="1"/>
           <xs:element name="trigger" type="TriggerType" minOccurs="0" maxOccurs="unbounded"/>
       </xs:sequence>
       <xs:attribute name="id"  type="xs:string" use="required"/>
       <xs:attribute name="uri" type="xs:anyURI" use="optional"/>
       <xs:attribute name="remove" type="xs:boolean" default="false" use="optional"/>
       <xs:anyAttribute namespace="##other" processContents="lax"/>
    </xs:complexType>
      <xs:complexType name="WhatType">
         <xs:sequence>
             <xs:element name="include" type="InclType" minOccurs="1" maxOccurs="unbounded"/>
             <xs:element name="exclude" type="ExclType" minOccurs="0" maxOccurs="unbounded"/>
         </xs:sequence>
      </xs:complexType>
      <xs:complexType name="InclType">
         <xs:simpleContent>
          <xs:extension base="xs:string">
           <xs:attribute name="type" type="TypeType" default="xml-element" use="optional"/>
           <xs:anyAttribute namespace="##other" processContents="lax"/>
          </xs:extension>
         </xs:simpleContent>
</xs:complexType>
      <xs:complexType name="ExclType">
         <xs:simpleContent>
          <xs:extension base="xs:string">
           <xs:attribute name="type" type="TypeType" default="xml-element" use="optional"/>
           <xs:anyAttribute namespace="##other" processContents="lax"/>
          </xs:extension>
         </xs:simpleContent>
      </xs:complexType>
      <xs:simpleType name="TypeType">
         <xs:restriction base="xs:string">
     <xs:enumeration value="xml-element"/>
     <xs:enumeration value="namespace"/>
     <xs:enumeration value="token"/>
         </xs:restriction>
      </xs:simpleType>

    <xs:complexType name="TriggerType">
       <xs:sequence>
           <xs:element name="changed" type="ChangedType" minOccurs="0" maxOccurs="unbounded"/>
           <xs:element name="added" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
           <xs:element name="removed" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
     <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
       </xs:sequence>
    </xs:complexType>
     <xs:complexType name="ChangedType">
        <xs:simpleContent>
            <xs:extension base="xs:string">
               <xs:attribute name="changed-from" type="xs:anySimpleType" use="optional"/>
               <xs:attribute name="changed-to" type="xs:anySimpleType" use="optional"/>
               <xs:attribute name="changed-by" type="xs:decimal" use="optional"/>
        <xs:anyAttribute namespace="##other" processContents="lax"/>
            </xs:extension>
        </xs:simpleContent>
     </xs:complexType>
   </xs:schema>

---------------------------------
Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs