summaryrefslogtreecommitdiff
path: root/officecfg/registry/component-types.xsd
blob: 9b2f2371ce2f98db0b420a6179ff91586820fd4b (plain)
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
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema targetNamespace="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:oor="http://openoffice.org/2001/registry" elementFormDefault="unqualified" attributeFormDefault="qualified">
  <xs:annotation>
    <xs:documentation>provides a list of standard attribute and element definitions, reused in most parts of the different OOR document types</xs:documentation>
  </xs:annotation>
    <xs:import namespace="http://www.w3.org/XML/1998/namespace" 
   schemaLocation="http://www.w3.org/2001/xml.xsd"/>
  <!--List of attributes known in OOR-->
  <xs:attribute name="name" type="xs:string" use="required">
    <xs:annotation>
      <xs:documentation>identifies a node or an attribute within a tree, must be unique for all siblings.</xs:documentation>
    </xs:annotation>
  </xs:attribute>
  <xs:attribute name="package" type="xs:NMTOKEN" use="required">
    <xs:annotation>
      <xs:documentation>contains the name of the package. 
                Package names are composed similar to java packages. 
                Packages are used to structure component configuration data. 
                An example of a package is 'org.openoffice', 
                where 'org' and 'openoffice' each define a package.</xs:documentation>
    </xs:annotation>
  </xs:attribute>
  <xs:attribute name="node-type" type="xs:NMTOKEN">
    <xs:annotation>
      <xs:documentation>identifies the template to use for the set or a node reference. </xs:documentation>
    </xs:annotation>
  </xs:attribute>
  <xs:attribute name="component" type="xs:string" use="optional">
    <xs:annotation>
      <xs:documentation>specifies the component, which contains a template definition</xs:documentation>
    </xs:annotation>
  </xs:attribute>
 <xs:attribute name="separator" type="xs:string" default=" ">
    <xs:annotation>
      <xs:documentation>specifies a separator for list types. The default
			is a blank, which is sufficient for most basic types like xs:int or
			xs:boolean. Only in certain cases, when using a sting or a binary
			list, the separator might differ. For example, a list of string values like build of the items 'europe' and 'south america' needs a different separator, as the usage of the default separator would result in a list of three items.</xs:documentation>
    </xs:annotation>
  </xs:attribute>
 <xs:attribute name="type" use="optional">
    <xs:annotation>
      <xs:documentation>specifies the list of known basic types and their list equivalents. Is only allowed for properties.</xs:documentation>
    </xs:annotation>
    <xs:simpleType>
      <xs:restriction base="xs:string">
        <xs:enumeration value="xs:boolean"/>
        <xs:enumeration value="xs:short"/>
        <xs:enumeration value="xs:int"/>
        <xs:enumeration value="xs:long"/>
        <xs:enumeration value="xs:double"/>
        <xs:enumeration value="xs:string"/>
        <xs:enumeration value="xs:hexBinary"/>
        <xs:enumeration value="oor:any"/>
        <xs:enumeration value="oor:boolean-list"/>
        <xs:enumeration value="oor:short-list"/>
        <xs:enumeration value="oor:int-list"/>
        <xs:enumeration value="oor:long-list"/>
        <xs:enumeration value="oor:double-list"/>
        <xs:enumeration value="oor:string-list"/>
        <xs:enumeration value="oor:hexBinary-list"/>
      </xs:restriction>
    </xs:simpleType>
  </xs:attribute>
  <xs:attributeGroup name="node-info">
    <xs:annotation>
      <xs:documentation>encompasses common attributes for nodes.</xs:documentation>
    </xs:annotation>
    <xs:attribute ref="oor:name" use="required"/>
  </xs:attributeGroup>
  <xs:attributeGroup name="node-type-info">
    <xs:annotation>
      <xs:documentation>encompasses attributes for referencing a node-type.</xs:documentation>
    </xs:annotation>
    <xs:attribute ref="oor:node-type" use="required"/>
    <xs:attribute ref="oor:component" use="optional"/>
  </xs:attributeGroup>
  <xs:attributeGroup name="prop-info">
    <xs:annotation>
      <xs:documentation>encompasses common attributes for properties.</xs:documentation>
    </xs:annotation>
    <xs:attribute ref="oor:name" use="required"/>
  </xs:attributeGroup>
  <!--List of list data types supported by OOR-->
  <xs:simpleType name="boolean-list">
    <xs:list itemType="xs:boolean"/>
  </xs:simpleType>
  <xs:simpleType name="short-list">
    <xs:list itemType="xs:short"/>
  </xs:simpleType>
  <xs:simpleType name="int-list">
    <xs:list itemType="xs:int"/>
  </xs:simpleType>
  <xs:simpleType name="long-list">
    <xs:list itemType="xs:long"/>
  </xs:simpleType>
  <xs:simpleType name="double-list">
    <xs:list itemType="xs:double"/>
  </xs:simpleType>
  <xs:simpleType name="string-list">
    <xs:restriction base="xs:string"/>
  </xs:simpleType>
  <xs:simpleType name="hexBinary-list">
    <xs:restriction base="xs:string"/>
  </xs:simpleType>
  <!--List of basic type definitions for all schema and instance elements known by OOR-->
  <xs:complexType name="basic-node">
    <xs:annotation>
      <xs:documentation>base class for all kinds of nodes (set | group)</xs:documentation>
    </xs:annotation>
    <xs:attributeGroup ref="oor:node-info"/>
  </xs:complexType>
  <xs:complexType name="basic-prop">
    <xs:annotation>
      <xs:documentation>type definition for node properties</xs:documentation>
    </xs:annotation>
    <xs:attributeGroup ref="oor:prop-info"/>
  </xs:complexType>
  <xs:complexType name="value">
    <xs:annotation>
      <xs:documentation>type definition for value nodes.</xs:documentation>
    </xs:annotation>
    <xs:simpleContent>
      <xs:extension base="oor:anyValue">
        <xs:attribute ref="oor:separator" use="optional"/>
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>
  <xs:simpleType name="anyValue">
    <xs:annotation>
      <xs:documentation>defines the list of possible basic data-types for properties.</xs:documentation>
    </xs:annotation>
    <xs:union memberTypes="xs:boolean xs:short xs:int xs:long xs:double xs:string xs:hexBinary oor:boolean-list oor:short-list oor:int-list oor:long-list oor:double-list oor:string-list oor:hexBinary-list"/>
  </xs:simpleType>
</xs:schema>