summaryrefslogtreecommitdiffstats
path: root/schemas/xinclude.xsd
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2011-04-13 11:40:50 -0400
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2011-04-13 11:40:50 -0400
commite386c37ff7436f78c1a9dd33e0c90e2b3254c99d (patch)
treea7df466017cd180d7fbf093234b9bd45d4e83abf /schemas/xinclude.xsd
parent545dda76d34a06ae25efa2eb3d0c8c0bd70127d0 (diff)
downloadbcfg2-e386c37ff7436f78c1a9dd33e0c90e2b3254c99d.tar.gz
bcfg2-e386c37ff7436f78c1a9dd33e0c90e2b3254c99d.tar.bz2
bcfg2-e386c37ff7436f78c1a9dd33e0c90e2b3254c99d.zip
* Made Metadata files validate whether or not XIncludes had been processed
* bcfg2-repo-validate does not chase XIncludes if --stdin has been specified, but just validates the Metadata files you provide on stdin
Diffstat (limited to 'schemas/xinclude.xsd')
-rw-r--r--schemas/xinclude.xsd41
1 files changed, 41 insertions, 0 deletions
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>