schema: add edit-locked and selected
[openraster:openraster-standard-achadwick.git] / schema.rng
1 <?xml version="1.0" encoding="UTF-8"?>
2 <grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
3   <start>
4     <element name="image">
5       <attribute name="w">
6         <data type="int"/>
7       </attribute>
8       <attribute name="h">
9         <data type="int"/>
10       </attribute>
11       <optional>
12         <attribute name="name"/>
13       </optional>
14       <ref name="stackContent"/>
15     </element>
16   </start>
17   <define name="stackContent">
18     <element name="stack">
19       <ref name="layerCommonAttributes"/>
20       <oneOrMore>
21         <ref name="stackContent"/>
22         <ref name="layerContent"/>
23         <ref name="filterContent"/>
24         <ref name="textContent"/>
25       </oneOrMore>
26     </element>
27   </define>
28   <define name="layerContent">
29     <element name="layer">
30       <ref name="layerCommonAttributes"/>
31       <attribute name="src"/>
32       <optional>
33         <attribute name="composite-op"/>
34       </optional>
35       <optional>
36         <attribute name="opacity">
37           <data type="float"/>
38         </attribute>
39       </optional>
40       <optional>
41         <attribute name="edit-locked">
42           <data type="boolean"/>
43         </attribute>
44       </optional>
45       <optional>
46         <attribute name="selected">
47           <data type="boolean"/>
48         </attribute>
49       </optional>
50       <element name="filters">
51         <oneOrMore>
52           <ref name="filterContent"/>
53         </oneOrMore>
54       </element>
55     </element>
56   </define>
57   <define name="filterContent">
58     <element name="filter">
59       <ref name="layerCommonAttributes"/>
60       <attribute name="type"/>
61       <attribute name="output"/>
62       <ref name="paramsContent"/>
63       <ref name="stackContent"/>
64     </element>
65   </define>
66   <define name="textContent">
67     <element name="text">
68       <ref name="layerCommonAttributes"/>
69       <text/>
70     </element>
71   </define>
72   <define name="positionAttributes">
73     <optional>
74       <attribute name="x">
75         <data type="int"/>
76       </attribute>
77     </optional>
78     <optional>
79       <attribute name="y">
80         <data type="int"/>
81       </attribute>
82     </optional>
83   </define>
84   <define name="layerCommonAttributes">
85     <ref name="positionAttributes"/>
86     <optional>
87       <attribute name="name"/>
88     </optional>
89   </define>
90   <define name="paramsContent">
91     <element name="params">
92       <attribute name="version">
93         <data type="int"/>
94       </attribute>
95       <oneOrMore>
96         <element name="param">
97           <attribute name="name"/>
98           <choice>
99             <text/>
100             <data type="int"/>
101           </choice>
102         </element>
103       </oneOrMore>
104     </element>
105   </define>
106 </grammar>