MessageChecker.xsd 4.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  3. <xs:complexType name="FieldValue">
  4. <xs:annotation><xs:documentation>A field that contains a value</xs:documentation></xs:annotation>
  5. <xs:attribute name="name" type="xs:string" use="required" />
  6. <xs:attribute name="value" type="xs:string" use="required" />
  7. <xs:attribute name="type" type="xs:string" use="optional" />
  8. </xs:complexType>
  9. <!-- array contains values -->
  10. <xs:complexType name="FieldValueInArray">
  11. <xs:annotation><xs:documentation>A field that is a value in an array</xs:documentation></xs:annotation>
  12. <xs:attribute name="name" type="xs:string" use="required" />
  13. <xs:attribute name="index" type="xs:unsignedByte" use="required" />
  14. <xs:attribute name="value" type="xs:string" use="required" />
  15. <xs:attribute name="size" type="xs:unsignedByte" use="optional" />
  16. <xs:attribute name="type" type="xs:string" use="optional" />
  17. </xs:complexType>
  18. <!-- array -->
  19. <xs:complexType name="FieldArray">
  20. <xs:annotation><xs:documentation>A field that contains an array</xs:documentation></xs:annotation>
  21. <xs:attribute name="name" type="xs:string" use="required" />
  22. <xs:attribute name="size" type="xs:unsignedByte" use="required" />
  23. <xs:attribute name="type" type="xs:string" use="optional" />
  24. </xs:complexType>
  25. <!-- field contains an object -->
  26. <xs:complexType name="FieldObject">
  27. <xs:annotation><xs:documentation>A field that contains an object</xs:documentation></xs:annotation>
  28. <xs:sequence minOccurs="1" maxOccurs="unbounded">
  29. <xs:choice>
  30. <xs:element name="fieldArray" type="FieldArray"/>
  31. <xs:element name="fieldValue" type="FieldValue"/>
  32. <xs:element name="fieldValueInArray" type="FieldValueInArray"/>
  33. <xs:element name="fieldObject" type="FieldObject"/>
  34. <xs:element name="fieldObjectInArray" type="FieldObjectInArray"/>
  35. </xs:choice>
  36. </xs:sequence>
  37. <xs:attribute name="name" type="xs:string" use="required" />
  38. <xs:attribute name="type" type="xs:string" use="optional" />
  39. </xs:complexType>
  40. <!-- array that contains an object -->
  41. <xs:complexType name="FieldObjectInArray">
  42. <xs:annotation><xs:documentation>A field that is an object in an array</xs:documentation></xs:annotation>
  43. <xs:sequence minOccurs="1" maxOccurs="unbounded">
  44. <xs:choice>
  45. <xs:element name="fieldArray" type="FieldArray"/>
  46. <xs:element name="fieldValue" type="FieldValue"/>
  47. <xs:element name="fieldValueInArray" type="FieldValueInArray"/>
  48. <xs:element name="fieldObject" type="FieldObject"/>
  49. <xs:element name="fieldObjectInArray" type="FieldObjectInArray"/>
  50. </xs:choice>
  51. </xs:sequence>
  52. <xs:attribute name="name" type="xs:string" use="required" />
  53. <xs:attribute name="index" type="xs:unsignedByte" use="required" />
  54. <xs:attribute name="size" type="xs:unsignedByte" use="optional" />
  55. <xs:attribute name="type" type="xs:string" use="optional" />
  56. </xs:complexType>
  57. <!-- message -->
  58. <xs:complexType name="Message">
  59. <xs:annotation><xs:documentation>A message that contains fields to check</xs:documentation></xs:annotation>
  60. <xs:sequence minOccurs="0" maxOccurs="unbounded">
  61. <xs:choice>
  62. <xs:element name="fieldArray" type="FieldArray"/>
  63. <xs:element name="fieldValue" type="FieldValue"/>
  64. <xs:element name="fieldValueInArray" type="FieldValueInArray"/>
  65. <xs:element name="fieldObject" type="FieldObject"/>
  66. <xs:element name="fieldObjectInArray" type="FieldObjectInArray"/>
  67. </xs:choice>
  68. </xs:sequence>
  69. <xs:attribute name="occurence" type="xs:unsignedByte" use="required" />
  70. </xs:complexType>
  71. <!-- Root element -->
  72. <xs:complexType name="Checker">
  73. <xs:annotation><xs:documentation>The root element that contains messages to check</xs:documentation></xs:annotation>
  74. <xs:sequence minOccurs="0" maxOccurs="unbounded">
  75. <xs:element name="message" type="Message"/>
  76. </xs:sequence>
  77. </xs:complexType>
  78. <xs:element name="checker" type="Checker"/>
  79. </xs:schema>