summaryrefslogtreecommitdiffstats
path: root/schemas
diff options
context:
space:
mode:
Diffstat (limited to 'schemas')
-rw-r--r--schemas/metadata.xsd6
-rw-r--r--schemas/xinclude.xsd41
2 files changed, 46 insertions, 1 deletions
diff --git a/schemas/metadata.xsd b/schemas/metadata.xsd
index 7d07c4971..58f9e8029 100644
--- a/schemas/metadata.xsd
+++ b/schemas/metadata.xsd
@@ -1,4 +1,5 @@
-<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xml:lang="en">
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:xi="http://www.w3.org/2001/XInclude" xml:lang="en">
<xsd:annotation>
<xsd:documentation>
@@ -10,6 +11,8 @@
<xsd:import namespace="http://www.w3.org/XML/1998/namespace"
schemaLocation="xml.xsd"/>
+ <xsd:import namespace="http://www.w3.org/2001/XInclude"
+ schemaLocation="xinclude.xsd"/>
<xsd:complexType name='groupType'>
<xsd:choice minOccurs='0' maxOccurs='unbounded'>
@@ -37,6 +40,7 @@
<xsd:choice minOccurs='0' maxOccurs='unbounded'>
<xsd:element name='Group' type='groupType'/>
<xsd:element name='Groups' type='groupsType'/>
+ <xsd:element ref="xi:include"/>
</xsd:choice>
<xsd:attribute name='version' type='xsd:string'/>
<xsd:attribute name='origin' type='xsd:string'/>
diff --git a/schemas/xinclude.xsd b/schemas/xinclude.xsd
new file mode 100644
index 000000000..de58df4e0
--- /dev/null
+++ b/schemas/xinclude.xsd
@@ -0,0 +1,41 @@
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:xi="http://www.w3.org/2001/XInclude"
+ targetNamespace="http://www.w3.org/2001/XInclude"
+ finalDefault="extension">
+ <xs:annotation>
+ <xs:documentation>
+ The official XInclude XML Schema document is not normative or
+ deterministic. This schema implements only the features of
+ XInclude that are used in Bcfg2 in a manner that is deterministic
+ (i.e., passes XML validation).
+ </xs:documentation>
+ </xs:annotation>
+
+ <xs:element name="include" type="xi:includeType" />
+ <xs:complexType name="includeType" mixed="true">
+ <xs:choice minOccurs="0" maxOccurs="unbounded" >
+ <xs:element ref="xi:fallback" />
+ </xs:choice>
+ <xs:attribute name="href" use="optional" type="xs:anyURI"/>
+ <xs:attribute name="parse" use="optional" default="xml"
+ type="xi:parseType" />
+ <xs:attribute name="xpointer" use="optional" type="xs:string"/>
+ <xs:attribute name="encoding" use="optional" type="xs:string"/>
+ <xs:attribute name="accept" use="optional" type="xs:string"/>
+ <xs:attribute name="accept-language" use="optional" type="xs:string"/>
+ </xs:complexType>
+
+ <xs:simpleType name="parseType">
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="xml"/>
+ <xs:enumeration value="text"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:element name="fallback" type="xi:fallbackType" />
+ <xs:complexType name="fallbackType" mixed="true">
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element ref="xi:include"/>
+ </xs:choice>
+ </xs:complexType>
+</xs:schema>