add the schemas to the distribution
[dana/openbox.git] / data / menu.xsd
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3      xml Schema for the openbox windowmanager menu file
4
5      Changes:
6      Don Aug 14 21:10:27 CEST 2003 - pch(a)myzel.net
7          split from rc3.xsd
8      Mon Sep  8 12:33:57 CEST 2003 - pch(a)myzel.net
9          up to beta1
10      Die Sep 16 21:22:59 CEST 2003 - pch(a)myzel.net
11          use a namespace
12      Fri Sep 19 14:36:33 EDT 2003 - xor(a)orodu.net
13          use openbox.org for namespace
14 -->
15 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
16     targetNamespace="http://openbox.org/"
17     xmlns:ob="http://openbox.org/"
18     elementFormDefault="qualified">
19     <!--
20          root node
21       -->
22     <xs:element name="openbox_menu">
23         <xs:complexType mixed="false">
24             <xs:sequence maxOccurs="unbounded" minOccurs="1">
25                 <xs:element name="menu" type="ob:menu"/>
26             </xs:sequence>
27         </xs:complexType>
28     </xs:element>
29     <!--
30          complex types
31       -->
32     <xs:complexType name="menu">
33         <xs:choice maxOccurs="unbounded" minOccurs="0">
34             <xs:element maxOccurs="unbounded" minOccurs="0" name="menu" type="ob:menu"/>
35             <xs:element maxOccurs="unbounded" minOccurs="0" name="item" type="ob:item"/>
36             <xs:element maxOccurs="unbounded" minOccurs="0" name="separator" type="ob:empty"/>
37         </xs:choice>
38         <xs:attribute name="label" type="xs:string" use="optional"/>
39         <xs:attribute name="id" type="xs:string" use="required"/>
40     </xs:complexType>
41     <xs:complexType name="empty">
42         <xs:complexContent>
43             <xs:restriction base="xs:anyType"/>
44         </xs:complexContent>
45     </xs:complexType>
46     <xs:complexType name="item">
47         <xs:sequence>
48             <xs:element minOccurs="0" name="action">
49                 <xs:complexType>
50                     <xs:sequence>
51                         <xs:element minOccurs="0" name="execute" type="xs:string"/>
52                     </xs:sequence>
53                     <xs:attribute name="name" type="ob:actionname" use="required"/>
54                 </xs:complexType>
55             </xs:element>
56         </xs:sequence>
57         <xs:attribute name="label" type="xs:string" use="required"/>
58     </xs:complexType>
59     <!--
60          simple types / restrictions
61       -->
62     <xs:simpleType name="actionname">
63         <xs:restriction base="xs:string">
64             <xs:enumeration value="execute"/>
65             <xs:enumeration value="restart"/>
66             <xs:enumeration value="reconfigure"/>
67             <xs:enumeration value="exit"/>
68         </xs:restriction>
69     </xs:simpleType>
70 </xs:schema>