reports.xsd 4.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. /**
  4. * Copyright © Magento, Inc. All rights reserved.
  5. * See COPYING.txt for license details.
  6. */
  7. -->
  8. <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
  9. <xs:element name="config">
  10. <xs:complexType>
  11. <xs:sequence>
  12. <xs:element name="report" type="reportDeclaration" minOccurs="0" maxOccurs="unbounded" />
  13. </xs:sequence>
  14. </xs:complexType>
  15. </xs:element>
  16. <xs:complexType name="reportDeclaration">
  17. <xs:sequence>
  18. <xs:element name="source" type="sourceDeclaration" minOccurs="1" maxOccurs="1" />
  19. <xs:any minOccurs="0"/>
  20. </xs:sequence>
  21. <xs:attribute name="name" type="xs:string" use="required"/>
  22. <xs:attribute name="connection" type="xs:string"/>
  23. <xs:attribute name="iterator" type="xs:string"/>
  24. </xs:complexType>
  25. <xs:complexType name="sourceDeclaration">
  26. <xs:choice minOccurs="1" maxOccurs="unbounded">
  27. <xs:element name="attribute" type="attributeDeclaration" minOccurs="1" maxOccurs="unbounded" />
  28. <xs:element name="link-source" type="linkSourceDeclaration" minOccurs="0" maxOccurs="61" />
  29. <xs:element name="filter" type="filterDeclaration" minOccurs="0" maxOccurs="unbounded" />
  30. </xs:choice>
  31. <xs:attribute name="name" type="xs:string" use="required"/>
  32. <xs:attribute name="alias" type="xs:string"/>
  33. </xs:complexType>
  34. <xs:complexType name="linkSourceDeclaration">
  35. <xs:choice minOccurs="1" maxOccurs="unbounded">
  36. <xs:element name="attribute" type="attributeDeclaration" minOccurs="0" maxOccurs="unbounded" />
  37. <xs:element name="filter" type="filterDeclaration" minOccurs="0" maxOccurs="unbounded" />
  38. <xs:element name="using" type="filterDeclaration" minOccurs="1" maxOccurs="unbounded" />
  39. </xs:choice>
  40. <xs:attribute name="name" type="xs:string" use="required"/>
  41. <xs:attribute name="alias" type="xs:string"/>
  42. <xs:attribute name="link-type" type="xs:string"/>
  43. </xs:complexType>
  44. <xs:complexType name="attributeDeclaration">
  45. <xs:attribute name="name" type="xs:string" use="required"/>
  46. <xs:attribute name="alias" type="xs:string"/>
  47. <xs:attribute name="function" type="functionDeclaration"/>
  48. <xs:attribute name="group" type="xs:boolean" default="false"/>
  49. <xs:attribute name="distinct" type="xs:boolean" default="false"/>
  50. </xs:complexType>
  51. <xs:complexType name="filterDeclaration">
  52. <xs:choice minOccurs="1" maxOccurs="unbounded">
  53. <xs:element name="filter" type="filterDeclaration" minOccurs="0" maxOccurs="unbounded"/>
  54. <xs:element name="condition" type="conditionDeclaration" minOccurs="1" maxOccurs="unbounded" />
  55. </xs:choice>
  56. <xs:attribute name="glue" type="glueType" default="and" />
  57. </xs:complexType>
  58. <xs:complexType name="conditionDeclaration" mixed="true">
  59. <xs:attribute name="attribute" type="xs:string" use="required" />
  60. <xs:attribute name="operator" type="xs:string" use="required" />
  61. <xs:attribute name="type" type="valueType" default="value" />
  62. </xs:complexType>
  63. <xs:simpleType name="valueType">
  64. <xs:restriction base="xs:string">
  65. <xs:enumeration value="value" />
  66. <xs:enumeration value="variable" />
  67. <xs:enumeration value="identifier" />
  68. </xs:restriction>
  69. </xs:simpleType>
  70. <xs:simpleType name="functionDeclaration">
  71. <xs:restriction base="xs:string">
  72. <xs:enumeration value="count" />
  73. <xs:enumeration value="lower" />
  74. <xs:enumeration value="date" />
  75. <xs:enumeration value="sum" />
  76. <xs:enumeration value="max" />
  77. <xs:enumeration value="avg" />
  78. <xs:enumeration value="min" />
  79. <xs:enumeration value="sha1" />
  80. </xs:restriction>
  81. </xs:simpleType>
  82. <xs:simpleType name="glueType">
  83. <xs:restriction base="xs:string">
  84. <xs:enumeration value="and" />
  85. <xs:enumeration value="or" />
  86. </xs:restriction>
  87. </xs:simpleType>
  88. </xs:schema>