forked from doctrine-extensions/DoctrineExtensions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdoctrine-extensions-mapping-2-1.xsd
166 lines (145 loc) · 6.91 KB
/
doctrine-extensions-mapping-2-1.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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://gediminasm.org/schemas/orm/doctrine-extensions-mapping"
xmlns:gedmo="http://gediminasm.org/schemas/orm/doctrine-extensions-mapping"
elementFormDefault="qualified">
<xs:annotation>
<xs:documentation><![CDATA[
This is the XML Schema for the object/relational
mapping file used by the Doctrine Extensions by Gedmo
extensions
Doctrine component version support: 2.1.x
]]></xs:documentation>
</xs:annotation>
<!--
It would be nice if we could force the gedmo with only necessary elements into each of doctrine elements.
Patches that do that are more than welcome.
Please note, that marking e.g filed element in xml document with xsi:type is not an option as we need to allow other
people to push their own additional attributes/elements into the same field element and they should not extend our schema
-->
<!--
<xs:complexType name="entity-extension">
<xs:sequence>
<xs:element name="translation" type="gedmo:translation" minOccurs="0" maxOccurs="1" />
<xs:element name="tree" type="gedmo:tree" minOccurs="0" maxOccurs="1" />
<xs:element name="tree-closure" type="gedmo:tree-closure" minOccurs="0" maxOccurs="1" />
<xs:element name="loggable" type="gedmo:loggable" minOccurs="0" maxOccurs="1" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="field-extension">
<xs:sequence>
<xs:element name="sluggable" type="gedmo:sluggable" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="slug" type="gedmo:slug" minOccurs="0" maxOccurs="1"/>
<xs:element name="translatable" type="gedmo:emptyType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="timestampable" type="gedmo:timestampable" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="versioned" type="gedmo:emptyType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="tree-left" type="gedmo:emptyType" minOccurs="0" maxOccurs="1"/>
<xs:element name="tree-right" type="gedmo:emptyType" minOccurs="0" maxOccurs="1"/>
<xs:element name="tree-level" type="gedmo:emptyType" minOccurs="0" maxOccurs="1"/>
<xs:element name="tree-root" type="gedmo:emptyType" minOccurs="0" maxOccurs="1"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="many-to-one-extension">
<xs:sequence>
<xs:element name="versioned" type="gedmo:emptyType" minOccurs="0" maxOccurs="1"/>
<xs:element name="tree-parent" type="gedmo:emptyType" minOccurs="0" maxOccurs="1"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="one-to-one-extension">
<xs:sequence>
<xs:element name="versioned" type="gedmo:emptyType" minOccurs="0" maxOccurs="1"/>
<xs:element name="tree-parent" type="gedmo:emptyType" minOccurs="0" maxOccurs="1"/>
</xs:sequence>
</xs:complexType>
-->
<!-- because of the above we have for now a root element gedmo with all choices -->
<!-- entity -->
<xs:element name="translation" type="gedmo:translation"/>
<xs:element name="tree" type="gedmo:tree"/>
<xs:element name="tree-closure" type="gedmo:tree-closure"/>
<xs:element name="loggable" type="gedmo:loggable"/>
<!-- field -->
<xs:element name="sluggable" type="gedmo:sluggable"/>
<xs:element name="slug" type="gedmo:slug"/>
<xs:element name="translatable" type="gedmo:translatable"/>
<xs:element name="timestampable" type="gedmo:timestampable"/>
<xs:element name="blameable" type="gedmo:blameable"/>
<xs:element name="ip-traceable" type="gedmo:ip-traceable"/>
<xs:element name="versioned" type="gedmo:emptyType"/>
<xs:element name="tree-left" type="gedmo:emptyType"/>
<xs:element name="tree-right" type="gedmo:emptyType"/>
<xs:element name="tree-level" type="gedmo:emptyType"/>
<xs:element name="tree-root" type="gedmo:emptyType"/>
<!-- many-to-one -->
<!-- xs:element name="versioned" type="gedmo:emptyType"/-->
<xs:element name="tree-parent" type="gedmo:emptyType"/>
<!-- one-to-one -->
<!-- same as many-to-one
<xs:element name="versioned" type="gedmo:emptyType"/>
<xs:element name="tree-parent" type="gedmo:emptyType"/>
-->
<xs:complexType name="translation">
<xs:attribute name="entity" type="xs:string" use="optional" />
<xs:attribute name="locale" type="xs:string" use="optional" />
<xs:attribute name="language" type="xs:string" use="optional" />
</xs:complexType>
<xs:complexType name="tree">
<xs:attribute name="type" type="gedmo:tree-type" default="nested" />
</xs:complexType>
<xs:complexType name="tree-closure">
<xs:attribute name="class" type="xs:string" use="required" />
</xs:complexType>
<xs:complexType name="loggable">
<xs:attribute name="log-entry-class" type="xs:string" use="optional" />
</xs:complexType>
<xs:complexType name="sluggable">
<xs:attribute name="position" type="xs:integer" use="optional" />
<xs:attribute name="slugField" type="xs:string" use="optional" />
</xs:complexType>
<xs:complexType name="slug">
<xs:attribute name="unique" type="xs:boolean" use="optional" />
<xs:attribute name="updatable" type="xs:boolean" use="optional" />
<xs:attribute name="separator" type="xs:string" use="optional" />
<xs:attribute name="style" type="gedmo:slug-style" use="optional" />
</xs:complexType>
<xs:complexType name="timestampable">
<xs:attribute name="on" type="gedmo:timestampable-action" use="optional" />
<xs:attribute name="field" type="xs:string" use="optional" />
<xs:attribute name="value" type="xs:string" use="optional" />
</xs:complexType>
<xs:complexType name="blameable">
<xs:attribute name="on" type="gedmo:timestampable-action" use="optional" />
<xs:attribute name="field" type="xs:string" use="optional" />
<xs:attribute name="value" type="xs:string" use="optional" />
</xs:complexType>
<xs:complexType name="ip-traceable">
<xs:attribute name="on" type="gedmo:timestampable-action" use="optional" />
<xs:attribute name="field" type="xs:string" use="optional" />
<xs:attribute name="value" type="xs:string" use="optional" />
</xs:complexType>
<xs:complexType name="translatable">
<xs:attribute name="fallback" type="xs:boolean" use="optional" />
</xs:complexType>
<xs:complexType name="emptyType">
</xs:complexType>
<xs:simpleType name="tree-type">
<xs:restriction base="xs:token">
<xs:enumeration value="nested"/>
<xs:enumeration value="closure"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="slug-style">
<xs:restriction base="xs:token">
<xs:enumeration value="default"/>
<xs:enumeration value="camel"/>
<xs:enumeration value="upper"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="timestampable-action">
<xs:restriction base="xs:token">
<xs:enumeration value="create"/>
<xs:enumeration value="update"/>
<xs:enumeration value="change"/>
</xs:restriction>
</xs:simpleType>
</xs:schema>