simple-filter.xml 4.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <xs:schema xmlns="urn:ietf:params:xml:ns:simple-filter" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:ietf:params:xml:ns:simple-filter" elementFormDefault="qualified">
  3. <xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd"/>
  4. <xs:annotation>
  5. <xs:documentation xml:lang="en">
  6. XML Schema Definition for Filter Criteria.
  7. </xs:documentation>
  8. </xs:annotation>
  9. <xs:element name="filter-set" type="FilterSetType"/>
  10. <xs:complexType name="FilterSetType">
  11. <xs:sequence>
  12. <xs:element name="ns-bindings" type="NSBindings" minOccurs="0" maxOccurs="1"/>
  13. <xs:element name="filter" type="FilterType" minOccurs="1" maxOccurs="unbounded"/>
  14. </xs:sequence>
  15. <xs:attribute name="package" type="xs:string" use="optional"/>
  16. </xs:complexType>
  17. <xs:complexType name="NSBindings">
  18. <xs:sequence>
  19. <xs:element name="ns-binding" type="NSBinding" minOccurs="1" maxOccurs="unbounded"/>
  20. </xs:sequence>
  21. </xs:complexType>
  22. <xs:complexType name="NSBinding">
  23. <xs:attribute name="prefix" type="xs:string" use="required"/>
  24. <xs:attribute name="urn" type="xs:anyURI" use="required"/>
  25. </xs:complexType>
  26. <xs:complexType name="FilterType">
  27. <xs:sequence>
  28. <xs:element name="what" type="WhatType" minOccurs="0" maxOccurs="1"/>
  29. <xs:element name="trigger" type="TriggerType" minOccurs="0" maxOccurs="unbounded"/>
  30. <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
  31. </xs:sequence>
  32. <xs:attribute name="id" type="xs:string" use="required"/>
  33. <xs:attribute name="uri" type="xs:anyURI" use="optional"/>
  34. <xs:attribute name="domain" type="xs:string" use="optional"/>
  35. <xs:attribute name="remove" type="xs:boolean" use="optional" default="false"/>
  36. <xs:attribute name="enabled" type="xs:boolean" use="optional" default="true"/>
  37. <xs:anyAttribute namespace="##other" processContents="lax"/>
  38. </xs:complexType>
  39. <xs:complexType name="WhatType">
  40. <xs:sequence>
  41. <xs:element name="include" type="InclType" minOccurs="0" maxOccurs="unbounded"/>
  42. <xs:element name="exclude" type="ExclType" minOccurs="0" maxOccurs="unbounded"/>
  43. <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
  44. </xs:sequence>
  45. </xs:complexType>
  46. <xs:complexType name="InclType">
  47. <xs:simpleContent>
  48. <xs:extension base="xs:string">
  49. <xs:attribute name="type" type="TypeType" default="xpath" use="optional"/>
  50. <xs:anyAttribute namespace="##other" processContents="lax"/>
  51. </xs:extension>
  52. </xs:simpleContent>
  53. </xs:complexType>
  54. <xs:complexType name="ExclType">
  55. <xs:simpleContent>
  56. <xs:extension base="xs:string">
  57. <xs:attribute name="type" type="TypeType" default="xpath" use="optional"/>
  58. <xs:anyAttribute namespace="##other" processContents="lax"/>
  59. </xs:extension>
  60. </xs:simpleContent>
  61. </xs:complexType>
  62. <xs:simpleType name="TypeType">
  63. <xs:restriction base="xs:string">
  64. <xs:enumeration value="xpath"/>
  65. <xs:enumeration value="namespace"/>
  66. </xs:restriction>
  67. </xs:simpleType>
  68. <xs:complexType name="TriggerType">
  69. <xs:sequence>
  70. <xs:element name="changed" type="ChangedType" minOccurs="0" maxOccurs="unbounded"/>
  71. <xs:element name="added" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
  72. <xs:element name="removed" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
  73. <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
  74. </xs:sequence>
  75. </xs:complexType>
  76. <xs:complexType name="ChangedType">
  77. <xs:simpleContent>
  78. <xs:extension base="xs:string">
  79. <xs:attribute name="from" type="xs:anySimpleType" use="optional"/>
  80. <xs:attribute name="to" type="xs:anySimpleType" use="optional"/>
  81. <xs:attribute name="by" type="xs:decimal" use="optional"/>
  82. <xs:anyAttribute namespace="##other" processContents="lax"/>
  83. </xs:extension>
  84. </xs:simpleContent>
  85. </xs:complexType>
  86. </xs:schema>