-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathquery.xsd
106 lines (106 loc) · 4.95 KB
/
query.xsd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright 2021 Adobe
* All Rights Reserved.
*
* NOTICE: All information contained herein is, and remains
* the property of Adobe and its suppliers, if any. The intellectual
* and technical concepts contained herein are proprietary to Adobe
* and its suppliers and are protected by all applicable intellectual
* property laws, including trade secret and copyright laws.
* Dissemination of this information or reproduction of this material
* is strictly forbidden unless prior written permission is obtained
* from Adobe.
*/
-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="config">
<xs:complexType>
<xs:sequence>
<xs:element name="query" type="reportDeclaration" minOccurs="0" maxOccurs="unbounded" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:complexType name="reportDeclaration">
<xs:sequence>
<xs:element name="source" type="sourceDeclaration" minOccurs="1" maxOccurs="1" />
<xs:any minOccurs="0"/>
</xs:sequence>
<xs:attribute name="name" type="xs:string" use="required"/>
<xs:attribute name="connection" type="xs:string"/>
<xs:attribute name="iterator" type="xs:string"/>
</xs:complexType>
<xs:complexType name="sourceDeclaration">
<xs:choice minOccurs="1" maxOccurs="unbounded">
<xs:element name="attribute" type="attributeDeclaration" minOccurs="1" maxOccurs="unbounded" />
<xs:element name="link-source" type="linkSourceDeclaration" minOccurs="0" maxOccurs="61" />
<xs:element name="filter" type="filterDeclaration" minOccurs="0" maxOccurs="unbounded" />
</xs:choice>
<xs:attribute name="name" type="xs:string" use="required"/>
<xs:attribute name="alias" type="xs:string"/>
</xs:complexType>
<xs:complexType name="linkSourceDeclaration">
<xs:choice minOccurs="1" maxOccurs="unbounded">
<xs:element name="attribute" type="attributeDeclaration" minOccurs="0" maxOccurs="unbounded" />
<xs:element name="filter" type="filterDeclaration" minOccurs="0" maxOccurs="unbounded" />
<xs:element name="using" type="filterDeclaration" minOccurs="1" maxOccurs="unbounded" />
</xs:choice>
<xs:attribute name="name" type="xs:string" use="required"/>
<xs:attribute name="alias" type="xs:string"/>
<xs:attribute name="link-type" type="xs:string"/>
</xs:complexType>
<xs:complexType name="attributeDeclaration">
<xs:attribute name="name" type="xs:string" use="required"/>
<xs:attribute name="alias" type="xs:string"/>
<xs:attribute name="function" type="functionDeclaration"/>
<xs:attribute name="group" type="xs:boolean" default="false"/>
<xs:attribute name="sort" type="sortDeclaration" default="asc"/>
<xs:attribute name="distinct" type="xs:boolean" default="false"/>
</xs:complexType>
<xs:complexType name="filterDeclaration">
<xs:choice minOccurs="1" maxOccurs="unbounded">
<xs:element name="filter" type="filterDeclaration" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="condition" type="conditionDeclaration" minOccurs="1" maxOccurs="unbounded" />
</xs:choice>
<xs:attribute name="glue" type="glueType" default="and" />
</xs:complexType>
<xs:complexType name="conditionDeclaration" mixed="true">
<xs:attribute name="attribute" type="xs:string" use="required" />
<xs:attribute name="operator" type="xs:string" use="required" />
<xs:attribute name="type" type="valueType" default="value" />
</xs:complexType>
<xs:simpleType name="valueType">
<xs:restriction base="xs:string">
<xs:enumeration value="value" />
<xs:enumeration value="variable" />
<xs:enumeration value="placeholder" />
<xs:enumeration value="identifier" />
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="functionDeclaration">
<xs:restriction base="xs:string">
<xs:enumeration value="count" />
<xs:enumeration value="lower" />
<xs:enumeration value="date" />
<xs:enumeration value="sum" />
<xs:enumeration value="max" />
<xs:enumeration value="avg" />
<xs:enumeration value="min" />
<xs:enumeration value="sha1" />
<xs:enumeration value="replace_slash_with_comma" />
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="sortDeclaration">
<xs:restriction base="xs:string">
<xs:enumeration value="asc" />
<xs:enumeration value="desc" />
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="glueType">
<xs:restriction base="xs:string">
<xs:enumeration value="and" />
<xs:enumeration value="or" />
</xs:restriction>
</xs:simpleType>
</xs:schema>