diff --git a/Klausuren/Sda1/2018Summer/Exam/.gitignore b/Klausuren/Sda1/2018Summer/Exam/.gitignore index 9b36bc511f68d6e52aeb8b8e7c5ddfe38ed74218..f003c82bb57d9df0ae89c2931d26821c30b7e478 100644 --- a/Klausuren/Sda1/2018Summer/Exam/.gitignore +++ b/Klausuren/Sda1/2018Summer/Exam/.gitignore @@ -1,3 +1,4 @@ +/.idea/ /target/ /.settings/ .classpath @@ -5,34 +6,11 @@ dependency-reduced-pom.xml *.log -# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm -# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 - -# User-specific stuff: -.idea/**/workspace.xml -.idea/**/tasks.xml -.idea/dictionaries - -# Sensitive or high-churn files: -.idea/**/dataSources/ -.idea/**/dataSources.ids -.idea/**/dataSources.xml -.idea/**/dataSources.local.xml -.idea/**/sqlDataSources.xml -.idea/**/dynamic.xml -.idea/**/uiDesigner.xml - -# Gradle: -.idea/**/gradle.xml -.idea/**/libraries - # CMake cmake-build-debug/ -# Mongo Explorer plugin: -.idea/**/mongoSettings.xml - *.iws +*.iml # IntelliJ @@ -44,9 +22,6 @@ out/ # JIRA plugin atlassian-ide-plugin.xml -# Cursive Clojure plugin -.idea/replstate.xml - # Crashlytics plugin (for Android Studio and IntelliJ) com_crashlytics_export_strings.xml crashlytics.properties diff --git a/Klausuren/Sda1/2018Summer/Exam/pom.xml b/Klausuren/Sda1/2018Summer/Exam/pom.xml index ceef14ecb676e294cc040a42b71535d73d704f34..d04dc78e24e7b2d491819cc49607073a3d2f6ea3 100644 --- a/Klausuren/Sda1/2018Summer/Exam/pom.xml +++ b/Klausuren/Sda1/2018Summer/Exam/pom.xml @@ -103,7 +103,7 @@ <dependency> <groupId>de.hdm_stuttgart.mi.exam</groupId> <artifactId>unitmarking</artifactId> - <version>0.9</version> + <version>1.0</version> </dependency> </dependencies> @@ -153,7 +153,7 @@ <configuration> <archive> <manifest> - <mainClass>de.hdm_stuttgart.mi.sda1.test.ShowReachedPoints</mainClass> + <mainClass>de.hdm_stuttgart.mi.sda1.test.ex1.ShowReachedPoints</mainClass> </manifest> </archive> </configuration> diff --git a/Klausuren/Sda1/2018Summer/Exam/src/main/resources/XMLSchema.xsd b/Klausuren/Sda1/2018Summer/Exam/src/main/resources/XMLSchema.xsd new file mode 100644 index 0000000000000000000000000000000000000000..89829f137c946d2135736472ada6bb33a51df385 --- /dev/null +++ b/Klausuren/Sda1/2018Summer/Exam/src/main/resources/XMLSchema.xsd @@ -0,0 +1,2471 @@ +<?xml version='1.0' encoding='UTF-8'?> +<xsd:schema targetNamespace="http://www.w3.org/2001/XMLSchema" + blockDefault="#all" elementFormDefault="qualified" version="1.0" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" xml:lang="EN" + xmlns:hfp="http://www.w3.org/2001/XMLSchema-hasFacetAndProperty"> + <xsd:annotation> + <xsd:documentation> + Part 1 version: Id: structures.xsd,v 1.2 2004/01/15 11:34:25 ht Exp + Part 2 version: Id: datatypes.xsd,v 1.3 2004/01/23 18:11:13 ht Exp + </xsd:documentation> + </xsd:annotation> + + <xsd:annotation> + <xsd:documentation source="http://www.w3.org/TR/2004/PER-xmlschema-1-20040318/structures.html"> + The schema corresponding to this document is normative, + with respect to the syntactic constraints it expresses in the + XML Schema language. The documentation (within <documentation> elements) + below, is not normative, but rather highlights important aspects of + the W3C Recommendation of which this is a part</xsd:documentation> + </xsd:annotation> + + <xsd:annotation> + <xsd:documentation> + The simpleType element and all of its members are defined + towards the end of this schema document</xsd:documentation> + </xsd:annotation> + + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="xml.xsd"> + <xsd:annotation> + <xsd:documentation> + Get access to the xml: attribute groups for xml:lang + as declared on 'schema' and 'documentation' below + </xsd:documentation> + </xsd:annotation> + </xsd:import> + + <xsd:complexType name="openAttrs"> + <xsd:annotation> + <xsd:documentation> + This type is extended by almost all schema types + to allow attributes from other namespaces to be + added to user schemas. + </xsd:documentation> + </xsd:annotation> + <xsd:complexContent> + <xsd:restriction base="xsd:anyType"> + <xsd:anyAttribute namespace="##other" processContents="lax"/> + </xsd:restriction> + </xsd:complexContent> + </xsd:complexType> + + <xsd:complexType name="annotated"> + <xsd:annotation> + <xsd:documentation> + This type is extended by all types which allow annotation + other than <schema> itself + </xsd:documentation> + </xsd:annotation> + <xsd:complexContent> + <xsd:extension base="xsd:openAttrs"> + <xsd:sequence> + <xsd:element ref="xsd:annotation" minOccurs="0"/> + </xsd:sequence> + <xsd:attribute name="id" type="xsd:ID"/> + </xsd:extension> + </xsd:complexContent> + </xsd:complexType> + + <xsd:group name="schemaTop"> + <xsd:annotation> + <xsd:documentation> + This group is for the + elements which occur freely at the top level of schemas. + All of their types are based on the "annotated" type by extension.</xsd:documentation> + </xsd:annotation> + <xsd:choice> + <xsd:group ref="xsd:redefinable"/> + <xsd:element ref="xsd:element"/> + <xsd:element ref="xsd:attribute"/> + <xsd:element ref="xsd:notation"/> + </xsd:choice> + </xsd:group> + + <xsd:group name="redefinable"> + <xsd:annotation> + <xsd:documentation> + This group is for the + elements which can self-redefine (see <redefine> below).</xsd:documentation> + </xsd:annotation> + <xsd:choice> + <xsd:element ref="xsd:simpleType"/> + <xsd:element ref="xsd:complexType"/> + <xsd:element ref="xsd:group"/> + <xsd:element ref="xsd:attributeGroup"/> + </xsd:choice> + </xsd:group> + + <xsd:simpleType name="formChoice"> + <xsd:annotation> + <xsd:documentation> + A utility type, not for public use</xsd:documentation> + </xsd:annotation> + <xsd:restriction base="xsd:NMTOKEN"> + <xsd:enumeration value="qualified"/> + <xsd:enumeration value="unqualified"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="reducedDerivationControl"> + <xsd:annotation> + <xsd:documentation> + A utility type, not for public use</xsd:documentation> + </xsd:annotation> + <xsd:restriction base="xsd:derivationControl"> + <xsd:enumeration value="extension"/> + <xsd:enumeration value="restriction"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="derivationSet"> + <xsd:annotation> + <xsd:documentation> + A utility type, not for public use</xsd:documentation> + <xsd:documentation> + #all or (possibly empty) subset of {extension, restriction}</xsd:documentation> + </xsd:annotation> + <xsd:union> + <xsd:simpleType> + <xsd:restriction base="xsd:token"> + <xsd:enumeration value="#all"/> + </xsd:restriction> + </xsd:simpleType> + <xsd:simpleType> + <xsd:list itemType="xsd:reducedDerivationControl"/> + </xsd:simpleType> + </xsd:union> + </xsd:simpleType> + + <xsd:simpleType name="typeDerivationControl"> + <xsd:annotation> + <xsd:documentation> + A utility type, not for public use</xsd:documentation> + </xsd:annotation> + <xsd:restriction base="xsd:derivationControl"> + <xsd:enumeration value="extension"/> + <xsd:enumeration value="restriction"/> + <xsd:enumeration value="list"/> + <xsd:enumeration value="union"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="fullDerivationSet"> + <xsd:annotation> + <xsd:documentation> + A utility type, not for public use</xsd:documentation> + <xsd:documentation> + #all or (possibly empty) subset of {extension, restriction, list, union}</xsd:documentation> + </xsd:annotation> + <xsd:union> + <xsd:simpleType> + <xsd:restriction base="xsd:token"> + <xsd:enumeration value="#all"/> + </xsd:restriction> + </xsd:simpleType> + <xsd:simpleType> + <xsd:list itemType="xsd:typeDerivationControl"/> + </xsd:simpleType> + </xsd:union> + </xsd:simpleType> + + <xsd:element name="schema" id="schema"> + <xsd:annotation> + <xsd:documentation source="http://www.w3.org/TR/xmlschema-1/#element-schema"/> + </xsd:annotation> + <xsd:complexType> + <xsd:complexContent> + <xsd:extension base="xsd:openAttrs"> + <xsd:sequence> + <xsd:choice minOccurs="0" maxOccurs="unbounded"> + <xsd:element ref="xsd:include"/> + <xsd:element ref="xsd:import"/> + <xsd:element ref="xsd:redefine"/> + <xsd:element ref="xsd:annotation"/> + </xsd:choice> + <xsd:sequence minOccurs="0" maxOccurs="unbounded"> + <xsd:group ref="xsd:schemaTop"/> + <xsd:element ref="xsd:annotation" minOccurs="0" maxOccurs="unbounded"/> + </xsd:sequence> + </xsd:sequence> + <xsd:attribute name="targetNamespace" type="xsd:anyURI"/> + <xsd:attribute name="version" type="xsd:token"/> + <xsd:attribute name="finalDefault" type="xsd:fullDerivationSet" use="optional" default=""/> + <xsd:attribute name="blockDefault" type="xsd:blockSet" use="optional" default=""/> + <xsd:attribute name="attributeFormDefault" type="xsd:formChoice" use="optional" default="unqualified"/> + <xsd:attribute name="elementFormDefault" type="xsd:formChoice" use="optional" default="unqualified"/> + <xsd:attribute name="id" type="xsd:ID"/> + <xsd:attribute ref="xml:lang"/> + </xsd:extension> + </xsd:complexContent> + </xsd:complexType> + + <xsd:key name="element"> + <xsd:selector xpath="xsd:element"/> + <xsd:field xpath="@name"/> + </xsd:key> + + <xsd:key name="attribute"> + <xsd:selector xpath="xsd:attribute"/> + <xsd:field xpath="@name"/> + </xsd:key> + + <xsd:key name="type"> + <xsd:selector xpath="xsd:complexType|xsd:simpleType"/> + <xsd:field xpath="@name"/> + </xsd:key> + + <xsd:key name="group"> + <xsd:selector xpath="xsd:group"/> + <xsd:field xpath="@name"/> + </xsd:key> + + <xsd:key name="attributeGroup"> + <xsd:selector xpath="xsd:attributeGroup"/> + <xsd:field xpath="@name"/> + </xsd:key> + + <xsd:key name="notation"> + <xsd:selector xpath="xsd:notation"/> + <xsd:field xpath="@name"/> + </xsd:key> + + <xsd:key name="identityConstraint"> + <xsd:selector xpath=".//xsd:key|.//xsd:unique|.//xsd:keyref"/> + <xsd:field xpath="@name"/> + </xsd:key> + + </xsd:element> + + <xsd:simpleType name="allNNI"> + <xsd:annotation><xsd:documentation> + for maxOccurs</xsd:documentation></xsd:annotation> + <xsd:union memberTypes="xsd:nonNegativeInteger"> + <xsd:simpleType> + <xsd:restriction base="xsd:NMTOKEN"> + <xsd:enumeration value="unbounded"/> + </xsd:restriction> + </xsd:simpleType> + </xsd:union> + </xsd:simpleType> + + <xsd:attributeGroup name="occurs"> + <xsd:annotation><xsd:documentation> + for all particles</xsd:documentation></xsd:annotation> + <xsd:attribute name="minOccurs" type="xsd:nonNegativeInteger" use="optional" default="1"/> + <xsd:attribute name="maxOccurs" type="xsd:allNNI" use="optional" default="1"/> + </xsd:attributeGroup> + + <xsd:attributeGroup name="defRef"> + <xsd:annotation><xsd:documentation> + for element, group and attributeGroup, + which both define and reference</xsd:documentation></xsd:annotation> + <xsd:attribute name="name" type="xsd:NCName"/> + <xsd:attribute name="ref" type="xsd:QName"/> + </xsd:attributeGroup> + + <xsd:group name="typeDefParticle"> + <xsd:annotation> + <xsd:documentation> + 'complexType' uses this</xsd:documentation></xsd:annotation> + <xsd:choice> + <xsd:element name="group" type="xsd:groupRef"/> + <xsd:element ref="xsd:all"/> + <xsd:element ref="xsd:choice"/> + <xsd:element ref="xsd:sequence"/> + </xsd:choice> + </xsd:group> + + + + <xsd:group name="nestedParticle"> + <xsd:choice> + <xsd:element name="element" type="xsd:localElement"/> + <xsd:element name="group" type="xsd:groupRef"/> + <xsd:element ref="xsd:choice"/> + <xsd:element ref="xsd:sequence"/> + <xsd:element ref="xsd:any"/> + </xsd:choice> + </xsd:group> + + <xsd:group name="particle"> + <xsd:choice> + <xsd:element name="element" type="xsd:localElement"/> + <xsd:element name="group" type="xsd:groupRef"/> + <xsd:element ref="xsd:all"/> + <xsd:element ref="xsd:choice"/> + <xsd:element ref="xsd:sequence"/> + <xsd:element ref="xsd:any"/> + </xsd:choice> + </xsd:group> + + <xsd:complexType name="attribute"> + <xsd:complexContent> + <xsd:extension base="xsd:annotated"> + <xsd:sequence> + <xsd:element name="simpleType" minOccurs="0" type="xsd:localSimpleType"/> + </xsd:sequence> + <xsd:attributeGroup ref="xsd:defRef"/> + <xsd:attribute name="type" type="xsd:QName"/> + <xsd:attribute name="use" use="optional" default="optional"> + <xsd:simpleType> + <xsd:restriction base="xsd:NMTOKEN"> + <xsd:enumeration value="prohibited"/> + <xsd:enumeration value="optional"/> + <xsd:enumeration value="required"/> + </xsd:restriction> + </xsd:simpleType> + </xsd:attribute> + <xsd:attribute name="default" type="xsd:string"/> + <xsd:attribute name="fixed" type="xsd:string"/> + <xsd:attribute name="form" type="xsd:formChoice"/> + </xsd:extension> + </xsd:complexContent> + </xsd:complexType> + + <xsd:complexType name="topLevelAttribute"> + <xsd:complexContent> + <xsd:restriction base="xsd:attribute"> + <xsd:sequence> + <xsd:element ref="xsd:annotation" minOccurs="0"/> + <xsd:element name="simpleType" minOccurs="0" type="xsd:localSimpleType"/> + </xsd:sequence> + <xsd:attribute name="ref" use="prohibited"/> + <xsd:attribute name="form" use="prohibited"/> + <xsd:attribute name="use" use="prohibited"/> + <xsd:attribute name="name" use="required" type="xsd:NCName"/> + <xsd:anyAttribute namespace="##other" processContents="lax"/> + </xsd:restriction> + </xsd:complexContent> + </xsd:complexType> + + <xsd:group name="attrDecls"> + <xsd:sequence> + <xsd:choice minOccurs="0" maxOccurs="unbounded"> + <xsd:element name="attribute" type="xsd:attribute"/> + <xsd:element name="attributeGroup" type="xsd:attributeGroupRef"/> + </xsd:choice> + <xsd:element ref="xsd:anyAttribute" minOccurs="0"/> + </xsd:sequence> + </xsd:group> + + <xsd:element name="anyAttribute" type="xsd:wildcard" id="anyAttribute"> + <xsd:annotation> + <xsd:documentation source="http://www.w3.org/TR/xmlschema-1/#element-anyAttribute"/> + </xsd:annotation> + </xsd:element> + + <xsd:group name="complexTypeModel"> + <xsd:choice> + <xsd:element ref="xsd:simpleContent"/> + <xsd:element ref="xsd:complexContent"/> + <xsd:sequence> + <xsd:annotation> + <xsd:documentation> + This branch is short for + <complexContent> + <restriction base="xsd:anyType"> + ... + </restriction> + </complexContent></xsd:documentation> + </xsd:annotation> + <xsd:group ref="xsd:typeDefParticle" minOccurs="0"/> + <xsd:group ref="xsd:attrDecls"/> + </xsd:sequence> + </xsd:choice> + </xsd:group> + + <xsd:complexType name="complexType" abstract="true"> + <xsd:complexContent> + <xsd:extension base="xsd:annotated"> + <xsd:group ref="xsd:complexTypeModel"/> + <xsd:attribute name="name" type="xsd:NCName"> + <xsd:annotation> + <xsd:documentation> + Will be restricted to required or forbidden</xsd:documentation> + </xsd:annotation> + </xsd:attribute> + <xsd:attribute name="mixed" type="xsd:boolean" use="optional" default="false"> + <xsd:annotation> + <xsd:documentation> + Not allowed if simpleContent child is chosen. + May be overriden by setting on complexContent child.</xsd:documentation> + </xsd:annotation> + </xsd:attribute> + <xsd:attribute name="abstract" type="xsd:boolean" use="optional" default="false"/> + <xsd:attribute name="final" type="xsd:derivationSet"/> + <xsd:attribute name="block" type="xsd:derivationSet"/> + </xsd:extension> + </xsd:complexContent> + </xsd:complexType> + + <xsd:complexType name="topLevelComplexType"> + <xsd:complexContent> + <xsd:restriction base="xsd:complexType"> + <xsd:sequence> + <xsd:element ref="xsd:annotation" minOccurs="0"/> + <xsd:group ref="xsd:complexTypeModel"/> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:NCName" use="required"/> + <xsd:anyAttribute namespace="##other" processContents="lax"/> + </xsd:restriction> + </xsd:complexContent> + </xsd:complexType> + + <xsd:complexType name="localComplexType"> + <xsd:complexContent> + <xsd:restriction base="xsd:complexType"> + <xsd:sequence> + <xsd:element ref="xsd:annotation" minOccurs="0"/> + <xsd:group ref="xsd:complexTypeModel"/> + </xsd:sequence> + <xsd:attribute name="name" use="prohibited"/> + <xsd:attribute name="abstract" use="prohibited"/> + <xsd:attribute name="final" use="prohibited"/> + <xsd:attribute name="block" use="prohibited"/> + <xsd:anyAttribute namespace="##other" processContents="lax"/> + </xsd:restriction> + </xsd:complexContent> + </xsd:complexType> + + <xsd:complexType name="restrictionType"> + <xsd:complexContent> + <xsd:extension base="xsd:annotated"> + <xsd:sequence> + <xsd:choice minOccurs="0"> + <xsd:group ref="xsd:typeDefParticle"/> + <xsd:group ref="xsd:simpleRestrictionModel"/> + </xsd:choice> + <xsd:group ref="xsd:attrDecls"/> + </xsd:sequence> + <xsd:attribute name="base" type="xsd:QName" use="required"/> + </xsd:extension> + </xsd:complexContent> + </xsd:complexType> + + <xsd:complexType name="complexRestrictionType"> + <xsd:complexContent> + <xsd:restriction base="xsd:restrictionType"> + <xsd:sequence> + <xsd:element ref="xsd:annotation" minOccurs="0"/> + <xsd:choice minOccurs="0"> + <xsd:annotation> + <xsd:documentation>This choice is added simply to + make this a valid restriction per the REC</xsd:documentation> + </xsd:annotation> + <xsd:group ref="xsd:typeDefParticle"/> + </xsd:choice> + <xsd:group ref="xsd:attrDecls"/> + </xsd:sequence> + <xsd:anyAttribute namespace="##other" processContents="lax"/> + </xsd:restriction> + </xsd:complexContent> + </xsd:complexType> + + <xsd:complexType name="extensionType"> + <xsd:complexContent> + <xsd:extension base="xsd:annotated"> + <xsd:sequence> + <xsd:group ref="xsd:typeDefParticle" minOccurs="0"/> + <xsd:group ref="xsd:attrDecls"/> + </xsd:sequence> + <xsd:attribute name="base" type="xsd:QName" use="required"/> + </xsd:extension> + </xsd:complexContent> + </xsd:complexType> + + <xsd:element name="complexContent" id="complexContent"> + <xsd:annotation> + <xsd:documentation source="http://www.w3.org/TR/xmlschema-1/#element-complexContent"/> + </xsd:annotation> + <xsd:complexType> + <xsd:complexContent> + <xsd:extension base="xsd:annotated"> + <xsd:choice> + <xsd:element name="restriction" type="xsd:complexRestrictionType"/> + <xsd:element name="extension" type="xsd:extensionType"/> + </xsd:choice> + <xsd:attribute name="mixed" type="xsd:boolean"> + <xsd:annotation> + <xsd:documentation> + Overrides any setting on complexType parent.</xsd:documentation> + </xsd:annotation> + </xsd:attribute> + </xsd:extension> + </xsd:complexContent> + </xsd:complexType> + </xsd:element> + + <xsd:complexType name="simpleRestrictionType"> + <xsd:complexContent> + <xsd:restriction base="xsd:restrictionType"> + <xsd:sequence> + <xsd:element ref="xsd:annotation" minOccurs="0"/> + <xsd:choice minOccurs="0"> + <xsd:annotation> + <xsd:documentation>This choice is added simply to + make this a valid restriction per the REC</xsd:documentation> + </xsd:annotation> + <xsd:group ref="xsd:simpleRestrictionModel"/> + </xsd:choice> + <xsd:group ref="xsd:attrDecls"/> + </xsd:sequence> + <xsd:anyAttribute namespace="##other" processContents="lax"/> + </xsd:restriction> + </xsd:complexContent> + </xsd:complexType> + + <xsd:complexType name="simpleExtensionType"> + <xsd:complexContent> + <xsd:restriction base="xsd:extensionType"> + <xsd:sequence> + <xsd:annotation> + <xsd:documentation> + No typeDefParticle group reference</xsd:documentation> + </xsd:annotation> + <xsd:element ref="xsd:annotation" minOccurs="0"/> + <xsd:group ref="xsd:attrDecls"/> + </xsd:sequence> + <xsd:anyAttribute namespace="##other" processContents="lax"/> + </xsd:restriction> + </xsd:complexContent> + </xsd:complexType> + + <xsd:element name="simpleContent" id="simpleContent"> + <xsd:annotation> + <xsd:documentation source="http://www.w3.org/TR/xmlschema-1/#element-simpleContent"/> + </xsd:annotation> + <xsd:complexType> + <xsd:complexContent> + <xsd:extension base="xsd:annotated"> + <xsd:choice> + <xsd:element name="restriction" type="xsd:simpleRestrictionType"/> + <xsd:element name="extension" type="xsd:simpleExtensionType"/> + </xsd:choice> + </xsd:extension> + </xsd:complexContent> + </xsd:complexType> + </xsd:element> + + <xsd:element name="complexType" type="xsd:topLevelComplexType" id="complexType"> + <xsd:annotation> + <xsd:documentation source="http://www.w3.org/TR/xmlschema-1/#element-complexType"/> + </xsd:annotation> + </xsd:element> + + + <xsd:simpleType name="blockSet"> + <xsd:annotation> + <xsd:documentation> + A utility type, not for public use</xsd:documentation> + <xsd:documentation> + #all or (possibly empty) subset of {substitution, extension, + restriction}</xsd:documentation> + </xsd:annotation> + <xsd:union> + <xsd:simpleType> + <xsd:restriction base="xsd:token"> + <xsd:enumeration value="#all"/> + </xsd:restriction> + </xsd:simpleType> + <xsd:simpleType> + <xsd:list> + <xsd:simpleType> + <xsd:restriction base="xsd:derivationControl"> + <xsd:enumeration value="extension"/> + <xsd:enumeration value="restriction"/> + <xsd:enumeration value="substitution"/> + </xsd:restriction> + </xsd:simpleType> + </xsd:list> + </xsd:simpleType> + </xsd:union> + </xsd:simpleType> + + <xsd:complexType name="element" abstract="true"> + <xsd:annotation> + <xsd:documentation> + The element element can be used either + at the top level to define an element-type binding globally, + or within a content model to either reference a globally-defined + element or type or declare an element-type binding locally. + The ref form is not allowed at the top level.</xsd:documentation> + </xsd:annotation> + + <xsd:complexContent> + <xsd:extension base="xsd:annotated"> + <xsd:sequence> + <xsd:choice minOccurs="0"> + <xsd:element name="simpleType" type="xsd:localSimpleType"/> + <xsd:element name="complexType" type="xsd:localComplexType"/> + </xsd:choice> + <xsd:group ref="xsd:identityConstraint" minOccurs="0" maxOccurs="unbounded"/> + </xsd:sequence> + <xsd:attributeGroup ref="xsd:defRef"/> + <xsd:attribute name="type" type="xsd:QName"/> + <xsd:attribute name="substitutionGroup" type="xsd:QName"/> + <xsd:attributeGroup ref="xsd:occurs"/> + <xsd:attribute name="default" type="xsd:string"/> + <xsd:attribute name="fixed" type="xsd:string"/> + <xsd:attribute name="nillable" type="xsd:boolean" use="optional" default="false"/> + <xsd:attribute name="abstract" type="xsd:boolean" use="optional" default="false"/> + <xsd:attribute name="final" type="xsd:derivationSet"/> + <xsd:attribute name="block" type="xsd:blockSet"/> + <xsd:attribute name="form" type="xsd:formChoice"/> + </xsd:extension> + </xsd:complexContent> + </xsd:complexType> + + <xsd:complexType name="topLevelElement"> + <xsd:complexContent> + <xsd:restriction base="xsd:element"> + <xsd:sequence> + <xsd:element ref="xsd:annotation" minOccurs="0"/> + <xsd:choice minOccurs="0"> + <xsd:element name="simpleType" type="xsd:localSimpleType"/> + <xsd:element name="complexType" type="xsd:localComplexType"/> + </xsd:choice> + <xsd:group ref="xsd:identityConstraint" minOccurs="0" maxOccurs="unbounded"/> + </xsd:sequence> + <xsd:attribute name="ref" use="prohibited"/> + <xsd:attribute name="form" use="prohibited"/> + <xsd:attribute name="minOccurs" use="prohibited"/> + <xsd:attribute name="maxOccurs" use="prohibited"/> + <xsd:attribute name="name" use="required" type="xsd:NCName"/> + <xsd:anyAttribute namespace="##other" processContents="lax"/> + </xsd:restriction> + </xsd:complexContent> + </xsd:complexType> + + <xsd:complexType name="localElement"> + <xsd:complexContent> + <xsd:restriction base="xsd:element"> + <xsd:sequence> + <xsd:element ref="xsd:annotation" minOccurs="0"/> + <xsd:choice minOccurs="0"> + <xsd:element name="simpleType" type="xsd:localSimpleType"/> + <xsd:element name="complexType" type="xsd:localComplexType"/> + </xsd:choice> + <xsd:group ref="xsd:identityConstraint" minOccurs="0" maxOccurs="unbounded"/> + </xsd:sequence> + <xsd:attribute name="substitutionGroup" use="prohibited"/> + <xsd:attribute name="final" use="prohibited"/> + <xsd:attribute name="abstract" use="prohibited"/> + <xsd:anyAttribute namespace="##other" processContents="lax"/> + </xsd:restriction> + </xsd:complexContent> + </xsd:complexType> + + <xsd:element name="element" type="xsd:topLevelElement" id="element"> + <xsd:annotation> + <xsd:documentation source="http://www.w3.org/TR/xmlschema-1/#element-element"/> + </xsd:annotation> + </xsd:element> + + <xsd:complexType name="group" abstract="true"> + <xsd:annotation> + <xsd:documentation> + group type for explicit groups, named top-level groups and + group references</xsd:documentation> + </xsd:annotation> + <xsd:complexContent> + <xsd:extension base="xsd:annotated"> + <xsd:group ref="xsd:particle" minOccurs="0" maxOccurs="unbounded"/> + <xsd:attributeGroup ref="xsd:defRef"/> + <xsd:attributeGroup ref="xsd:occurs"/> + </xsd:extension> + </xsd:complexContent> + </xsd:complexType> + + <xsd:complexType name="realGroup"> + <xsd:complexContent> + <xsd:restriction base="xsd:group"> + <xsd:sequence> + <xsd:element ref="xsd:annotation" minOccurs="0"/> + <xsd:choice minOccurs="0" maxOccurs="1"> + <xsd:element ref="xsd:all"/> + <xsd:element ref="xsd:choice"/> + <xsd:element ref="xsd:sequence"/> + </xsd:choice> + </xsd:sequence> + <xsd:anyAttribute namespace="##other" processContents="lax"/> + </xsd:restriction> + </xsd:complexContent> + </xsd:complexType> + + <xsd:complexType name="namedGroup"> + <xsd:complexContent> + <xsd:restriction base="xsd:realGroup"> + <xsd:sequence> + <xsd:element ref="xsd:annotation" minOccurs="0"/> + <xsd:choice minOccurs="1" maxOccurs="1"> + <xsd:element name="all"> + <xsd:complexType> + <xsd:complexContent> + <xsd:restriction base="xsd:all"> + <xsd:group ref="xsd:allModel"/> + <xsd:attribute name="minOccurs" use="prohibited"/> + <xsd:attribute name="maxOccurs" use="prohibited"/> + <xsd:anyAttribute namespace="##other" processContents="lax"/> + </xsd:restriction> + </xsd:complexContent> + </xsd:complexType> + </xsd:element> + <xsd:element name="choice" type="xsd:simpleExplicitGroup"/> + <xsd:element name="sequence" type="xsd:simpleExplicitGroup"/> + </xsd:choice> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:NCName"/> + <xsd:attribute name="ref" use="prohibited"/> + <xsd:attribute name="minOccurs" use="prohibited"/> + <xsd:attribute name="maxOccurs" use="prohibited"/> + <xsd:anyAttribute namespace="##other" processContents="lax"/> + </xsd:restriction> + </xsd:complexContent> + </xsd:complexType> + + <xsd:complexType name="groupRef"> + <xsd:complexContent> + <xsd:restriction base="xsd:realGroup"> + <xsd:sequence> + <xsd:element ref="xsd:annotation" minOccurs="0"/> + </xsd:sequence> + <xsd:attribute name="ref" use="required" type="xsd:QName"/> + <xsd:attribute name="name" use="prohibited"/> + <xsd:anyAttribute namespace="##other" processContents="lax"/> + </xsd:restriction> + </xsd:complexContent> + </xsd:complexType> + + <xsd:complexType name="explicitGroup"> + <xsd:annotation> + <xsd:documentation> + group type for the three kinds of group</xsd:documentation> + </xsd:annotation> + <xsd:complexContent> + <xsd:restriction base="xsd:group"> + <xsd:sequence> + <xsd:element ref="xsd:annotation" minOccurs="0"/> + <xsd:group ref="xsd:nestedParticle" minOccurs="0" maxOccurs="unbounded"/> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:NCName" use="prohibited"/> + <xsd:attribute name="ref" type="xsd:QName" use="prohibited"/> + <xsd:anyAttribute namespace="##other" processContents="lax"/> + </xsd:restriction> + </xsd:complexContent> + </xsd:complexType> + + <xsd:complexType name="simpleExplicitGroup"> + <xsd:complexContent> + <xsd:restriction base="xsd:explicitGroup"> + <xsd:sequence> + <xsd:element ref="xsd:annotation" minOccurs="0"/> + <xsd:group ref="xsd:nestedParticle" minOccurs="0" maxOccurs="unbounded"/> + </xsd:sequence> + <xsd:attribute name="minOccurs" use="prohibited"/> + <xsd:attribute name="maxOccurs" use="prohibited"/> + <xsd:anyAttribute namespace="##other" processContents="lax"/> + </xsd:restriction> + </xsd:complexContent> + </xsd:complexType> + + <xsd:group name="allModel"> + <xsd:sequence> + <xsd:element ref="xsd:annotation" minOccurs="0"/> + <xsd:choice minOccurs="0" maxOccurs="unbounded"> + <xsd:annotation> + <xsd:documentation>This choice with min/max is here to + avoid a pblm with the Elt:All/Choice/Seq + Particle derivation constraint</xsd:documentation> + </xsd:annotation> + <xsd:element name="element" type="xsd:narrowMaxMin"/> + </xsd:choice> + </xsd:sequence> + </xsd:group> + + + <xsd:complexType name="narrowMaxMin"> + <xsd:annotation> + <xsd:documentation>restricted max/min</xsd:documentation> + </xsd:annotation> + <xsd:complexContent> + <xsd:restriction base="xsd:localElement"> + <xsd:sequence> + <xsd:element ref="xsd:annotation" minOccurs="0"/> + <xsd:choice minOccurs="0"> + <xsd:element name="simpleType" type="xsd:localSimpleType"/> + <xsd:element name="complexType" type="xsd:localComplexType"/> + </xsd:choice> + <xsd:group ref="xsd:identityConstraint" minOccurs="0" maxOccurs="unbounded"/> + </xsd:sequence> + <xsd:attribute name="minOccurs" use="optional" default="1"> + <xsd:simpleType> + <xsd:restriction base="xsd:nonNegativeInteger"> + <xsd:enumeration value="0"/> + <xsd:enumeration value="1"/> + </xsd:restriction> + </xsd:simpleType> + </xsd:attribute> + <xsd:attribute name="maxOccurs" use="optional" default="1"> + <xsd:simpleType> + <xsd:restriction base="xsd:allNNI"> + <xsd:enumeration value="0"/> + <xsd:enumeration value="1"/> + </xsd:restriction> + </xsd:simpleType> + </xsd:attribute> + <xsd:anyAttribute namespace="##other" processContents="lax"/> + </xsd:restriction> + </xsd:complexContent> + </xsd:complexType> + + <xsd:complexType name="all"> + <xsd:annotation> + <xsd:documentation> + Only elements allowed inside</xsd:documentation> + </xsd:annotation> + <xsd:complexContent> + <xsd:restriction base="xsd:explicitGroup"> + <xsd:group ref="xsd:allModel"/> + <xsd:attribute name="minOccurs" use="optional" default="1"> + <xsd:simpleType> + <xsd:restriction base="xsd:nonNegativeInteger"> + <xsd:enumeration value="0"/> + <xsd:enumeration value="1"/> + </xsd:restriction> + </xsd:simpleType> + </xsd:attribute> + <xsd:attribute name="maxOccurs" use="optional" default="1"> + <xsd:simpleType> + <xsd:restriction base="xsd:allNNI"> + <xsd:enumeration value="1"/> + </xsd:restriction> + </xsd:simpleType> + </xsd:attribute> + <xsd:anyAttribute namespace="##other" processContents="lax"/> + </xsd:restriction> + </xsd:complexContent> + </xsd:complexType> + + <xsd:element name="all" id="all" type="xsd:all"> + <xsd:annotation> + <xsd:documentation source="http://www.w3.org/TR/xmlschema-1/#element-all"/> + </xsd:annotation> + </xsd:element> + + <xsd:element name="choice" type="xsd:explicitGroup" id="choice"> + <xsd:annotation> + <xsd:documentation source="http://www.w3.org/TR/xmlschema-1/#element-choice"/> + </xsd:annotation> + </xsd:element> + + <xsd:element name="sequence" type="xsd:explicitGroup" id="sequence"> + <xsd:annotation> + <xsd:documentation source="http://www.w3.org/TR/xmlschema-1/#element-sequence"/> + </xsd:annotation> + </xsd:element> + + <xsd:element name="group" type="xsd:namedGroup" id="group"> + <xsd:annotation> + <xsd:documentation source="http://www.w3.org/TR/xmlschema-1/#element-group"/> + </xsd:annotation> + </xsd:element> + + <xsd:complexType name="wildcard"> + <xsd:complexContent> + <xsd:extension base="xsd:annotated"> + <xsd:attribute name="namespace" type="xsd:namespaceList" use="optional" default="##any"/> + <xsd:attribute name="processContents" use="optional" default="strict"> + <xsd:simpleType> + <xsd:restriction base="xsd:NMTOKEN"> + <xsd:enumeration value="skip"/> + <xsd:enumeration value="lax"/> + <xsd:enumeration value="strict"/> + </xsd:restriction> + </xsd:simpleType> + </xsd:attribute> + </xsd:extension> + </xsd:complexContent> + </xsd:complexType> + + <xsd:element name="any" id="any"> + <xsd:annotation> + <xsd:documentation source="http://www.w3.org/TR/xmlschema-1/#element-any"/> + </xsd:annotation> + <xsd:complexType> + <xsd:complexContent> + <xsd:extension base="xsd:wildcard"> + <xsd:attributeGroup ref="xsd:occurs"/> + </xsd:extension> + </xsd:complexContent> + </xsd:complexType> + </xsd:element> + + <xsd:annotation> + <xsd:documentation> + simple type for the value of the 'namespace' attr of + 'any' and 'anyAttribute'</xsd:documentation> + </xsd:annotation> + <xsd:annotation> + <xsd:documentation> + Value is + ##any - - any non-conflicting WFXML/attribute at all + + ##other - - any non-conflicting WFXML/attribute from + namespace other than targetNS + + ##local - - any unqualified non-conflicting WFXML/attribute + + one or - - any non-conflicting WFXML/attribute from + more URI the listed namespaces + references + (space separated) + + ##targetNamespace or ##local may appear in the above list, to + refer to the targetNamespace of the enclosing + schema or an absent targetNamespace respectively</xsd:documentation> + </xsd:annotation> + + <xsd:simpleType name="namespaceList"> + <xsd:annotation> + <xsd:documentation> + A utility type, not for public use</xsd:documentation> + </xsd:annotation> + <xsd:union> + <xsd:simpleType> + <xsd:restriction base="xsd:token"> + <xsd:enumeration value="##any"/> + <xsd:enumeration value="##other"/> + </xsd:restriction> + </xsd:simpleType> + <xsd:simpleType> + <xsd:list> + <xsd:simpleType> + <xsd:union memberTypes="xsd:anyURI"> + <xsd:simpleType> + <xsd:restriction base="xsd:token"> + <xsd:enumeration value="##targetNamespace"/> + <xsd:enumeration value="##local"/> + </xsd:restriction> + </xsd:simpleType> + </xsd:union> + </xsd:simpleType> + </xsd:list> + </xsd:simpleType> + </xsd:union> + </xsd:simpleType> + + <xsd:element name="attribute" type="xsd:topLevelAttribute" id="attribute"> + <xsd:annotation> + <xsd:documentation source="http://www.w3.org/TR/xmlschema-1/#element-attribute"/> + </xsd:annotation> + </xsd:element> + + <xsd:complexType name="attributeGroup" abstract="true"> + <xsd:complexContent> + <xsd:extension base="xsd:annotated"> + <xsd:group ref="xsd:attrDecls"/> + <xsd:attributeGroup ref="xsd:defRef"/> + </xsd:extension> + </xsd:complexContent> + </xsd:complexType> + + <xsd:complexType name="namedAttributeGroup"> + <xsd:complexContent> + <xsd:restriction base="xsd:attributeGroup"> + <xsd:sequence> + <xsd:element ref="xsd:annotation" minOccurs="0"/> + <xsd:group ref="xsd:attrDecls"/> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:NCName"/> + <xsd:attribute name="ref" use="prohibited"/> + <xsd:anyAttribute namespace="##other" processContents="lax"/> + </xsd:restriction> + </xsd:complexContent> + </xsd:complexType> + + <xsd:complexType name="attributeGroupRef"> + <xsd:complexContent> + <xsd:restriction base="xsd:attributeGroup"> + <xsd:sequence> + <xsd:element ref="xsd:annotation" minOccurs="0"/> + </xsd:sequence> + <xsd:attribute name="ref" use="required" type="xsd:QName"/> + <xsd:attribute name="name" use="prohibited"/> + <xsd:anyAttribute namespace="##other" processContents="lax"/> + </xsd:restriction> + </xsd:complexContent> + </xsd:complexType> + + <xsd:element name="attributeGroup" type="xsd:namedAttributeGroup" id="attributeGroup"> + <xsd:annotation> + <xsd:documentation source="http://www.w3.org/TR/xmlschema-1/#element-attributeGroup"/> + </xsd:annotation> + </xsd:element> + + <xsd:element name="include" id="include"> + <xsd:annotation> + <xsd:documentation source="http://www.w3.org/TR/xmlschema-1/#element-include"/> + </xsd:annotation> + <xsd:complexType> + <xsd:complexContent> + <xsd:extension base="xsd:annotated"> + <xsd:attribute name="schemaLocation" type="xsd:anyURI" use="required"/> + </xsd:extension> + </xsd:complexContent> + </xsd:complexType> + </xsd:element> + + <xsd:element name="redefine" id="redefine"> + <xsd:annotation> + <xsd:documentation source="http://www.w3.org/TR/xmlschema-1/#element-redefine"/> + </xsd:annotation> + <xsd:complexType> + <xsd:complexContent> + <xsd:extension base="xsd:openAttrs"> + <xsd:choice minOccurs="0" maxOccurs="unbounded"> + <xsd:element ref="xsd:annotation"/> + <xsd:group ref="xsd:redefinable"/> + </xsd:choice> + <xsd:attribute name="schemaLocation" type="xsd:anyURI" use="required"/> + <xsd:attribute name="id" type="xsd:ID"/> + </xsd:extension> + </xsd:complexContent> + </xsd:complexType> + </xsd:element> + + <xsd:element name="import" id="import"> + <xsd:annotation> + <xsd:documentation source="http://www.w3.org/TR/xmlschema-1/#element-import"/> + </xsd:annotation> + <xsd:complexType> + <xsd:complexContent> + <xsd:extension base="xsd:annotated"> + <xsd:attribute name="namespace" type="xsd:anyURI"/> + <xsd:attribute name="schemaLocation" type="xsd:anyURI"/> + </xsd:extension> + </xsd:complexContent> + </xsd:complexType> + </xsd:element> + + <xsd:element name="selector" id="selector"> + <xsd:annotation> + <xsd:documentation source="http://www.w3.org/TR/xmlschema-1/#element-selector"/> + </xsd:annotation> + <xsd:complexType> + <xsd:complexContent> + <xsd:extension base="xsd:annotated"> + <xsd:attribute name="xpath" use="required"> + <xsd:simpleType> + <xsd:annotation> + <xsd:documentation>A subset of XPath expressions for use +in selectors</xsd:documentation> + <xsd:documentation>A utility type, not for public +use</xsd:documentation> + </xsd:annotation> + <xsd:restriction base="xsd:token"> + <xsd:annotation> + <xsd:documentation>The following pattern is intended to allow XPath + expressions per the following EBNF: + Selector ::= Path ( '|' Path )* + Path ::= ('.//')? Step ( '/' Step )* + Step ::= '.' | NameTest + NameTest ::= QName | '*' | NCName ':' '*' + child:: is also allowed + </xsd:documentation> + </xsd:annotation> + <xsd:pattern value="(\.//)?(((child::)?((\i\c*:)?(\i\c*|\*)))|\.)(/(((child::)?((\i\c*:)?(\i\c*|\*)))|\.))*(\|(\.//)?(((child::)?((\i\c*:)?(\i\c*|\*)))|\.)(/(((child::)?((\i\c*:)?(\i\c*|\*)))|\.))*)*"> + </xsd:pattern> + </xsd:restriction> + </xsd:simpleType> + </xsd:attribute> + </xsd:extension> + </xsd:complexContent> + </xsd:complexType> + </xsd:element> + + <xsd:element name="field" id="field"> + <xsd:annotation> + <xsd:documentation source="http://www.w3.org/TR/xmlschema-1/#element-field"/> + </xsd:annotation> + <xsd:complexType> + <xsd:complexContent> + <xsd:extension base="xsd:annotated"> + <xsd:attribute name="xpath" use="required"> + <xsd:simpleType> + <xsd:annotation> + <xsd:documentation>A subset of XPath expressions for use +in fields</xsd:documentation> + <xsd:documentation>A utility type, not for public +use</xsd:documentation> + </xsd:annotation> + <xsd:restriction base="xsd:token"> + <xsd:annotation> + <xsd:documentation>The following pattern is intended to allow XPath + expressions per the same EBNF as for selector, + with the following change: + Path ::= ('.//')? ( Step '/' )* ( Step | '@' NameTest ) + </xsd:documentation> + </xsd:annotation> + <xsd:pattern value="(\.//)?((((child::)?((\i\c*:)?(\i\c*|\*)))|\.)/)*((((child::)?((\i\c*:)?(\i\c*|\*)))|\.)|((attribute::|@)((\i\c*:)?(\i\c*|\*))))(\|(\.//)?((((child::)?((\i\c*:)?(\i\c*|\*)))|\.)/)*((((child::)?((\i\c*:)?(\i\c*|\*)))|\.)|((attribute::|@)((\i\c*:)?(\i\c*|\*)))))*"> + </xsd:pattern> + </xsd:restriction> + </xsd:simpleType> + </xsd:attribute> + </xsd:extension> + </xsd:complexContent> + </xsd:complexType> + </xsd:element> + + <xsd:complexType name="keybase"> + <xsd:complexContent> + <xsd:extension base="xsd:annotated"> + <xsd:sequence> + <xsd:element ref="xsd:selector"/> + <xsd:element ref="xsd:field" minOccurs="1" maxOccurs="unbounded"/> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:NCName" use="required"/> + </xsd:extension> + </xsd:complexContent> + </xsd:complexType> + + <xsd:group name="identityConstraint"> + <xsd:annotation> + <xsd:documentation>The three kinds of identity constraints, all with + type of or derived from 'keybase'. + </xsd:documentation> + </xsd:annotation> + <xsd:choice> + <xsd:element ref="xsd:unique"/> + <xsd:element ref="xsd:key"/> + <xsd:element ref="xsd:keyref"/> + </xsd:choice> + </xsd:group> + + <xsd:element name="unique" type="xsd:keybase" id="unique"> + <xsd:annotation> + <xsd:documentation source="http://www.w3.org/TR/xmlschema-1/#element-unique"/> + </xsd:annotation> + </xsd:element> + <xsd:element name="key" type="xsd:keybase" id="key"> + <xsd:annotation> + <xsd:documentation source="http://www.w3.org/TR/xmlschema-1/#element-key"/> + </xsd:annotation> + </xsd:element> + <xsd:element name="keyref" id="keyref"> + <xsd:annotation> + <xsd:documentation source="http://www.w3.org/TR/xmlschema-1/#element-keyref"/> + </xsd:annotation> + <xsd:complexType> + <xsd:complexContent> + <xsd:extension base="xsd:keybase"> + <xsd:attribute name="refer" type="xsd:QName" use="required"/> + </xsd:extension> + </xsd:complexContent> + </xsd:complexType> + </xsd:element> + + <xsd:element name="notation" id="notation"> + <xsd:annotation> + <xsd:documentation source="http://www.w3.org/TR/xmlschema-1/#element-notation"/> + </xsd:annotation> + <xsd:complexType> + <xsd:complexContent> + <xsd:extension base="xsd:annotated"> + <xsd:attribute name="name" type="xsd:NCName" use="required"/> + <xsd:attribute name="public" type="xsd:public"/> + <xsd:attribute name="system" type="xsd:anyURI"/> + </xsd:extension> + </xsd:complexContent> + </xsd:complexType> + </xsd:element> + + <xsd:simpleType name="public"> + <xsd:annotation> + <xsd:documentation> + A utility type, not for public use</xsd:documentation> + <xsd:documentation> + A public identifier, per ISO 8879</xsd:documentation> + </xsd:annotation> + <xsd:restriction base="xsd:token"/> + </xsd:simpleType> + + <xsd:element name="appinfo" id="appinfo"> + <xsd:annotation> + <xsd:documentation source="http://www.w3.org/TR/xmlschema-1/#element-appinfo"/> + </xsd:annotation> + <xsd:complexType mixed="true"> + <xsd:sequence minOccurs="0" maxOccurs="unbounded"> + <xsd:any processContents="lax"/> + </xsd:sequence> + <xsd:attribute name="source" type="xsd:anyURI"/> + <xsd:anyAttribute namespace="##other" processContents="lax"/> + </xsd:complexType> + </xsd:element> + + <xsd:element name="documentation" id="documentation"> + <xsd:annotation> + <xsd:documentation source="http://www.w3.org/TR/xmlschema-1/#element-documentation"/> + </xsd:annotation> + <xsd:complexType mixed="true"> + <xsd:sequence minOccurs="0" maxOccurs="unbounded"> + <xsd:any processContents="lax"/> + </xsd:sequence> + <xsd:attribute name="source" type="xsd:anyURI"/> + <xsd:attribute ref="xml:lang"/> + <xsd:anyAttribute namespace="##other" processContents="lax"/> + </xsd:complexType> + </xsd:element> + + <xsd:element name="annotation" id="annotation"> + <xsd:annotation> + <xsd:documentation source="http://www.w3.org/TR/xmlschema-1/#element-annotation"/> + </xsd:annotation> + <xsd:complexType> + <xsd:complexContent> + <xsd:extension base="xsd:openAttrs"> + <xsd:choice minOccurs="0" maxOccurs="unbounded"> + <xsd:element ref="xsd:appinfo"/> + <xsd:element ref="xsd:documentation"/> + </xsd:choice> + <xsd:attribute name="id" type="xsd:ID"/> + </xsd:extension> + </xsd:complexContent> + </xsd:complexType> + </xsd:element> + + <xsd:annotation> + <xsd:documentation> + notations for use within XML Schema schemas</xsd:documentation> + </xsd:annotation> + + <xsd:notation name="XMLSchemaStructures" public="structures" system="http://www.w3.org/2000/08/XMLSchema.xsd"/> + <xsd:notation name="XML" public="REC-xml-19980210" system="http://www.w3.org/TR/1998/REC-xml-19980210"/> + + <xsd:complexType name="anyType" mixed="true"> + <xsd:annotation> + <xsd:documentation> + Not the real urType, but as close an approximation as we can + get in the XML representation</xsd:documentation> + </xsd:annotation> + <xsd:sequence> + <xsd:any minOccurs="0" maxOccurs="unbounded" processContents="lax"/> + </xsd:sequence> + <xsd:anyAttribute processContents="lax"/> + </xsd:complexType> + + <xsd:annotation> + <xsd:documentation> + First the built-in primitive datatypes. These definitions are for + information only, the real built-in definitions are magic. + </xsd:documentation> + + <xsd:documentation> + For each built-in datatype in this schema (both primitive and + derived) can be uniquely addressed via a URI constructed + as follows: + 1) the base URI is the URI of the XML Schema namespace + 2) the fragment identifier is the name of the datatype + + For example, to address the int datatype, the URI is: + + http://www.w3.org/2001/XMLSchema#int + + Additionally, each facet definition element can be uniquely + addressed via a URI constructed as follows: + 1) the base URI is the URI of the XML Schema namespace + 2) the fragment identifier is the name of the facet + + For example, to address the maxInclusive facet, the URI is: + + http://www.w3.org/2001/XMLSchema#maxInclusive + + Additionally, each facet usage in a built-in datatype definition + can be uniquely addressed via a URI constructed as follows: + 1) the base URI is the URI of the XML Schema namespace + 2) the fragment identifier is the name of the datatype, followed + by a period (".") followed by the name of the facet + + For example, to address the usage of the maxInclusive facet in + the definition of int, the URI is: + + http://www.w3.org/2001/XMLSchema#int.maxInclusive + + </xsd:documentation> + </xsd:annotation> + + <xsd:simpleType name="string" id="string"> + <xsd:annotation> + <xsd:appinfo> + <hfp:hasFacet name="length"/> + <hfp:hasFacet name="minLength"/> + <hfp:hasFacet name="maxLength"/> + <hfp:hasFacet name="pattern"/> + <hfp:hasFacet name="enumeration"/> + <hfp:hasFacet name="whiteSpace"/> + <hfp:hasProperty name="ordered" value="false"/> + <hfp:hasProperty name="bounded" value="false"/> + <hfp:hasProperty name="cardinality" value="countably infinite"/> + <hfp:hasProperty name="numeric" value="false"/> + </xsd:appinfo> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#string"/> + </xsd:annotation> + <xsd:restriction base="xsd:anySimpleType"> + <xsd:whiteSpace value="preserve" id="string.preserve"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="boolean" id="boolean"> + <xsd:annotation> + <xsd:appinfo> + <hfp:hasFacet name="pattern"/> + <hfp:hasFacet name="whiteSpace"/> + <hfp:hasProperty name="ordered" value="false"/> + <hfp:hasProperty name="bounded" value="false"/> + <hfp:hasProperty name="cardinality" value="finite"/> + <hfp:hasProperty name="numeric" value="false"/> + </xsd:appinfo> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#boolean"/> + </xsd:annotation> + <xsd:restriction base="xsd:anySimpleType"> + <xsd:whiteSpace value="collapse" fixed="true" + id="boolean.whiteSpace"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="float" id="float"> + <xsd:annotation> + <xsd:appinfo> + <hfp:hasFacet name="pattern"/> + <hfp:hasFacet name="enumeration"/> + <hfp:hasFacet name="whiteSpace"/> + <hfp:hasFacet name="maxInclusive"/> + <hfp:hasFacet name="maxExclusive"/> + <hfp:hasFacet name="minInclusive"/> + <hfp:hasFacet name="minExclusive"/> + <hfp:hasProperty name="ordered" value="total"/> + <hfp:hasProperty name="bounded" value="true"/> + <hfp:hasProperty name="cardinality" value="finite"/> + <hfp:hasProperty name="numeric" value="true"/> + </xsd:appinfo> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#float"/> + </xsd:annotation> + <xsd:restriction base="xsd:anySimpleType"> + <xsd:whiteSpace value="collapse" fixed="true" + id="float.whiteSpace"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="double" id="double"> + <xsd:annotation> + <xsd:appinfo> + <hfp:hasFacet name="pattern"/> + <hfp:hasFacet name="enumeration"/> + <hfp:hasFacet name="whiteSpace"/> + <hfp:hasFacet name="maxInclusive"/> + <hfp:hasFacet name="maxExclusive"/> + <hfp:hasFacet name="minInclusive"/> + <hfp:hasFacet name="minExclusive"/> + <hfp:hasProperty name="ordered" value="total"/> + <hfp:hasProperty name="bounded" value="true"/> + <hfp:hasProperty name="cardinality" value="finite"/> + <hfp:hasProperty name="numeric" value="true"/> + </xsd:appinfo> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#double"/> + </xsd:annotation> + <xsd:restriction base="xsd:anySimpleType"> + <xsd:whiteSpace value="collapse" fixed="true" + id="double.whiteSpace"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="decimal" id="decimal"> + <xsd:annotation> + <xsd:appinfo> + <hfp:hasFacet name="totalDigits"/> + <hfp:hasFacet name="fractionDigits"/> + <hfp:hasFacet name="pattern"/> + <hfp:hasFacet name="whiteSpace"/> + <hfp:hasFacet name="enumeration"/> + <hfp:hasFacet name="maxInclusive"/> + <hfp:hasFacet name="maxExclusive"/> + <hfp:hasFacet name="minInclusive"/> + <hfp:hasFacet name="minExclusive"/> + <hfp:hasProperty name="ordered" value="total"/> + <hfp:hasProperty name="bounded" value="false"/> + <hfp:hasProperty name="cardinality" + value="countably infinite"/> + <hfp:hasProperty name="numeric" value="true"/> + </xsd:appinfo> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#decimal"/> + </xsd:annotation> + <xsd:restriction base="xsd:anySimpleType"> + <xsd:whiteSpace value="collapse" fixed="true" + id="decimal.whiteSpace"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="duration" id="duration"> + <xsd:annotation> + <xsd:appinfo> + <hfp:hasFacet name="pattern"/> + <hfp:hasFacet name="enumeration"/> + <hfp:hasFacet name="whiteSpace"/> + <hfp:hasFacet name="maxInclusive"/> + <hfp:hasFacet name="maxExclusive"/> + <hfp:hasFacet name="minInclusive"/> + <hfp:hasFacet name="minExclusive"/> + <hfp:hasProperty name="ordered" value="partial"/> + <hfp:hasProperty name="bounded" value="false"/> + <hfp:hasProperty name="cardinality" + value="countably infinite"/> + <hfp:hasProperty name="numeric" value="false"/> + </xsd:appinfo> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#duration"/> + </xsd:annotation> + <xsd:restriction base="xsd:anySimpleType"> + <xsd:whiteSpace value="collapse" fixed="true" + id="duration.whiteSpace"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="dateTime" id="dateTime"> + <xsd:annotation> + <xsd:appinfo> + <hfp:hasFacet name="pattern"/> + <hfp:hasFacet name="enumeration"/> + <hfp:hasFacet name="whiteSpace"/> + <hfp:hasFacet name="maxInclusive"/> + <hfp:hasFacet name="maxExclusive"/> + <hfp:hasFacet name="minInclusive"/> + <hfp:hasFacet name="minExclusive"/> + <hfp:hasProperty name="ordered" value="partial"/> + <hfp:hasProperty name="bounded" value="false"/> + <hfp:hasProperty name="cardinality" + value="countably infinite"/> + <hfp:hasProperty name="numeric" value="false"/> + </xsd:appinfo> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#dateTime"/> + </xsd:annotation> + <xsd:restriction base="xsd:anySimpleType"> + <xsd:whiteSpace value="collapse" fixed="true" + id="dateTime.whiteSpace"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="time" id="time"> + <xsd:annotation> + <xsd:appinfo> + <hfp:hasFacet name="pattern"/> + <hfp:hasFacet name="enumeration"/> + <hfp:hasFacet name="whiteSpace"/> + <hfp:hasFacet name="maxInclusive"/> + <hfp:hasFacet name="maxExclusive"/> + <hfp:hasFacet name="minInclusive"/> + <hfp:hasFacet name="minExclusive"/> + <hfp:hasProperty name="ordered" value="partial"/> + <hfp:hasProperty name="bounded" value="false"/> + <hfp:hasProperty name="cardinality" + value="countably infinite"/> + <hfp:hasProperty name="numeric" value="false"/> + </xsd:appinfo> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#time"/> + </xsd:annotation> + <xsd:restriction base="xsd:anySimpleType"> + <xsd:whiteSpace value="collapse" fixed="true" + id="time.whiteSpace"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="date" id="date"> + <xsd:annotation> + <xsd:appinfo> + <hfp:hasFacet name="pattern"/> + <hfp:hasFacet name="enumeration"/> + <hfp:hasFacet name="whiteSpace"/> + <hfp:hasFacet name="maxInclusive"/> + <hfp:hasFacet name="maxExclusive"/> + <hfp:hasFacet name="minInclusive"/> + <hfp:hasFacet name="minExclusive"/> + <hfp:hasProperty name="ordered" value="partial"/> + <hfp:hasProperty name="bounded" value="false"/> + <hfp:hasProperty name="cardinality" + value="countably infinite"/> + <hfp:hasProperty name="numeric" value="false"/> + </xsd:appinfo> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#date"/> + </xsd:annotation> + <xsd:restriction base="xsd:anySimpleType"> + <xsd:whiteSpace value="collapse" fixed="true" + id="date.whiteSpace"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="gYearMonth" id="gYearMonth"> + <xsd:annotation> + <xsd:appinfo> + <hfp:hasFacet name="pattern"/> + <hfp:hasFacet name="enumeration"/> + <hfp:hasFacet name="whiteSpace"/> + <hfp:hasFacet name="maxInclusive"/> + <hfp:hasFacet name="maxExclusive"/> + <hfp:hasFacet name="minInclusive"/> + <hfp:hasFacet name="minExclusive"/> + <hfp:hasProperty name="ordered" value="partial"/> + <hfp:hasProperty name="bounded" value="false"/> + <hfp:hasProperty name="cardinality" + value="countably infinite"/> + <hfp:hasProperty name="numeric" value="false"/> + </xsd:appinfo> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#gYearMonth"/> + </xsd:annotation> + <xsd:restriction base="xsd:anySimpleType"> + <xsd:whiteSpace value="collapse" fixed="true" + id="gYearMonth.whiteSpace"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="gYear" id="gYear"> + <xsd:annotation> + <xsd:appinfo> + <hfp:hasFacet name="pattern"/> + <hfp:hasFacet name="enumeration"/> + <hfp:hasFacet name="whiteSpace"/> + <hfp:hasFacet name="maxInclusive"/> + <hfp:hasFacet name="maxExclusive"/> + <hfp:hasFacet name="minInclusive"/> + <hfp:hasFacet name="minExclusive"/> + <hfp:hasProperty name="ordered" value="partial"/> + <hfp:hasProperty name="bounded" value="false"/> + <hfp:hasProperty name="cardinality" + value="countably infinite"/> + <hfp:hasProperty name="numeric" value="false"/> + </xsd:appinfo> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#gYear"/> + </xsd:annotation> + <xsd:restriction base="xsd:anySimpleType"> + <xsd:whiteSpace value="collapse" fixed="true" + id="gYear.whiteSpace"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="gMonthDay" id="gMonthDay"> + <xsd:annotation> + <xsd:appinfo> + <hfp:hasFacet name="pattern"/> + <hfp:hasFacet name="enumeration"/> + <hfp:hasFacet name="whiteSpace"/> + <hfp:hasFacet name="maxInclusive"/> + <hfp:hasFacet name="maxExclusive"/> + <hfp:hasFacet name="minInclusive"/> + <hfp:hasFacet name="minExclusive"/> + <hfp:hasProperty name="ordered" value="partial"/> + <hfp:hasProperty name="bounded" value="false"/> + <hfp:hasProperty name="cardinality" + value="countably infinite"/> + <hfp:hasProperty name="numeric" value="false"/> + </xsd:appinfo> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#gMonthDay"/> + </xsd:annotation> + <xsd:restriction base="xsd:anySimpleType"> + <xsd:whiteSpace value="collapse" fixed="true" + id="gMonthDay.whiteSpace"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="gDay" id="gDay"> + <xsd:annotation> + <xsd:appinfo> + <hfp:hasFacet name="pattern"/> + <hfp:hasFacet name="enumeration"/> + <hfp:hasFacet name="whiteSpace"/> + <hfp:hasFacet name="maxInclusive"/> + <hfp:hasFacet name="maxExclusive"/> + <hfp:hasFacet name="minInclusive"/> + <hfp:hasFacet name="minExclusive"/> + <hfp:hasProperty name="ordered" value="partial"/> + <hfp:hasProperty name="bounded" value="false"/> + <hfp:hasProperty name="cardinality" + value="countably infinite"/> + <hfp:hasProperty name="numeric" value="false"/> + </xsd:appinfo> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#gDay"/> + </xsd:annotation> + <xsd:restriction base="xsd:anySimpleType"> + <xsd:whiteSpace value="collapse" fixed="true" + id="gDay.whiteSpace"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="gMonth" id="gMonth"> + <xsd:annotation> + <xsd:appinfo> + <hfp:hasFacet name="pattern"/> + <hfp:hasFacet name="enumeration"/> + <hfp:hasFacet name="whiteSpace"/> + <hfp:hasFacet name="maxInclusive"/> + <hfp:hasFacet name="maxExclusive"/> + <hfp:hasFacet name="minInclusive"/> + <hfp:hasFacet name="minExclusive"/> + <hfp:hasProperty name="ordered" value="partial"/> + <hfp:hasProperty name="bounded" value="false"/> + <hfp:hasProperty name="cardinality" + value="countably infinite"/> + <hfp:hasProperty name="numeric" value="false"/> + </xsd:appinfo> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#gMonth"/> + </xsd:annotation> + <xsd:restriction base="xsd:anySimpleType"> + <xsd:whiteSpace value="collapse" fixed="true" + id="gMonth.whiteSpace"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="hexBinary" id="hexBinary"> + <xsd:annotation> + <xsd:appinfo> + <hfp:hasFacet name="length"/> + <hfp:hasFacet name="minLength"/> + <hfp:hasFacet name="maxLength"/> + <hfp:hasFacet name="pattern"/> + <hfp:hasFacet name="enumeration"/> + <hfp:hasFacet name="whiteSpace"/> + <hfp:hasProperty name="ordered" value="false"/> + <hfp:hasProperty name="bounded" value="false"/> + <hfp:hasProperty name="cardinality" + value="countably infinite"/> + <hfp:hasProperty name="numeric" value="false"/> + </xsd:appinfo> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#binary"/> + </xsd:annotation> + <xsd:restriction base="xsd:anySimpleType"> + <xsd:whiteSpace value="collapse" fixed="true" + id="hexBinary.whiteSpace"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="base64Binary" id="base64Binary"> + <xsd:annotation> + <xsd:appinfo> + <hfp:hasFacet name="length"/> + <hfp:hasFacet name="minLength"/> + <hfp:hasFacet name="maxLength"/> + <hfp:hasFacet name="pattern"/> + <hfp:hasFacet name="enumeration"/> + <hfp:hasFacet name="whiteSpace"/> + <hfp:hasProperty name="ordered" value="false"/> + <hfp:hasProperty name="bounded" value="false"/> + <hfp:hasProperty name="cardinality" + value="countably infinite"/> + <hfp:hasProperty name="numeric" value="false"/> + </xsd:appinfo> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#base64Binary"/> + </xsd:annotation> + <xsd:restriction base="xsd:anySimpleType"> + <xsd:whiteSpace value="collapse" fixed="true" + id="base64Binary.whiteSpace"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="anyURI" id="anyURI"> + <xsd:annotation> + <xsd:appinfo> + <hfp:hasFacet name="length"/> + <hfp:hasFacet name="minLength"/> + <hfp:hasFacet name="maxLength"/> + <hfp:hasFacet name="pattern"/> + <hfp:hasFacet name="enumeration"/> + <hfp:hasFacet name="whiteSpace"/> + <hfp:hasProperty name="ordered" value="false"/> + <hfp:hasProperty name="bounded" value="false"/> + <hfp:hasProperty name="cardinality" + value="countably infinite"/> + <hfp:hasProperty name="numeric" value="false"/> + </xsd:appinfo> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#anyURI"/> + </xsd:annotation> + <xsd:restriction base="xsd:anySimpleType"> + <xsd:whiteSpace value="collapse" fixed="true" + id="anyURI.whiteSpace"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="QName" id="QName"> + <xsd:annotation> + <xsd:appinfo> + <hfp:hasFacet name="length"/> + <hfp:hasFacet name="minLength"/> + <hfp:hasFacet name="maxLength"/> + <hfp:hasFacet name="pattern"/> + <hfp:hasFacet name="enumeration"/> + <hfp:hasFacet name="whiteSpace"/> + <hfp:hasProperty name="ordered" value="false"/> + <hfp:hasProperty name="bounded" value="false"/> + <hfp:hasProperty name="cardinality" + value="countably infinite"/> + <hfp:hasProperty name="numeric" value="false"/> + </xsd:appinfo> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#QName"/> + </xsd:annotation> + <xsd:restriction base="xsd:anySimpleType"> + <xsd:whiteSpace value="collapse" fixed="true" + id="QName.whiteSpace"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="NOTATION" id="NOTATION"> + <xsd:annotation> + <xsd:appinfo> + <hfp:hasFacet name="length"/> + <hfp:hasFacet name="minLength"/> + <hfp:hasFacet name="maxLength"/> + <hfp:hasFacet name="pattern"/> + <hfp:hasFacet name="enumeration"/> + <hfp:hasFacet name="whiteSpace"/> + <hfp:hasProperty name="ordered" value="false"/> + <hfp:hasProperty name="bounded" value="false"/> + <hfp:hasProperty name="cardinality" + value="countably infinite"/> + <hfp:hasProperty name="numeric" value="false"/> + </xsd:appinfo> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#NOTATION"/> + <xsd:documentation> + NOTATION cannot be used directly in a schema; rather a type + must be derived from it by specifying at least one enumeration + facet whose value is the name of a NOTATION declared in the + schema. + </xsd:documentation> + </xsd:annotation> + <xsd:restriction base="xsd:anySimpleType"> + <xsd:whiteSpace value="collapse" fixed="true" + id="NOTATION.whiteSpace"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:annotation> + <xsd:documentation> + Now the derived primitive types + </xsd:documentation> + </xsd:annotation> + + <xsd:simpleType name="normalizedString" id="normalizedString"> + <xsd:annotation> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#normalizedString"/> + </xsd:annotation> + <xsd:restriction base="xsd:string"> + <xsd:whiteSpace value="replace" + id="normalizedString.whiteSpace"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="token" id="token"> + <xsd:annotation> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#token"/> + </xsd:annotation> + <xsd:restriction base="xsd:normalizedString"> + <xsd:whiteSpace value="collapse" id="token.whiteSpace"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="language" id="language"> + <xsd:annotation> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#language"/> + </xsd:annotation> + <xsd:restriction base="xsd:token"> + <xsd:pattern + value="[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*" + id="language.pattern"> + <xsd:annotation> + <xsd:documentation + source="http://www.ietf.org/rfc/rfc3066.txt"> + pattern specifies the content of section 2.12 of XML 1.0e2 + and RFC 3066 (Revised version of RFC 1766). + </xsd:documentation> + </xsd:annotation> + </xsd:pattern> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="IDREFS" id="IDREFS"> + <xsd:annotation> + <xsd:appinfo> + <hfp:hasFacet name="length"/> + <hfp:hasFacet name="minLength"/> + <hfp:hasFacet name="maxLength"/> + <hfp:hasFacet name="enumeration"/> + <hfp:hasFacet name="whiteSpace"/> + <hfp:hasFacet name="pattern"/> + <hfp:hasProperty name="ordered" value="false"/> + <hfp:hasProperty name="bounded" value="false"/> + <hfp:hasProperty name="cardinality" + value="countably infinite"/> + <hfp:hasProperty name="numeric" value="false"/> + </xsd:appinfo> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#IDREFS"/> + </xsd:annotation> + <xsd:restriction> + <xsd:simpleType> + <xsd:list itemType="xsd:IDREF"/> + </xsd:simpleType> + <xsd:minLength value="1" id="IDREFS.minLength"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="ENTITIES" id="ENTITIES"> + <xsd:annotation> + <xsd:appinfo> + <hfp:hasFacet name="length"/> + <hfp:hasFacet name="minLength"/> + <hfp:hasFacet name="maxLength"/> + <hfp:hasFacet name="enumeration"/> + <hfp:hasFacet name="whiteSpace"/> + <hfp:hasFacet name="pattern"/> + <hfp:hasProperty name="ordered" value="false"/> + <hfp:hasProperty name="bounded" value="false"/> + <hfp:hasProperty name="cardinality" + value="countably infinite"/> + <hfp:hasProperty name="numeric" value="false"/> + </xsd:appinfo> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#ENTITIES"/> + </xsd:annotation> + <xsd:restriction> + <xsd:simpleType> + <xsd:list itemType="xsd:ENTITY"/> + </xsd:simpleType> + <xsd:minLength value="1" id="ENTITIES.minLength"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="NMTOKEN" id="NMTOKEN"> + <xsd:annotation> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#NMTOKEN"/> + </xsd:annotation> + <xsd:restriction base="xsd:token"> + <xsd:pattern value="\c+" id="NMTOKEN.pattern"> + <xsd:annotation> + <xsd:documentation + source="http://www.w3.org/TR/REC-xml#NT-Nmtoken"> + pattern matches production 7 from the XML spec + </xsd:documentation> + </xsd:annotation> + </xsd:pattern> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="NMTOKENS" id="NMTOKENS"> + <xsd:annotation> + <xsd:appinfo> + <hfp:hasFacet name="length"/> + <hfp:hasFacet name="minLength"/> + <hfp:hasFacet name="maxLength"/> + <hfp:hasFacet name="enumeration"/> + <hfp:hasFacet name="whiteSpace"/> + <hfp:hasFacet name="pattern"/> + <hfp:hasProperty name="ordered" value="false"/> + <hfp:hasProperty name="bounded" value="false"/> + <hfp:hasProperty name="cardinality" + value="countably infinite"/> + <hfp:hasProperty name="numeric" value="false"/> + </xsd:appinfo> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#NMTOKENS"/> + </xsd:annotation> + <xsd:restriction> + <xsd:simpleType> + <xsd:list itemType="xsd:NMTOKEN"/> + </xsd:simpleType> + <xsd:minLength value="1" id="NMTOKENS.minLength"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="Name" id="Name"> + <xsd:annotation> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#Name"/> + </xsd:annotation> + <xsd:restriction base="xsd:token"> + <xsd:pattern value="\i\c*" id="Name.pattern"> + <xsd:annotation> + <xsd:documentation + source="http://www.w3.org/TR/REC-xml#NT-Name"> + pattern matches production 5 from the XML spec + </xsd:documentation> + </xsd:annotation> + </xsd:pattern> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="NCName" id="NCName"> + <xsd:annotation> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#NCName"/> + </xsd:annotation> + <xsd:restriction base="xsd:Name"> + <xsd:pattern value="[\i-[:]][\c-[:]]*" id="NCName.pattern"> + <xsd:annotation> + <xsd:documentation + source="http://www.w3.org/TR/REC-xml-names/#NT-NCName"> + pattern matches production 4 from the Namespaces in XML spec + </xsd:documentation> + </xsd:annotation> + </xsd:pattern> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="ID" id="ID"> + <xsd:annotation> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#ID"/> + </xsd:annotation> + <xsd:restriction base="xsd:NCName"/> + </xsd:simpleType> + + <xsd:simpleType name="IDREF" id="IDREF"> + <xsd:annotation> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#IDREF"/> + </xsd:annotation> + <xsd:restriction base="xsd:NCName"/> + </xsd:simpleType> + + <xsd:simpleType name="ENTITY" id="ENTITY"> + <xsd:annotation> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#ENTITY"/> + </xsd:annotation> + <xsd:restriction base="xsd:NCName"/> + </xsd:simpleType> + + <xsd:simpleType name="integer" id="integer"> + <xsd:annotation> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#integer"/> + </xsd:annotation> + <xsd:restriction base="xsd:decimal"> + <xsd:fractionDigits value="0" fixed="true" id="integer.fractionDigits"/> + <xsd:pattern value="[\-+]?[0-9]+"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="nonPositiveInteger" id="nonPositiveInteger"> + <xsd:annotation> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#nonPositiveInteger"/> + </xsd:annotation> + <xsd:restriction base="xsd:integer"> + <xsd:maxInclusive value="0" id="nonPositiveInteger.maxInclusive"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="negativeInteger" id="negativeInteger"> + <xsd:annotation> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#negativeInteger"/> + </xsd:annotation> + <xsd:restriction base="xsd:nonPositiveInteger"> + <xsd:maxInclusive value="-1" id="negativeInteger.maxInclusive"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="long" id="long"> + <xsd:annotation> + <xsd:appinfo> + <hfp:hasProperty name="bounded" value="true"/> + <hfp:hasProperty name="cardinality" value="finite"/> + </xsd:appinfo> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#long"/> + </xsd:annotation> + <xsd:restriction base="xsd:integer"> + <xsd:minInclusive value="-9223372036854775808" id="long.minInclusive"/> + <xsd:maxInclusive value="9223372036854775807" id="long.maxInclusive"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="int" id="int"> + <xsd:annotation> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#int"/> + </xsd:annotation> + <xsd:restriction base="xsd:long"> + <xsd:minInclusive value="-2147483648" id="int.minInclusive"/> + <xsd:maxInclusive value="2147483647" id="int.maxInclusive"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="short" id="short"> + <xsd:annotation> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#short"/> + </xsd:annotation> + <xsd:restriction base="xsd:int"> + <xsd:minInclusive value="-32768" id="short.minInclusive"/> + <xsd:maxInclusive value="32767" id="short.maxInclusive"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="byte" id="byte"> + <xsd:annotation> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#byte"/> + </xsd:annotation> + <xsd:restriction base="xsd:short"> + <xsd:minInclusive value="-128" id="byte.minInclusive"/> + <xsd:maxInclusive value="127" id="byte.maxInclusive"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="nonNegativeInteger" id="nonNegativeInteger"> + <xsd:annotation> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#nonNegativeInteger"/> + </xsd:annotation> + <xsd:restriction base="xsd:integer"> + <xsd:minInclusive value="0" id="nonNegativeInteger.minInclusive"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="unsignedLong" id="unsignedLong"> + <xsd:annotation> + <xsd:appinfo> + <hfp:hasProperty name="bounded" value="true"/> + <hfp:hasProperty name="cardinality" value="finite"/> + </xsd:appinfo> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#unsignedLong"/> + </xsd:annotation> + <xsd:restriction base="xsd:nonNegativeInteger"> + <xsd:maxInclusive value="18446744073709551615" + id="unsignedLong.maxInclusive"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="unsignedInt" id="unsignedInt"> + <xsd:annotation> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#unsignedInt"/> + </xsd:annotation> + <xsd:restriction base="xsd:unsignedLong"> + <xsd:maxInclusive value="4294967295" + id="unsignedInt.maxInclusive"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="unsignedShort" id="unsignedShort"> + <xsd:annotation> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#unsignedShort"/> + </xsd:annotation> + <xsd:restriction base="xsd:unsignedInt"> + <xsd:maxInclusive value="65535" + id="unsignedShort.maxInclusive"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="unsignedByte" id="unsignedByte"> + <xsd:annotation> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#unsignedByte"/> + </xsd:annotation> + <xsd:restriction base="xsd:unsignedShort"> + <xsd:maxInclusive value="255" id="unsignedByte.maxInclusive"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="positiveInteger" id="positiveInteger"> + <xsd:annotation> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#positiveInteger"/> + </xsd:annotation> + <xsd:restriction base="xsd:nonNegativeInteger"> + <xsd:minInclusive value="1" id="positiveInteger.minInclusive"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="derivationControl"> + <xsd:annotation> + <xsd:documentation> + A utility type, not for public use</xsd:documentation> + </xsd:annotation> + <xsd:restriction base="xsd:NMTOKEN"> + <xsd:enumeration value="substitution"/> + <xsd:enumeration value="extension"/> + <xsd:enumeration value="restriction"/> + <xsd:enumeration value="list"/> + <xsd:enumeration value="union"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:group name="simpleDerivation"> + <xsd:choice> + <xsd:element ref="xsd:restriction"/> + <xsd:element ref="xsd:list"/> + <xsd:element ref="xsd:union"/> + </xsd:choice> + </xsd:group> + + <xsd:simpleType name="simpleDerivationSet"> + <xsd:annotation> + <xsd:documentation> + #all or (possibly empty) subset of {restriction, union, list} + </xsd:documentation> + <xsd:documentation> + A utility type, not for public use</xsd:documentation> + </xsd:annotation> + <xsd:union> + <xsd:simpleType> + <xsd:restriction base="xsd:token"> + <xsd:enumeration value="#all"/> + </xsd:restriction> + </xsd:simpleType> + <xsd:simpleType> + <xsd:list> + <xsd:simpleType> + <xsd:restriction base="xsd:derivationControl"> + <xsd:enumeration value="list"/> + <xsd:enumeration value="union"/> + <xsd:enumeration value="restriction"/> + </xsd:restriction> + </xsd:simpleType> + </xsd:list> + </xsd:simpleType> + </xsd:union> + </xsd:simpleType> + + <xsd:complexType name="simpleType" abstract="true"> + <xsd:complexContent> + <xsd:extension base="xsd:annotated"> + <xsd:group ref="xsd:simpleDerivation"/> + <xsd:attribute name="final" type="xsd:simpleDerivationSet"/> + <xsd:attribute name="name" type="xsd:NCName"> + <xsd:annotation> + <xsd:documentation> + Can be restricted to required or forbidden + </xsd:documentation> + </xsd:annotation> + </xsd:attribute> + </xsd:extension> + </xsd:complexContent> + </xsd:complexType> + + <xsd:complexType name="topLevelSimpleType"> + <xsd:complexContent> + <xsd:restriction base="xsd:simpleType"> + <xsd:sequence> + <xsd:element ref="xsd:annotation" minOccurs="0"/> + <xsd:group ref="xsd:simpleDerivation"/> + </xsd:sequence> + <xsd:attribute name="name" use="required" + type="xsd:NCName"> + <xsd:annotation> + <xsd:documentation> + Required at the top level + </xsd:documentation> + </xsd:annotation> + </xsd:attribute> + <xsd:anyAttribute namespace="##other" processContents="lax"/> + </xsd:restriction> + </xsd:complexContent> + </xsd:complexType> + + <xsd:complexType name="localSimpleType"> + <xsd:complexContent> + <xsd:restriction base="xsd:simpleType"> + <xsd:sequence> + <xsd:element ref="xsd:annotation" minOccurs="0"/> + <xsd:group ref="xsd:simpleDerivation"/> + </xsd:sequence> + <xsd:attribute name="name" use="prohibited"> + <xsd:annotation> + <xsd:documentation> + Forbidden when nested + </xsd:documentation> + </xsd:annotation> + </xsd:attribute> + <xsd:attribute name="final" use="prohibited"/> + <xsd:anyAttribute namespace="##other" processContents="lax"/> + </xsd:restriction> + </xsd:complexContent> + </xsd:complexType> + + <xsd:element name="simpleType" type="xsd:topLevelSimpleType" id="simpleType"> + <xsd:annotation> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#element-simpleType"/> + </xsd:annotation> + </xsd:element> + + <xsd:group name="facets"> + <xsd:annotation> + <xsd:documentation> + We should use a substitution group for facets, but + that's ruled out because it would allow users to + add their own, which we're not ready for yet. + </xsd:documentation> + </xsd:annotation> + <xsd:choice> + <xsd:element ref="xsd:minExclusive"/> + <xsd:element ref="xsd:minInclusive"/> + <xsd:element ref="xsd:maxExclusive"/> + <xsd:element ref="xsd:maxInclusive"/> + <xsd:element ref="xsd:totalDigits"/> + <xsd:element ref="xsd:fractionDigits"/> + <xsd:element ref="xsd:length"/> + <xsd:element ref="xsd:minLength"/> + <xsd:element ref="xsd:maxLength"/> + <xsd:element ref="xsd:enumeration"/> + <xsd:element ref="xsd:whiteSpace"/> + <xsd:element ref="xsd:pattern"/> + </xsd:choice> + </xsd:group> + + <xsd:group name="simpleRestrictionModel"> + <xsd:sequence> + <xsd:element name="simpleType" type="xsd:localSimpleType" minOccurs="0"/> + <xsd:group ref="xsd:facets" minOccurs="0" maxOccurs="unbounded"/> + </xsd:sequence> + </xsd:group> + + <xsd:element name="restriction" id="restriction"> + <xsd:complexType> + <xsd:annotation> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#element-restriction"> + base attribute and simpleType child are mutually + exclusive, but one or other is required + </xsd:documentation> + </xsd:annotation> + <xsd:complexContent> + <xsd:extension base="xsd:annotated"> + <xsd:group ref="xsd:simpleRestrictionModel"/> + <xsd:attribute name="base" type="xsd:QName" use="optional"/> + </xsd:extension> + </xsd:complexContent> + </xsd:complexType> + </xsd:element> + + <xsd:element name="list" id="list"> + <xsd:complexType> + <xsd:annotation> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#element-list"> + itemType attribute and simpleType child are mutually + exclusive, but one or other is required + </xsd:documentation> + </xsd:annotation> + <xsd:complexContent> + <xsd:extension base="xsd:annotated"> + <xsd:sequence> + <xsd:element name="simpleType" type="xsd:localSimpleType" + minOccurs="0"/> + </xsd:sequence> + <xsd:attribute name="itemType" type="xsd:QName" use="optional"/> + </xsd:extension> + </xsd:complexContent> + </xsd:complexType> + </xsd:element> + + <xsd:element name="union" id="union"> + <xsd:complexType> + <xsd:annotation> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#element-union"> + memberTypes attribute must be non-empty or there must be + at least one simpleType child + </xsd:documentation> + </xsd:annotation> + <xsd:complexContent> + <xsd:extension base="xsd:annotated"> + <xsd:sequence> + <xsd:element name="simpleType" type="xsd:localSimpleType" + minOccurs="0" maxOccurs="unbounded"/> + </xsd:sequence> + <xsd:attribute name="memberTypes" use="optional"> + <xsd:simpleType> + <xsd:list itemType="xsd:QName"/> + </xsd:simpleType> + </xsd:attribute> + </xsd:extension> + </xsd:complexContent> + </xsd:complexType> + </xsd:element> + + <xsd:complexType name="facet"> + <xsd:complexContent> + <xsd:extension base="xsd:annotated"> + <xsd:attribute name="value" use="required"/> + <xsd:attribute name="fixed" type="xsd:boolean" use="optional" + default="false"/> + </xsd:extension> + </xsd:complexContent> + </xsd:complexType> + + <xsd:complexType name="noFixedFacet"> + <xsd:complexContent> + <xsd:restriction base="xsd:facet"> + <xsd:sequence> + <xsd:element ref="xsd:annotation" minOccurs="0"/> + </xsd:sequence> + <xsd:attribute name="fixed" use="prohibited"/> + <xsd:anyAttribute namespace="##other" processContents="lax"/> + </xsd:restriction> + </xsd:complexContent> + </xsd:complexType> + + <xsd:element name="minExclusive" id="minExclusive" type="xsd:facet"> + <xsd:annotation> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#element-minExclusive"/> + </xsd:annotation> + </xsd:element> + <xsd:element name="minInclusive" id="minInclusive" type="xsd:facet"> + <xsd:annotation> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#element-minInclusive"/> + </xsd:annotation> + </xsd:element> + + <xsd:element name="maxExclusive" id="maxExclusive" type="xsd:facet"> + <xsd:annotation> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#element-maxExclusive"/> + </xsd:annotation> + </xsd:element> + <xsd:element name="maxInclusive" id="maxInclusive" type="xsd:facet"> + <xsd:annotation> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#element-maxInclusive"/> + </xsd:annotation> + </xsd:element> + + <xsd:complexType name="numFacet"> + <xsd:complexContent> + <xsd:restriction base="xsd:facet"> + <xsd:sequence> + <xsd:element ref="xsd:annotation" minOccurs="0"/> + </xsd:sequence> + <xsd:attribute name="value" type="xsd:nonNegativeInteger" use="required"/> + <xsd:anyAttribute namespace="##other" processContents="lax"/> + </xsd:restriction> + </xsd:complexContent> + </xsd:complexType> + + <xsd:element name="totalDigits" id="totalDigits"> + <xsd:annotation> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#element-totalDigits"/> + </xsd:annotation> + <xsd:complexType> + <xsd:complexContent> + <xsd:restriction base="xsd:numFacet"> + <xsd:sequence> + <xsd:element ref="xsd:annotation" minOccurs="0"/> + </xsd:sequence> + <xsd:attribute name="value" type="xsd:positiveInteger" use="required"/> + <xsd:anyAttribute namespace="##other" processContents="lax"/> + </xsd:restriction> + </xsd:complexContent> + </xsd:complexType> + </xsd:element> + <xsd:element name="fractionDigits" id="fractionDigits" type="xsd:numFacet"> + <xsd:annotation> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#element-fractionDigits"/> + </xsd:annotation> + </xsd:element> + + <xsd:element name="length" id="length" type="xsd:numFacet"> + <xsd:annotation> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#element-length"/> + </xsd:annotation> + </xsd:element> + <xsd:element name="minLength" id="minLength" type="xsd:numFacet"> + <xsd:annotation> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#element-minLength"/> + </xsd:annotation> + </xsd:element> + <xsd:element name="maxLength" id="maxLength" type="xsd:numFacet"> + <xsd:annotation> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#element-maxLength"/> + </xsd:annotation> + </xsd:element> + + <xsd:element name="enumeration" id="enumeration" type="xsd:noFixedFacet"> + <xsd:annotation> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#element-enumeration"/> + </xsd:annotation> + </xsd:element> + + <xsd:element name="whiteSpace" id="whiteSpace"> + <xsd:annotation> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#element-whiteSpace"/> + </xsd:annotation> + <xsd:complexType> + <xsd:complexContent> + <xsd:restriction base="xsd:facet"> + <xsd:sequence> + <xsd:element ref="xsd:annotation" minOccurs="0"/> + </xsd:sequence> + <xsd:attribute name="value" use="required"> + <xsd:simpleType> + <xsd:restriction base="xsd:NMTOKEN"> + <xsd:enumeration value="preserve"/> + <xsd:enumeration value="replace"/> + <xsd:enumeration value="collapse"/> + </xsd:restriction> + </xsd:simpleType> + </xsd:attribute> + <xsd:anyAttribute namespace="##other" processContents="lax"/> + </xsd:restriction> + </xsd:complexContent> + </xsd:complexType> + </xsd:element> + + <xsd:element name="pattern" id="pattern"> + <xsd:annotation> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#element-pattern"/> + </xsd:annotation> + <xsd:complexType> + <xsd:complexContent> + <xsd:restriction base="xsd:noFixedFacet"> + <xsd:sequence> + <xsd:element ref="xsd:annotation" minOccurs="0"/> + </xsd:sequence> + <xsd:attribute name="value" type="xsd:string" use="required"/> + <xsd:anyAttribute namespace="##other" processContents="lax"/> + </xsd:restriction> + </xsd:complexContent> + </xsd:complexType> + </xsd:element> + +</xsd:schema> diff --git a/Klausuren/Sda1/2018Summer/Exam/src/main/resources/xml.xsd b/Klausuren/Sda1/2018Summer/Exam/src/main/resources/xml.xsd new file mode 100644 index 0000000000000000000000000000000000000000..e60e8c5981266215cba190f36b070b758b05c47b --- /dev/null +++ b/Klausuren/Sda1/2018Summer/Exam/src/main/resources/xml.xsd @@ -0,0 +1,286 @@ +<?xml version='1.0'?> +<xs:schema targetNamespace="http://www.w3.org/XML/1998/namespace" + xmlns:xs="http://www.w3.org/2001/XMLSchema" + xmlns ="http://www.w3.org/1999/xhtml" + xml:lang="en"> + + <xs:annotation> + <xs:documentation> + <div> + <h1>About the XML namespace</h1> + + <div class="bodytext"> + <p> + This schema document describes the XML namespace, in a form + suitable for import by other schema documents. + </p> + <p> + See <a href="http://www.w3.org/XML/1998/namespace.html"> + http://www.w3.org/XML/1998/namespace.html</a> and + <a href="http://www.w3.org/TR/REC-xml"> + http://www.w3.org/TR/REC-xml</a> for information + about this namespace. + </p> + <p> + Note that local names in this namespace are intended to be + defined only by the World Wide Web Consortium or its subgroups. + The names currently defined in this namespace are listed below. + They should not be used with conflicting semantics by any Working + Group, specification, or document instance. + </p> + <p> + See further below in this document for more information about <a + href="#usage">how to refer to this schema document from your own + XSD schema documents</a> and about <a href="#nsversioning">the + namespace-versioning policy governing this schema document</a>. + </p> + </div> + </div> + </xs:documentation> + </xs:annotation> + + <xs:attribute name="lang"> + <xs:annotation> + <xs:documentation> + <div> + + <h3>lang (as an attribute name)</h3> + <p> + denotes an attribute whose value + is a language code for the natural language of the content of + any element; its value is inherited. This name is reserved + by virtue of its definition in the XML specification.</p> + + </div> + <div> + <h4>Notes</h4> + <p> + Attempting to install the relevant ISO 2- and 3-letter + codes as the enumerated possible values is probably never + going to be a realistic possibility. + </p> + <p> + See BCP 47 at <a href="http://www.rfc-editor.org/rfc/bcp/bcp47.txt"> + http://www.rfc-editor.org/rfc/bcp/bcp47.txt</a> + and the IANA language subtag registry at + <a href="http://www.iana.org/assignments/language-subtag-registry"> + http://www.iana.org/assignments/language-subtag-registry</a> + for further information. + </p> + <p> + The union allows for the 'un-declaration' of xml:lang with + the empty string. + </p> + </div> + </xs:documentation> + </xs:annotation> + <xs:simpleType> + <xs:union memberTypes="xs:language"> + <xs:simpleType> + <xs:restriction base="xs:string"> + <xs:enumeration value=""/> + </xs:restriction> + </xs:simpleType> + </xs:union> + </xs:simpleType> + </xs:attribute> + + <xs:attribute name="space"> + <xs:annotation> + <xs:documentation> + <div> + + <h3>space (as an attribute name)</h3> + <p> + denotes an attribute whose + value is a keyword indicating what whitespace processing + discipline is intended for the content of the element; its + value is inherited. This name is reserved by virtue of its + definition in the XML specification.</p> + + </div> + </xs:documentation> + </xs:annotation> + <xs:simpleType> + <xs:restriction base="xs:NCName"> + <xs:enumeration value="default"/> + <xs:enumeration value="preserve"/> + </xs:restriction> + </xs:simpleType> + </xs:attribute> + + <xs:attribute name="base" type="xs:anyURI"> <xs:annotation> + <xs:documentation> + <div> + + <h3>base (as an attribute name)</h3> + <p> + denotes an attribute whose value + provides a URI to be used as the base for interpreting any + relative URIs in the scope of the element on which it + appears; its value is inherited. This name is reserved + by virtue of its definition in the XML Base specification.</p> + + <p> + See <a + href="http://www.w3.org/TR/xmlbase/">http://www.w3.org/TR/xmlbase/</a> + for information about this attribute. + </p> + </div> + </xs:documentation> + </xs:annotation> + </xs:attribute> + + <xs:attribute name="id" type="xs:ID"> + <xs:annotation> + <xs:documentation> + <div> + + <h3>id (as an attribute name)</h3> + <p> + denotes an attribute whose value + should be interpreted as if declared to be of type ID. + This name is reserved by virtue of its definition in the + xml:id specification.</p> + + <p> + See <a + href="http://www.w3.org/TR/xml-id/">http://www.w3.org/TR/xml-id/</a> + for information about this attribute. + </p> + </div> + </xs:documentation> + </xs:annotation> + </xs:attribute> + + <xs:attributeGroup name="specialAttrs"> + <xs:attribute ref="xml:base"/> + <xs:attribute ref="xml:lang"/> + <xs:attribute ref="xml:space"/> + <xs:attribute ref="xml:id"/> + </xs:attributeGroup> + + <xs:annotation> + <xs:documentation> + <div> + + <h3>Father (in any context at all)</h3> + + <div class="bodytext"> + <p> + denotes Jon Bosak, the chair of + the original XML Working Group. This name is reserved by + the following decision of the W3C XML Plenary and + XML Coordination groups: + </p> + <blockquote> + <p> + In appreciation for his vision, leadership and + dedication the W3C XML Plenary on this 10th day of + February, 2000, reserves for Jon Bosak in perpetuity + the XML name "xml:Father". + </p> + </blockquote> + </div> + </div> + </xs:documentation> + </xs:annotation> + + <xs:annotation> + <xs:documentation> + <div xml:id="usage" id="usage"> + <h2><a name="usage">About this schema document</a></h2> + + <div class="bodytext"> + <p> + This schema defines attributes and an attribute group suitable + for use by schemas wishing to allow <code>xml:base</code>, + <code>xml:lang</code>, <code>xml:space</code> or + <code>xml:id</code> attributes on elements they define. + </p> + <p> + To enable this, such a schema must import this schema for + the XML namespace, e.g. as follows: + </p> + <pre> + <schema . . .> + . . . + <import namespace="http://www.w3.org/XML/1998/namespace" + schemaLocation="http://www.w3.org/2001/xml.xsd"/> + </pre> + <p> + or + </p> + <pre> + <import namespace="http://www.w3.org/XML/1998/namespace" + schemaLocation="http://www.w3.org/2009/01/xml.xsd"/> + </pre> + <p> + Subsequently, qualified reference to any of the attributes or the + group defined below will have the desired effect, e.g. + </p> + <pre> + <type . . .> + . . . + <attributeGroup ref="xml:specialAttrs"/> + </pre> + <p> + will define a type which will schema-validate an instance element + with any of those attributes. + </p> + </div> + </div> + </xs:documentation> + </xs:annotation> + + <xs:annotation> + <xs:documentation> + <div id="nsversioning" xml:id="nsversioning"> + <h2><a name="nsversioning">Versioning policy for this schema document</a></h2> + <div class="bodytext"> + <p> + In keeping with the XML Schema WG's standard versioning + policy, this schema document will persist at + <a href="http://www.w3.org/2009/01/xml.xsd"> + http://www.w3.org/2009/01/xml.xsd</a>. + </p> + <p> + At the date of issue it can also be found at + <a href="http://www.w3.org/2001/xml.xsd"> + http://www.w3.org/2001/xml.xsd</a>. + </p> + <p> + The schema document at that URI may however change in the future, + in order to remain compatible with the latest version of XML + Schema itself, or with the XML namespace itself. In other words, + if the XML Schema or XML namespaces change, the version of this + document at <a href="http://www.w3.org/2001/xml.xsd"> + http://www.w3.org/2001/xml.xsd + </a> + will change accordingly; the version at + <a href="http://www.w3.org/2009/01/xml.xsd"> + http://www.w3.org/2009/01/xml.xsd + </a> + will not change. + </p> + <p> + Previous dated (and unchanging) versions of this schema + document are at: + </p> + <ul> + <li><a href="http://www.w3.org/2009/01/xml.xsd"> + http://www.w3.org/2009/01/xml.xsd</a></li> + <li><a href="http://www.w3.org/2007/08/xml.xsd"> + http://www.w3.org/2007/08/xml.xsd</a></li> + <li><a href="http://www.w3.org/2004/10/xml.xsd"> + http://www.w3.org/2004/10/xml.xsd</a></li> + <li><a href="http://www.w3.org/2001/03/xml.xsd"> + http://www.w3.org/2001/03/xml.xsd</a></li> + </ul> + </div> + </div> + </xs:documentation> + </xs:annotation> + +</xs:schema> + diff --git a/Klausuren/Sda1/2018Summer/Exam/src/test/java/de/hdm_stuttgart/mi/sda1/test/ex1/SchemaTest.java b/Klausuren/Sda1/2018Summer/Exam/src/test/java/de/hdm_stuttgart/mi/sda1/test/ex1/SchemaTest.java deleted file mode 100644 index 82e54951d870ef7ba64a650392f1cd0746d8f292..0000000000000000000000000000000000000000 --- a/Klausuren/Sda1/2018Summer/Exam/src/test/java/de/hdm_stuttgart/mi/sda1/test/ex1/SchemaTest.java +++ /dev/null @@ -1,26 +0,0 @@ -package de.hdm_stuttgart.mi.sda1.test.ex1; - -import de.hdm_stuttgart.mi.unitmarking.xsd.InstanceSetEvaluation; -import org.junit.Assert; -import org.junit.Test; - -/** - * Unit test for an XML instance set. CLI by: - * java -cp target/solvejpa-0.9-fat-tests.jar org.junit.runner.JUnitCore SchemaTest - */ -@SuppressWarnings("static-method") -public class SchemaTest { - /** - * Testing a suite of XML instances. - */ - @Test - public void testXmlInstanceSet() { - - final InstanceSetEvaluation ise = - new InstanceSetEvaluation("SchemaTest", "Schema/bib.xsd"); - - System.out.println(ise.getMessages()); - - Assert.assertTrue(ise.getErrorMessages(), ise.allTestsSucceeded); - } -} \ No newline at end of file diff --git a/Klausuren/Sda1/2018Summer/Exam/src/test/java/de/hdm_stuttgart/mi/sda1/test/ex1/ShowReachedPoints.java b/Klausuren/Sda1/2018Summer/Exam/src/test/java/de/hdm_stuttgart/mi/sda1/test/ex1/ShowReachedPoints.java new file mode 100644 index 0000000000000000000000000000000000000000..34d916adddcb0a8576cd2586321d3c28b3b89583 --- /dev/null +++ b/Klausuren/Sda1/2018Summer/Exam/src/test/java/de/hdm_stuttgart/mi/sda1/test/ex1/ShowReachedPoints.java @@ -0,0 +1,22 @@ +package de.hdm_stuttgart.mi.sda1.test.ex1; + +import de.hdm_stuttgart.mi.exam.unitmarking.RunTests; + +/** + * Unit test for an XML instance set. CLI by: + * java -cp target/solvejpa-0.9-fat-tests.jar org.junit.runner.JUnitCore ShowReachedPoints + */ +@SuppressWarnings("static-method") +public class ShowReachedPoints { + /** + * Execution reveals the number of reached points. + * + * @param args Unused + */ + public static void main(String[] args) { + RunTests.exec( + "Aufgabe 1", + Test_SchemaByInstances.class + ); + } +} \ No newline at end of file diff --git a/Klausuren/Sda1/2018Summer/Exam/src/test/java/de/hdm_stuttgart/mi/sda1/test/ex1/Test_SchemaByInstances.java b/Klausuren/Sda1/2018Summer/Exam/src/test/java/de/hdm_stuttgart/mi/sda1/test/ex1/Test_SchemaByInstances.java new file mode 100644 index 0000000000000000000000000000000000000000..7ec681b6a8bf431402905ec90abaa1fa0c1a3694 --- /dev/null +++ b/Klausuren/Sda1/2018Summer/Exam/src/test/java/de/hdm_stuttgart/mi/sda1/test/ex1/Test_SchemaByInstances.java @@ -0,0 +1,153 @@ +package de.hdm_stuttgart.mi.sda1.test.ex1; + +import de.hdm_stuttgart.mi.exam.unitmarking.ExaminationTestDefaults; +import de.hdm_stuttgart.mi.exam.unitmarking.Marking; +import de.hdm_stuttgart.mi.exam.unitmarking.xml.XmlTestSupport; +import org.junit.FixMethodOrder; +import org.junit.Test; +import org.junit.runners.MethodSorters; + +@FixMethodOrder(MethodSorters.NAME_ASCENDING) +public class Test_SchemaByInstances extends ExaminationTestDefaults { + + private final XmlTestSupport xmlTestSupport = new XmlTestSupport("SchemaTest"); + + @Test + @Marking(points = 1) + public void test_0100_valid_minimum() { + xmlTestSupport.assertValid("0100_valid_minimum.xml"); + } + + @Test + @Marking(points = 1) + public void test_0200_valid_noPublisher() { + xmlTestSupport.assertValid("0200_valid_noPublisher.xml"); + } + + @Test + @Marking(points = 1) + public void test_0210_valid_singlePublisher() { + xmlTestSupport.assertValid("0210_valid_singlePublisher.xml"); + } + + @Test + @Marking(points = 1) + public void test_0230_valid_multiplePublisher() { + xmlTestSupport.assertValid("0230_valid_multiplePublisher.xml"); + } + + @Test + @Marking(points = 2) + public void test_0240_invalid_duplicatePublisherId() { + xmlTestSupport.assertInvalid("0240_invalid_duplicatePublisherId.xml"); + xmlTestSupport.assertValid("0230_valid_multiplePublisher.xml"); + } + + @Test + @Marking(points = 2) + public void test_0250_invalid_duplicatePublisherNameCity() { + xmlTestSupport.assertInvalid("0250_invalid_duplicatePublisherNameCity.xml"); + xmlTestSupport.assertValid("0230_valid_multiplePublisher.xml"); + } + + @Test + @Marking(points = 2) + public void test_0260_invalid_publisherLevel() { + xmlTestSupport.assertInvalid("0260_invalid_publisherLevel.xml"); + xmlTestSupport.assertValid("0230_valid_multiplePublisher.xml"); + } + + @Test + @Marking(points = 1) + public void test_0300_valid_books() { + xmlTestSupport.assertValid("0300_valid_books.xml"); + } + + @Test + @Marking(points = 2) + public void test_0310_invalid_bookNoTitle() { + xmlTestSupport.assertInvalid("0310_invalid_bookNoTitle.xml"); + xmlTestSupport.assertValid("0300_valid_books.xml"); + } + + @Test + @Marking(points = 2) + public void test_0320_invalid_bookNoAuthor() { + xmlTestSupport.assertInvalid("0320_invalid_bookNoAuthor.xml"); + xmlTestSupport.assertValid("0300_valid_books.xml"); + } + + @Test + @Marking(points = 1) + public void test_0400_valid_websites() { + xmlTestSupport.assertValid("0400_valid_websites.xml"); + } + + @Test + @Marking(points = 2) + public void test_0410_invalid_websiteDateViolation() { + xmlTestSupport.assertInvalid("0410_invalid_websiteDateViolation.xml"); + xmlTestSupport.assertValid("0400_valid_websites.xml"); + } + + @Test + @Marking(points = 2) + public void test_0420_invalid_websiteMissingAccessDate() { + xmlTestSupport.assertInvalid("0420_invalid_websiteMissingAccessDate.xml"); + xmlTestSupport.assertValid("0400_valid_websites.xml"); + } + + @Test + @Marking(points = 2) + public void test_0430_invalid_websiteMissingUrl() { + xmlTestSupport.assertInvalid("0430_invalid_websiteMissingUrl.xml"); + xmlTestSupport.assertValid("0400_valid_websites.xml"); + } + + @Test + @Marking(points = 2) + public void test_0440_invalid_websiteUrlFormatViolation() { + xmlTestSupport.assertInvalid("0440_invalid_websiteUrlFormatViolation.xml"); + xmlTestSupport.assertValid("0400_valid_websites.xml"); + } + + @Test + @Marking(points = 1) + public void test_0500_valid_booksWebsites() { + xmlTestSupport.assertValid("0500_valid_booksWebsites.xml"); + } + + @Test + @Marking(points = 1) + public void test_0510_invalid_bookDuplicateId() { + xmlTestSupport.assertInvalid("0510_invalid_bookDuplicateId.xml"); + xmlTestSupport.assertValid("0500_valid_booksWebsites.xml"); + } + + @Test + @Marking(points = 1) + public void test_0515_invalid_bookYear() { + xmlTestSupport.assertInvalid("0515_invalid_bookYear.xml"); + xmlTestSupport.assertValid("0500_valid_booksWebsites.xml"); + } + + @Test + @Marking(points = 1) + public void test_0520_invalid_bibDuplicateId() { + xmlTestSupport.assertInvalid("0520_invalid_bibDuplicateId.xml"); + xmlTestSupport.assertValid("0500_valid_booksWebsites.xml"); + } + + @Test + @Marking(points = 1) + public void test_0600_invalid_bookInvalidPublisher() { + xmlTestSupport.assertInvalid("0600_invalid_bookInvalidPublisher.xml"); + xmlTestSupport.assertValid("0300_valid_books.xml"); + } + + @Test + @Marking(points = 1) + public void test_0700_valid_bibPublisherIdCompat() { + xmlTestSupport.assertValid("0700_valid_bibPublisherIdCompat.xml"); + } +} \ No newline at end of file diff --git a/Klausuren/Sda1/2018Summer/Solve/.gitignore b/Klausuren/Sda1/2018Summer/Solve/.gitignore index 9b36bc511f68d6e52aeb8b8e7c5ddfe38ed74218..2466dd25810ef6550a2ec2bc9c591223c21a0f1a 100644 --- a/Klausuren/Sda1/2018Summer/Solve/.gitignore +++ b/Klausuren/Sda1/2018Summer/Solve/.gitignore @@ -5,36 +5,10 @@ dependency-reduced-pom.xml *.log -# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm -# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 - -# User-specific stuff: -.idea/**/workspace.xml -.idea/**/tasks.xml -.idea/dictionaries - -# Sensitive or high-churn files: -.idea/**/dataSources/ -.idea/**/dataSources.ids -.idea/**/dataSources.xml -.idea/**/dataSources.local.xml -.idea/**/sqlDataSources.xml -.idea/**/dynamic.xml -.idea/**/uiDesigner.xml - -# Gradle: -.idea/**/gradle.xml -.idea/**/libraries - -# CMake -cmake-build-debug/ - -# Mongo Explorer plugin: -.idea/**/mongoSettings.xml +/.idea/ *.iws - # IntelliJ out/ @@ -44,9 +18,6 @@ out/ # JIRA plugin atlassian-ide-plugin.xml -# Cursive Clojure plugin -.idea/replstate.xml - # Crashlytics plugin (for Android Studio and IntelliJ) com_crashlytics_export_strings.xml crashlytics.properties diff --git a/Klausuren/Sda1/2018Summer/Solve/Doc/exam.xml b/Klausuren/Sda1/2018Summer/Solve/Doc/exam.xml index 54633021e12a785191b5ecf2156979b1d6c5e4e2..17ec87bded0e18c533be153ae511e05e6d32bf07 100644 --- a/Klausuren/Sda1/2018Summer/Solve/Doc/exam.xml +++ b/Klausuren/Sda1/2018Summer/Solve/Doc/exam.xml @@ -148,7 +148,7 @@ <para>Complete the schema implementation in <filename>Schema/bib.xsd</filename>. <productname>Junit</productname> execution of - <classname>de.hdm_stuttgart.mi.sda1.test.ex1.SchemaTest</classname> + <classname>de.hdm_stuttgart.mi.sda1.test.ex1.ShowReachedPoints</classname> loads all unit tests based on files residing in your project's folder <filename>SchemaTest</filename>. In turn you receive your number of points reached so far including detailed hints about failed @@ -170,7 +170,7 @@ <listitem> <para>Executing - <classname>de.hdm_stuttgart.mi.sda1.test.ex1.SchemaTest</classname> + <classname>de.hdm_stuttgart.mi.sda1.test.ex1.ShowReachedPoints</classname> as a Java application indicates which test documents in <filename>SchemaTest</filename> yet fail the expected outcome being either <quote>valid</quote> of <quote>invalid</quote>. You also get diff --git a/Klausuren/Sda1/2018Summer/Solve/pom.xml b/Klausuren/Sda1/2018Summer/Solve/pom.xml index 0ff1239e3feabe23b9ec93d640162d9b489d81fe..00383527dfcb1bef2955f368db583eb4c7a1423f 100644 --- a/Klausuren/Sda1/2018Summer/Solve/pom.xml +++ b/Klausuren/Sda1/2018Summer/Solve/pom.xml @@ -103,7 +103,7 @@ <dependency> <groupId>de.hdm_stuttgart.mi.exam</groupId> <artifactId>unitmarking</artifactId> - <version>0.9</version> + <version>1.0</version> </dependency> </dependencies> @@ -153,7 +153,7 @@ <configuration> <archive> <manifest> - <mainClass>de.hdm_stuttgart.mi.sda1.test.ShowReachedPoints</mainClass> + <mainClass>de.hdm_stuttgart.mi.sda1.test.ex1.ShowReachedPoints</mainClass> </manifest> </archive> </configuration> diff --git a/Klausuren/Sda1/2018Summer/Solve/src/main/resources/XMLSchema.xsd b/Klausuren/Sda1/2018Summer/Solve/src/main/resources/XMLSchema.xsd new file mode 100644 index 0000000000000000000000000000000000000000..89829f137c946d2135736472ada6bb33a51df385 --- /dev/null +++ b/Klausuren/Sda1/2018Summer/Solve/src/main/resources/XMLSchema.xsd @@ -0,0 +1,2471 @@ +<?xml version='1.0' encoding='UTF-8'?> +<xsd:schema targetNamespace="http://www.w3.org/2001/XMLSchema" + blockDefault="#all" elementFormDefault="qualified" version="1.0" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" xml:lang="EN" + xmlns:hfp="http://www.w3.org/2001/XMLSchema-hasFacetAndProperty"> + <xsd:annotation> + <xsd:documentation> + Part 1 version: Id: structures.xsd,v 1.2 2004/01/15 11:34:25 ht Exp + Part 2 version: Id: datatypes.xsd,v 1.3 2004/01/23 18:11:13 ht Exp + </xsd:documentation> + </xsd:annotation> + + <xsd:annotation> + <xsd:documentation source="http://www.w3.org/TR/2004/PER-xmlschema-1-20040318/structures.html"> + The schema corresponding to this document is normative, + with respect to the syntactic constraints it expresses in the + XML Schema language. The documentation (within <documentation> elements) + below, is not normative, but rather highlights important aspects of + the W3C Recommendation of which this is a part</xsd:documentation> + </xsd:annotation> + + <xsd:annotation> + <xsd:documentation> + The simpleType element and all of its members are defined + towards the end of this schema document</xsd:documentation> + </xsd:annotation> + + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="xml.xsd"> + <xsd:annotation> + <xsd:documentation> + Get access to the xml: attribute groups for xml:lang + as declared on 'schema' and 'documentation' below + </xsd:documentation> + </xsd:annotation> + </xsd:import> + + <xsd:complexType name="openAttrs"> + <xsd:annotation> + <xsd:documentation> + This type is extended by almost all schema types + to allow attributes from other namespaces to be + added to user schemas. + </xsd:documentation> + </xsd:annotation> + <xsd:complexContent> + <xsd:restriction base="xsd:anyType"> + <xsd:anyAttribute namespace="##other" processContents="lax"/> + </xsd:restriction> + </xsd:complexContent> + </xsd:complexType> + + <xsd:complexType name="annotated"> + <xsd:annotation> + <xsd:documentation> + This type is extended by all types which allow annotation + other than <schema> itself + </xsd:documentation> + </xsd:annotation> + <xsd:complexContent> + <xsd:extension base="xsd:openAttrs"> + <xsd:sequence> + <xsd:element ref="xsd:annotation" minOccurs="0"/> + </xsd:sequence> + <xsd:attribute name="id" type="xsd:ID"/> + </xsd:extension> + </xsd:complexContent> + </xsd:complexType> + + <xsd:group name="schemaTop"> + <xsd:annotation> + <xsd:documentation> + This group is for the + elements which occur freely at the top level of schemas. + All of their types are based on the "annotated" type by extension.</xsd:documentation> + </xsd:annotation> + <xsd:choice> + <xsd:group ref="xsd:redefinable"/> + <xsd:element ref="xsd:element"/> + <xsd:element ref="xsd:attribute"/> + <xsd:element ref="xsd:notation"/> + </xsd:choice> + </xsd:group> + + <xsd:group name="redefinable"> + <xsd:annotation> + <xsd:documentation> + This group is for the + elements which can self-redefine (see <redefine> below).</xsd:documentation> + </xsd:annotation> + <xsd:choice> + <xsd:element ref="xsd:simpleType"/> + <xsd:element ref="xsd:complexType"/> + <xsd:element ref="xsd:group"/> + <xsd:element ref="xsd:attributeGroup"/> + </xsd:choice> + </xsd:group> + + <xsd:simpleType name="formChoice"> + <xsd:annotation> + <xsd:documentation> + A utility type, not for public use</xsd:documentation> + </xsd:annotation> + <xsd:restriction base="xsd:NMTOKEN"> + <xsd:enumeration value="qualified"/> + <xsd:enumeration value="unqualified"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="reducedDerivationControl"> + <xsd:annotation> + <xsd:documentation> + A utility type, not for public use</xsd:documentation> + </xsd:annotation> + <xsd:restriction base="xsd:derivationControl"> + <xsd:enumeration value="extension"/> + <xsd:enumeration value="restriction"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="derivationSet"> + <xsd:annotation> + <xsd:documentation> + A utility type, not for public use</xsd:documentation> + <xsd:documentation> + #all or (possibly empty) subset of {extension, restriction}</xsd:documentation> + </xsd:annotation> + <xsd:union> + <xsd:simpleType> + <xsd:restriction base="xsd:token"> + <xsd:enumeration value="#all"/> + </xsd:restriction> + </xsd:simpleType> + <xsd:simpleType> + <xsd:list itemType="xsd:reducedDerivationControl"/> + </xsd:simpleType> + </xsd:union> + </xsd:simpleType> + + <xsd:simpleType name="typeDerivationControl"> + <xsd:annotation> + <xsd:documentation> + A utility type, not for public use</xsd:documentation> + </xsd:annotation> + <xsd:restriction base="xsd:derivationControl"> + <xsd:enumeration value="extension"/> + <xsd:enumeration value="restriction"/> + <xsd:enumeration value="list"/> + <xsd:enumeration value="union"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="fullDerivationSet"> + <xsd:annotation> + <xsd:documentation> + A utility type, not for public use</xsd:documentation> + <xsd:documentation> + #all or (possibly empty) subset of {extension, restriction, list, union}</xsd:documentation> + </xsd:annotation> + <xsd:union> + <xsd:simpleType> + <xsd:restriction base="xsd:token"> + <xsd:enumeration value="#all"/> + </xsd:restriction> + </xsd:simpleType> + <xsd:simpleType> + <xsd:list itemType="xsd:typeDerivationControl"/> + </xsd:simpleType> + </xsd:union> + </xsd:simpleType> + + <xsd:element name="schema" id="schema"> + <xsd:annotation> + <xsd:documentation source="http://www.w3.org/TR/xmlschema-1/#element-schema"/> + </xsd:annotation> + <xsd:complexType> + <xsd:complexContent> + <xsd:extension base="xsd:openAttrs"> + <xsd:sequence> + <xsd:choice minOccurs="0" maxOccurs="unbounded"> + <xsd:element ref="xsd:include"/> + <xsd:element ref="xsd:import"/> + <xsd:element ref="xsd:redefine"/> + <xsd:element ref="xsd:annotation"/> + </xsd:choice> + <xsd:sequence minOccurs="0" maxOccurs="unbounded"> + <xsd:group ref="xsd:schemaTop"/> + <xsd:element ref="xsd:annotation" minOccurs="0" maxOccurs="unbounded"/> + </xsd:sequence> + </xsd:sequence> + <xsd:attribute name="targetNamespace" type="xsd:anyURI"/> + <xsd:attribute name="version" type="xsd:token"/> + <xsd:attribute name="finalDefault" type="xsd:fullDerivationSet" use="optional" default=""/> + <xsd:attribute name="blockDefault" type="xsd:blockSet" use="optional" default=""/> + <xsd:attribute name="attributeFormDefault" type="xsd:formChoice" use="optional" default="unqualified"/> + <xsd:attribute name="elementFormDefault" type="xsd:formChoice" use="optional" default="unqualified"/> + <xsd:attribute name="id" type="xsd:ID"/> + <xsd:attribute ref="xml:lang"/> + </xsd:extension> + </xsd:complexContent> + </xsd:complexType> + + <xsd:key name="element"> + <xsd:selector xpath="xsd:element"/> + <xsd:field xpath="@name"/> + </xsd:key> + + <xsd:key name="attribute"> + <xsd:selector xpath="xsd:attribute"/> + <xsd:field xpath="@name"/> + </xsd:key> + + <xsd:key name="type"> + <xsd:selector xpath="xsd:complexType|xsd:simpleType"/> + <xsd:field xpath="@name"/> + </xsd:key> + + <xsd:key name="group"> + <xsd:selector xpath="xsd:group"/> + <xsd:field xpath="@name"/> + </xsd:key> + + <xsd:key name="attributeGroup"> + <xsd:selector xpath="xsd:attributeGroup"/> + <xsd:field xpath="@name"/> + </xsd:key> + + <xsd:key name="notation"> + <xsd:selector xpath="xsd:notation"/> + <xsd:field xpath="@name"/> + </xsd:key> + + <xsd:key name="identityConstraint"> + <xsd:selector xpath=".//xsd:key|.//xsd:unique|.//xsd:keyref"/> + <xsd:field xpath="@name"/> + </xsd:key> + + </xsd:element> + + <xsd:simpleType name="allNNI"> + <xsd:annotation><xsd:documentation> + for maxOccurs</xsd:documentation></xsd:annotation> + <xsd:union memberTypes="xsd:nonNegativeInteger"> + <xsd:simpleType> + <xsd:restriction base="xsd:NMTOKEN"> + <xsd:enumeration value="unbounded"/> + </xsd:restriction> + </xsd:simpleType> + </xsd:union> + </xsd:simpleType> + + <xsd:attributeGroup name="occurs"> + <xsd:annotation><xsd:documentation> + for all particles</xsd:documentation></xsd:annotation> + <xsd:attribute name="minOccurs" type="xsd:nonNegativeInteger" use="optional" default="1"/> + <xsd:attribute name="maxOccurs" type="xsd:allNNI" use="optional" default="1"/> + </xsd:attributeGroup> + + <xsd:attributeGroup name="defRef"> + <xsd:annotation><xsd:documentation> + for element, group and attributeGroup, + which both define and reference</xsd:documentation></xsd:annotation> + <xsd:attribute name="name" type="xsd:NCName"/> + <xsd:attribute name="ref" type="xsd:QName"/> + </xsd:attributeGroup> + + <xsd:group name="typeDefParticle"> + <xsd:annotation> + <xsd:documentation> + 'complexType' uses this</xsd:documentation></xsd:annotation> + <xsd:choice> + <xsd:element name="group" type="xsd:groupRef"/> + <xsd:element ref="xsd:all"/> + <xsd:element ref="xsd:choice"/> + <xsd:element ref="xsd:sequence"/> + </xsd:choice> + </xsd:group> + + + + <xsd:group name="nestedParticle"> + <xsd:choice> + <xsd:element name="element" type="xsd:localElement"/> + <xsd:element name="group" type="xsd:groupRef"/> + <xsd:element ref="xsd:choice"/> + <xsd:element ref="xsd:sequence"/> + <xsd:element ref="xsd:any"/> + </xsd:choice> + </xsd:group> + + <xsd:group name="particle"> + <xsd:choice> + <xsd:element name="element" type="xsd:localElement"/> + <xsd:element name="group" type="xsd:groupRef"/> + <xsd:element ref="xsd:all"/> + <xsd:element ref="xsd:choice"/> + <xsd:element ref="xsd:sequence"/> + <xsd:element ref="xsd:any"/> + </xsd:choice> + </xsd:group> + + <xsd:complexType name="attribute"> + <xsd:complexContent> + <xsd:extension base="xsd:annotated"> + <xsd:sequence> + <xsd:element name="simpleType" minOccurs="0" type="xsd:localSimpleType"/> + </xsd:sequence> + <xsd:attributeGroup ref="xsd:defRef"/> + <xsd:attribute name="type" type="xsd:QName"/> + <xsd:attribute name="use" use="optional" default="optional"> + <xsd:simpleType> + <xsd:restriction base="xsd:NMTOKEN"> + <xsd:enumeration value="prohibited"/> + <xsd:enumeration value="optional"/> + <xsd:enumeration value="required"/> + </xsd:restriction> + </xsd:simpleType> + </xsd:attribute> + <xsd:attribute name="default" type="xsd:string"/> + <xsd:attribute name="fixed" type="xsd:string"/> + <xsd:attribute name="form" type="xsd:formChoice"/> + </xsd:extension> + </xsd:complexContent> + </xsd:complexType> + + <xsd:complexType name="topLevelAttribute"> + <xsd:complexContent> + <xsd:restriction base="xsd:attribute"> + <xsd:sequence> + <xsd:element ref="xsd:annotation" minOccurs="0"/> + <xsd:element name="simpleType" minOccurs="0" type="xsd:localSimpleType"/> + </xsd:sequence> + <xsd:attribute name="ref" use="prohibited"/> + <xsd:attribute name="form" use="prohibited"/> + <xsd:attribute name="use" use="prohibited"/> + <xsd:attribute name="name" use="required" type="xsd:NCName"/> + <xsd:anyAttribute namespace="##other" processContents="lax"/> + </xsd:restriction> + </xsd:complexContent> + </xsd:complexType> + + <xsd:group name="attrDecls"> + <xsd:sequence> + <xsd:choice minOccurs="0" maxOccurs="unbounded"> + <xsd:element name="attribute" type="xsd:attribute"/> + <xsd:element name="attributeGroup" type="xsd:attributeGroupRef"/> + </xsd:choice> + <xsd:element ref="xsd:anyAttribute" minOccurs="0"/> + </xsd:sequence> + </xsd:group> + + <xsd:element name="anyAttribute" type="xsd:wildcard" id="anyAttribute"> + <xsd:annotation> + <xsd:documentation source="http://www.w3.org/TR/xmlschema-1/#element-anyAttribute"/> + </xsd:annotation> + </xsd:element> + + <xsd:group name="complexTypeModel"> + <xsd:choice> + <xsd:element ref="xsd:simpleContent"/> + <xsd:element ref="xsd:complexContent"/> + <xsd:sequence> + <xsd:annotation> + <xsd:documentation> + This branch is short for + <complexContent> + <restriction base="xsd:anyType"> + ... + </restriction> + </complexContent></xsd:documentation> + </xsd:annotation> + <xsd:group ref="xsd:typeDefParticle" minOccurs="0"/> + <xsd:group ref="xsd:attrDecls"/> + </xsd:sequence> + </xsd:choice> + </xsd:group> + + <xsd:complexType name="complexType" abstract="true"> + <xsd:complexContent> + <xsd:extension base="xsd:annotated"> + <xsd:group ref="xsd:complexTypeModel"/> + <xsd:attribute name="name" type="xsd:NCName"> + <xsd:annotation> + <xsd:documentation> + Will be restricted to required or forbidden</xsd:documentation> + </xsd:annotation> + </xsd:attribute> + <xsd:attribute name="mixed" type="xsd:boolean" use="optional" default="false"> + <xsd:annotation> + <xsd:documentation> + Not allowed if simpleContent child is chosen. + May be overriden by setting on complexContent child.</xsd:documentation> + </xsd:annotation> + </xsd:attribute> + <xsd:attribute name="abstract" type="xsd:boolean" use="optional" default="false"/> + <xsd:attribute name="final" type="xsd:derivationSet"/> + <xsd:attribute name="block" type="xsd:derivationSet"/> + </xsd:extension> + </xsd:complexContent> + </xsd:complexType> + + <xsd:complexType name="topLevelComplexType"> + <xsd:complexContent> + <xsd:restriction base="xsd:complexType"> + <xsd:sequence> + <xsd:element ref="xsd:annotation" minOccurs="0"/> + <xsd:group ref="xsd:complexTypeModel"/> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:NCName" use="required"/> + <xsd:anyAttribute namespace="##other" processContents="lax"/> + </xsd:restriction> + </xsd:complexContent> + </xsd:complexType> + + <xsd:complexType name="localComplexType"> + <xsd:complexContent> + <xsd:restriction base="xsd:complexType"> + <xsd:sequence> + <xsd:element ref="xsd:annotation" minOccurs="0"/> + <xsd:group ref="xsd:complexTypeModel"/> + </xsd:sequence> + <xsd:attribute name="name" use="prohibited"/> + <xsd:attribute name="abstract" use="prohibited"/> + <xsd:attribute name="final" use="prohibited"/> + <xsd:attribute name="block" use="prohibited"/> + <xsd:anyAttribute namespace="##other" processContents="lax"/> + </xsd:restriction> + </xsd:complexContent> + </xsd:complexType> + + <xsd:complexType name="restrictionType"> + <xsd:complexContent> + <xsd:extension base="xsd:annotated"> + <xsd:sequence> + <xsd:choice minOccurs="0"> + <xsd:group ref="xsd:typeDefParticle"/> + <xsd:group ref="xsd:simpleRestrictionModel"/> + </xsd:choice> + <xsd:group ref="xsd:attrDecls"/> + </xsd:sequence> + <xsd:attribute name="base" type="xsd:QName" use="required"/> + </xsd:extension> + </xsd:complexContent> + </xsd:complexType> + + <xsd:complexType name="complexRestrictionType"> + <xsd:complexContent> + <xsd:restriction base="xsd:restrictionType"> + <xsd:sequence> + <xsd:element ref="xsd:annotation" minOccurs="0"/> + <xsd:choice minOccurs="0"> + <xsd:annotation> + <xsd:documentation>This choice is added simply to + make this a valid restriction per the REC</xsd:documentation> + </xsd:annotation> + <xsd:group ref="xsd:typeDefParticle"/> + </xsd:choice> + <xsd:group ref="xsd:attrDecls"/> + </xsd:sequence> + <xsd:anyAttribute namespace="##other" processContents="lax"/> + </xsd:restriction> + </xsd:complexContent> + </xsd:complexType> + + <xsd:complexType name="extensionType"> + <xsd:complexContent> + <xsd:extension base="xsd:annotated"> + <xsd:sequence> + <xsd:group ref="xsd:typeDefParticle" minOccurs="0"/> + <xsd:group ref="xsd:attrDecls"/> + </xsd:sequence> + <xsd:attribute name="base" type="xsd:QName" use="required"/> + </xsd:extension> + </xsd:complexContent> + </xsd:complexType> + + <xsd:element name="complexContent" id="complexContent"> + <xsd:annotation> + <xsd:documentation source="http://www.w3.org/TR/xmlschema-1/#element-complexContent"/> + </xsd:annotation> + <xsd:complexType> + <xsd:complexContent> + <xsd:extension base="xsd:annotated"> + <xsd:choice> + <xsd:element name="restriction" type="xsd:complexRestrictionType"/> + <xsd:element name="extension" type="xsd:extensionType"/> + </xsd:choice> + <xsd:attribute name="mixed" type="xsd:boolean"> + <xsd:annotation> + <xsd:documentation> + Overrides any setting on complexType parent.</xsd:documentation> + </xsd:annotation> + </xsd:attribute> + </xsd:extension> + </xsd:complexContent> + </xsd:complexType> + </xsd:element> + + <xsd:complexType name="simpleRestrictionType"> + <xsd:complexContent> + <xsd:restriction base="xsd:restrictionType"> + <xsd:sequence> + <xsd:element ref="xsd:annotation" minOccurs="0"/> + <xsd:choice minOccurs="0"> + <xsd:annotation> + <xsd:documentation>This choice is added simply to + make this a valid restriction per the REC</xsd:documentation> + </xsd:annotation> + <xsd:group ref="xsd:simpleRestrictionModel"/> + </xsd:choice> + <xsd:group ref="xsd:attrDecls"/> + </xsd:sequence> + <xsd:anyAttribute namespace="##other" processContents="lax"/> + </xsd:restriction> + </xsd:complexContent> + </xsd:complexType> + + <xsd:complexType name="simpleExtensionType"> + <xsd:complexContent> + <xsd:restriction base="xsd:extensionType"> + <xsd:sequence> + <xsd:annotation> + <xsd:documentation> + No typeDefParticle group reference</xsd:documentation> + </xsd:annotation> + <xsd:element ref="xsd:annotation" minOccurs="0"/> + <xsd:group ref="xsd:attrDecls"/> + </xsd:sequence> + <xsd:anyAttribute namespace="##other" processContents="lax"/> + </xsd:restriction> + </xsd:complexContent> + </xsd:complexType> + + <xsd:element name="simpleContent" id="simpleContent"> + <xsd:annotation> + <xsd:documentation source="http://www.w3.org/TR/xmlschema-1/#element-simpleContent"/> + </xsd:annotation> + <xsd:complexType> + <xsd:complexContent> + <xsd:extension base="xsd:annotated"> + <xsd:choice> + <xsd:element name="restriction" type="xsd:simpleRestrictionType"/> + <xsd:element name="extension" type="xsd:simpleExtensionType"/> + </xsd:choice> + </xsd:extension> + </xsd:complexContent> + </xsd:complexType> + </xsd:element> + + <xsd:element name="complexType" type="xsd:topLevelComplexType" id="complexType"> + <xsd:annotation> + <xsd:documentation source="http://www.w3.org/TR/xmlschema-1/#element-complexType"/> + </xsd:annotation> + </xsd:element> + + + <xsd:simpleType name="blockSet"> + <xsd:annotation> + <xsd:documentation> + A utility type, not for public use</xsd:documentation> + <xsd:documentation> + #all or (possibly empty) subset of {substitution, extension, + restriction}</xsd:documentation> + </xsd:annotation> + <xsd:union> + <xsd:simpleType> + <xsd:restriction base="xsd:token"> + <xsd:enumeration value="#all"/> + </xsd:restriction> + </xsd:simpleType> + <xsd:simpleType> + <xsd:list> + <xsd:simpleType> + <xsd:restriction base="xsd:derivationControl"> + <xsd:enumeration value="extension"/> + <xsd:enumeration value="restriction"/> + <xsd:enumeration value="substitution"/> + </xsd:restriction> + </xsd:simpleType> + </xsd:list> + </xsd:simpleType> + </xsd:union> + </xsd:simpleType> + + <xsd:complexType name="element" abstract="true"> + <xsd:annotation> + <xsd:documentation> + The element element can be used either + at the top level to define an element-type binding globally, + or within a content model to either reference a globally-defined + element or type or declare an element-type binding locally. + The ref form is not allowed at the top level.</xsd:documentation> + </xsd:annotation> + + <xsd:complexContent> + <xsd:extension base="xsd:annotated"> + <xsd:sequence> + <xsd:choice minOccurs="0"> + <xsd:element name="simpleType" type="xsd:localSimpleType"/> + <xsd:element name="complexType" type="xsd:localComplexType"/> + </xsd:choice> + <xsd:group ref="xsd:identityConstraint" minOccurs="0" maxOccurs="unbounded"/> + </xsd:sequence> + <xsd:attributeGroup ref="xsd:defRef"/> + <xsd:attribute name="type" type="xsd:QName"/> + <xsd:attribute name="substitutionGroup" type="xsd:QName"/> + <xsd:attributeGroup ref="xsd:occurs"/> + <xsd:attribute name="default" type="xsd:string"/> + <xsd:attribute name="fixed" type="xsd:string"/> + <xsd:attribute name="nillable" type="xsd:boolean" use="optional" default="false"/> + <xsd:attribute name="abstract" type="xsd:boolean" use="optional" default="false"/> + <xsd:attribute name="final" type="xsd:derivationSet"/> + <xsd:attribute name="block" type="xsd:blockSet"/> + <xsd:attribute name="form" type="xsd:formChoice"/> + </xsd:extension> + </xsd:complexContent> + </xsd:complexType> + + <xsd:complexType name="topLevelElement"> + <xsd:complexContent> + <xsd:restriction base="xsd:element"> + <xsd:sequence> + <xsd:element ref="xsd:annotation" minOccurs="0"/> + <xsd:choice minOccurs="0"> + <xsd:element name="simpleType" type="xsd:localSimpleType"/> + <xsd:element name="complexType" type="xsd:localComplexType"/> + </xsd:choice> + <xsd:group ref="xsd:identityConstraint" minOccurs="0" maxOccurs="unbounded"/> + </xsd:sequence> + <xsd:attribute name="ref" use="prohibited"/> + <xsd:attribute name="form" use="prohibited"/> + <xsd:attribute name="minOccurs" use="prohibited"/> + <xsd:attribute name="maxOccurs" use="prohibited"/> + <xsd:attribute name="name" use="required" type="xsd:NCName"/> + <xsd:anyAttribute namespace="##other" processContents="lax"/> + </xsd:restriction> + </xsd:complexContent> + </xsd:complexType> + + <xsd:complexType name="localElement"> + <xsd:complexContent> + <xsd:restriction base="xsd:element"> + <xsd:sequence> + <xsd:element ref="xsd:annotation" minOccurs="0"/> + <xsd:choice minOccurs="0"> + <xsd:element name="simpleType" type="xsd:localSimpleType"/> + <xsd:element name="complexType" type="xsd:localComplexType"/> + </xsd:choice> + <xsd:group ref="xsd:identityConstraint" minOccurs="0" maxOccurs="unbounded"/> + </xsd:sequence> + <xsd:attribute name="substitutionGroup" use="prohibited"/> + <xsd:attribute name="final" use="prohibited"/> + <xsd:attribute name="abstract" use="prohibited"/> + <xsd:anyAttribute namespace="##other" processContents="lax"/> + </xsd:restriction> + </xsd:complexContent> + </xsd:complexType> + + <xsd:element name="element" type="xsd:topLevelElement" id="element"> + <xsd:annotation> + <xsd:documentation source="http://www.w3.org/TR/xmlschema-1/#element-element"/> + </xsd:annotation> + </xsd:element> + + <xsd:complexType name="group" abstract="true"> + <xsd:annotation> + <xsd:documentation> + group type for explicit groups, named top-level groups and + group references</xsd:documentation> + </xsd:annotation> + <xsd:complexContent> + <xsd:extension base="xsd:annotated"> + <xsd:group ref="xsd:particle" minOccurs="0" maxOccurs="unbounded"/> + <xsd:attributeGroup ref="xsd:defRef"/> + <xsd:attributeGroup ref="xsd:occurs"/> + </xsd:extension> + </xsd:complexContent> + </xsd:complexType> + + <xsd:complexType name="realGroup"> + <xsd:complexContent> + <xsd:restriction base="xsd:group"> + <xsd:sequence> + <xsd:element ref="xsd:annotation" minOccurs="0"/> + <xsd:choice minOccurs="0" maxOccurs="1"> + <xsd:element ref="xsd:all"/> + <xsd:element ref="xsd:choice"/> + <xsd:element ref="xsd:sequence"/> + </xsd:choice> + </xsd:sequence> + <xsd:anyAttribute namespace="##other" processContents="lax"/> + </xsd:restriction> + </xsd:complexContent> + </xsd:complexType> + + <xsd:complexType name="namedGroup"> + <xsd:complexContent> + <xsd:restriction base="xsd:realGroup"> + <xsd:sequence> + <xsd:element ref="xsd:annotation" minOccurs="0"/> + <xsd:choice minOccurs="1" maxOccurs="1"> + <xsd:element name="all"> + <xsd:complexType> + <xsd:complexContent> + <xsd:restriction base="xsd:all"> + <xsd:group ref="xsd:allModel"/> + <xsd:attribute name="minOccurs" use="prohibited"/> + <xsd:attribute name="maxOccurs" use="prohibited"/> + <xsd:anyAttribute namespace="##other" processContents="lax"/> + </xsd:restriction> + </xsd:complexContent> + </xsd:complexType> + </xsd:element> + <xsd:element name="choice" type="xsd:simpleExplicitGroup"/> + <xsd:element name="sequence" type="xsd:simpleExplicitGroup"/> + </xsd:choice> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:NCName"/> + <xsd:attribute name="ref" use="prohibited"/> + <xsd:attribute name="minOccurs" use="prohibited"/> + <xsd:attribute name="maxOccurs" use="prohibited"/> + <xsd:anyAttribute namespace="##other" processContents="lax"/> + </xsd:restriction> + </xsd:complexContent> + </xsd:complexType> + + <xsd:complexType name="groupRef"> + <xsd:complexContent> + <xsd:restriction base="xsd:realGroup"> + <xsd:sequence> + <xsd:element ref="xsd:annotation" minOccurs="0"/> + </xsd:sequence> + <xsd:attribute name="ref" use="required" type="xsd:QName"/> + <xsd:attribute name="name" use="prohibited"/> + <xsd:anyAttribute namespace="##other" processContents="lax"/> + </xsd:restriction> + </xsd:complexContent> + </xsd:complexType> + + <xsd:complexType name="explicitGroup"> + <xsd:annotation> + <xsd:documentation> + group type for the three kinds of group</xsd:documentation> + </xsd:annotation> + <xsd:complexContent> + <xsd:restriction base="xsd:group"> + <xsd:sequence> + <xsd:element ref="xsd:annotation" minOccurs="0"/> + <xsd:group ref="xsd:nestedParticle" minOccurs="0" maxOccurs="unbounded"/> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:NCName" use="prohibited"/> + <xsd:attribute name="ref" type="xsd:QName" use="prohibited"/> + <xsd:anyAttribute namespace="##other" processContents="lax"/> + </xsd:restriction> + </xsd:complexContent> + </xsd:complexType> + + <xsd:complexType name="simpleExplicitGroup"> + <xsd:complexContent> + <xsd:restriction base="xsd:explicitGroup"> + <xsd:sequence> + <xsd:element ref="xsd:annotation" minOccurs="0"/> + <xsd:group ref="xsd:nestedParticle" minOccurs="0" maxOccurs="unbounded"/> + </xsd:sequence> + <xsd:attribute name="minOccurs" use="prohibited"/> + <xsd:attribute name="maxOccurs" use="prohibited"/> + <xsd:anyAttribute namespace="##other" processContents="lax"/> + </xsd:restriction> + </xsd:complexContent> + </xsd:complexType> + + <xsd:group name="allModel"> + <xsd:sequence> + <xsd:element ref="xsd:annotation" minOccurs="0"/> + <xsd:choice minOccurs="0" maxOccurs="unbounded"> + <xsd:annotation> + <xsd:documentation>This choice with min/max is here to + avoid a pblm with the Elt:All/Choice/Seq + Particle derivation constraint</xsd:documentation> + </xsd:annotation> + <xsd:element name="element" type="xsd:narrowMaxMin"/> + </xsd:choice> + </xsd:sequence> + </xsd:group> + + + <xsd:complexType name="narrowMaxMin"> + <xsd:annotation> + <xsd:documentation>restricted max/min</xsd:documentation> + </xsd:annotation> + <xsd:complexContent> + <xsd:restriction base="xsd:localElement"> + <xsd:sequence> + <xsd:element ref="xsd:annotation" minOccurs="0"/> + <xsd:choice minOccurs="0"> + <xsd:element name="simpleType" type="xsd:localSimpleType"/> + <xsd:element name="complexType" type="xsd:localComplexType"/> + </xsd:choice> + <xsd:group ref="xsd:identityConstraint" minOccurs="0" maxOccurs="unbounded"/> + </xsd:sequence> + <xsd:attribute name="minOccurs" use="optional" default="1"> + <xsd:simpleType> + <xsd:restriction base="xsd:nonNegativeInteger"> + <xsd:enumeration value="0"/> + <xsd:enumeration value="1"/> + </xsd:restriction> + </xsd:simpleType> + </xsd:attribute> + <xsd:attribute name="maxOccurs" use="optional" default="1"> + <xsd:simpleType> + <xsd:restriction base="xsd:allNNI"> + <xsd:enumeration value="0"/> + <xsd:enumeration value="1"/> + </xsd:restriction> + </xsd:simpleType> + </xsd:attribute> + <xsd:anyAttribute namespace="##other" processContents="lax"/> + </xsd:restriction> + </xsd:complexContent> + </xsd:complexType> + + <xsd:complexType name="all"> + <xsd:annotation> + <xsd:documentation> + Only elements allowed inside</xsd:documentation> + </xsd:annotation> + <xsd:complexContent> + <xsd:restriction base="xsd:explicitGroup"> + <xsd:group ref="xsd:allModel"/> + <xsd:attribute name="minOccurs" use="optional" default="1"> + <xsd:simpleType> + <xsd:restriction base="xsd:nonNegativeInteger"> + <xsd:enumeration value="0"/> + <xsd:enumeration value="1"/> + </xsd:restriction> + </xsd:simpleType> + </xsd:attribute> + <xsd:attribute name="maxOccurs" use="optional" default="1"> + <xsd:simpleType> + <xsd:restriction base="xsd:allNNI"> + <xsd:enumeration value="1"/> + </xsd:restriction> + </xsd:simpleType> + </xsd:attribute> + <xsd:anyAttribute namespace="##other" processContents="lax"/> + </xsd:restriction> + </xsd:complexContent> + </xsd:complexType> + + <xsd:element name="all" id="all" type="xsd:all"> + <xsd:annotation> + <xsd:documentation source="http://www.w3.org/TR/xmlschema-1/#element-all"/> + </xsd:annotation> + </xsd:element> + + <xsd:element name="choice" type="xsd:explicitGroup" id="choice"> + <xsd:annotation> + <xsd:documentation source="http://www.w3.org/TR/xmlschema-1/#element-choice"/> + </xsd:annotation> + </xsd:element> + + <xsd:element name="sequence" type="xsd:explicitGroup" id="sequence"> + <xsd:annotation> + <xsd:documentation source="http://www.w3.org/TR/xmlschema-1/#element-sequence"/> + </xsd:annotation> + </xsd:element> + + <xsd:element name="group" type="xsd:namedGroup" id="group"> + <xsd:annotation> + <xsd:documentation source="http://www.w3.org/TR/xmlschema-1/#element-group"/> + </xsd:annotation> + </xsd:element> + + <xsd:complexType name="wildcard"> + <xsd:complexContent> + <xsd:extension base="xsd:annotated"> + <xsd:attribute name="namespace" type="xsd:namespaceList" use="optional" default="##any"/> + <xsd:attribute name="processContents" use="optional" default="strict"> + <xsd:simpleType> + <xsd:restriction base="xsd:NMTOKEN"> + <xsd:enumeration value="skip"/> + <xsd:enumeration value="lax"/> + <xsd:enumeration value="strict"/> + </xsd:restriction> + </xsd:simpleType> + </xsd:attribute> + </xsd:extension> + </xsd:complexContent> + </xsd:complexType> + + <xsd:element name="any" id="any"> + <xsd:annotation> + <xsd:documentation source="http://www.w3.org/TR/xmlschema-1/#element-any"/> + </xsd:annotation> + <xsd:complexType> + <xsd:complexContent> + <xsd:extension base="xsd:wildcard"> + <xsd:attributeGroup ref="xsd:occurs"/> + </xsd:extension> + </xsd:complexContent> + </xsd:complexType> + </xsd:element> + + <xsd:annotation> + <xsd:documentation> + simple type for the value of the 'namespace' attr of + 'any' and 'anyAttribute'</xsd:documentation> + </xsd:annotation> + <xsd:annotation> + <xsd:documentation> + Value is + ##any - - any non-conflicting WFXML/attribute at all + + ##other - - any non-conflicting WFXML/attribute from + namespace other than targetNS + + ##local - - any unqualified non-conflicting WFXML/attribute + + one or - - any non-conflicting WFXML/attribute from + more URI the listed namespaces + references + (space separated) + + ##targetNamespace or ##local may appear in the above list, to + refer to the targetNamespace of the enclosing + schema or an absent targetNamespace respectively</xsd:documentation> + </xsd:annotation> + + <xsd:simpleType name="namespaceList"> + <xsd:annotation> + <xsd:documentation> + A utility type, not for public use</xsd:documentation> + </xsd:annotation> + <xsd:union> + <xsd:simpleType> + <xsd:restriction base="xsd:token"> + <xsd:enumeration value="##any"/> + <xsd:enumeration value="##other"/> + </xsd:restriction> + </xsd:simpleType> + <xsd:simpleType> + <xsd:list> + <xsd:simpleType> + <xsd:union memberTypes="xsd:anyURI"> + <xsd:simpleType> + <xsd:restriction base="xsd:token"> + <xsd:enumeration value="##targetNamespace"/> + <xsd:enumeration value="##local"/> + </xsd:restriction> + </xsd:simpleType> + </xsd:union> + </xsd:simpleType> + </xsd:list> + </xsd:simpleType> + </xsd:union> + </xsd:simpleType> + + <xsd:element name="attribute" type="xsd:topLevelAttribute" id="attribute"> + <xsd:annotation> + <xsd:documentation source="http://www.w3.org/TR/xmlschema-1/#element-attribute"/> + </xsd:annotation> + </xsd:element> + + <xsd:complexType name="attributeGroup" abstract="true"> + <xsd:complexContent> + <xsd:extension base="xsd:annotated"> + <xsd:group ref="xsd:attrDecls"/> + <xsd:attributeGroup ref="xsd:defRef"/> + </xsd:extension> + </xsd:complexContent> + </xsd:complexType> + + <xsd:complexType name="namedAttributeGroup"> + <xsd:complexContent> + <xsd:restriction base="xsd:attributeGroup"> + <xsd:sequence> + <xsd:element ref="xsd:annotation" minOccurs="0"/> + <xsd:group ref="xsd:attrDecls"/> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:NCName"/> + <xsd:attribute name="ref" use="prohibited"/> + <xsd:anyAttribute namespace="##other" processContents="lax"/> + </xsd:restriction> + </xsd:complexContent> + </xsd:complexType> + + <xsd:complexType name="attributeGroupRef"> + <xsd:complexContent> + <xsd:restriction base="xsd:attributeGroup"> + <xsd:sequence> + <xsd:element ref="xsd:annotation" minOccurs="0"/> + </xsd:sequence> + <xsd:attribute name="ref" use="required" type="xsd:QName"/> + <xsd:attribute name="name" use="prohibited"/> + <xsd:anyAttribute namespace="##other" processContents="lax"/> + </xsd:restriction> + </xsd:complexContent> + </xsd:complexType> + + <xsd:element name="attributeGroup" type="xsd:namedAttributeGroup" id="attributeGroup"> + <xsd:annotation> + <xsd:documentation source="http://www.w3.org/TR/xmlschema-1/#element-attributeGroup"/> + </xsd:annotation> + </xsd:element> + + <xsd:element name="include" id="include"> + <xsd:annotation> + <xsd:documentation source="http://www.w3.org/TR/xmlschema-1/#element-include"/> + </xsd:annotation> + <xsd:complexType> + <xsd:complexContent> + <xsd:extension base="xsd:annotated"> + <xsd:attribute name="schemaLocation" type="xsd:anyURI" use="required"/> + </xsd:extension> + </xsd:complexContent> + </xsd:complexType> + </xsd:element> + + <xsd:element name="redefine" id="redefine"> + <xsd:annotation> + <xsd:documentation source="http://www.w3.org/TR/xmlschema-1/#element-redefine"/> + </xsd:annotation> + <xsd:complexType> + <xsd:complexContent> + <xsd:extension base="xsd:openAttrs"> + <xsd:choice minOccurs="0" maxOccurs="unbounded"> + <xsd:element ref="xsd:annotation"/> + <xsd:group ref="xsd:redefinable"/> + </xsd:choice> + <xsd:attribute name="schemaLocation" type="xsd:anyURI" use="required"/> + <xsd:attribute name="id" type="xsd:ID"/> + </xsd:extension> + </xsd:complexContent> + </xsd:complexType> + </xsd:element> + + <xsd:element name="import" id="import"> + <xsd:annotation> + <xsd:documentation source="http://www.w3.org/TR/xmlschema-1/#element-import"/> + </xsd:annotation> + <xsd:complexType> + <xsd:complexContent> + <xsd:extension base="xsd:annotated"> + <xsd:attribute name="namespace" type="xsd:anyURI"/> + <xsd:attribute name="schemaLocation" type="xsd:anyURI"/> + </xsd:extension> + </xsd:complexContent> + </xsd:complexType> + </xsd:element> + + <xsd:element name="selector" id="selector"> + <xsd:annotation> + <xsd:documentation source="http://www.w3.org/TR/xmlschema-1/#element-selector"/> + </xsd:annotation> + <xsd:complexType> + <xsd:complexContent> + <xsd:extension base="xsd:annotated"> + <xsd:attribute name="xpath" use="required"> + <xsd:simpleType> + <xsd:annotation> + <xsd:documentation>A subset of XPath expressions for use +in selectors</xsd:documentation> + <xsd:documentation>A utility type, not for public +use</xsd:documentation> + </xsd:annotation> + <xsd:restriction base="xsd:token"> + <xsd:annotation> + <xsd:documentation>The following pattern is intended to allow XPath + expressions per the following EBNF: + Selector ::= Path ( '|' Path )* + Path ::= ('.//')? Step ( '/' Step )* + Step ::= '.' | NameTest + NameTest ::= QName | '*' | NCName ':' '*' + child:: is also allowed + </xsd:documentation> + </xsd:annotation> + <xsd:pattern value="(\.//)?(((child::)?((\i\c*:)?(\i\c*|\*)))|\.)(/(((child::)?((\i\c*:)?(\i\c*|\*)))|\.))*(\|(\.//)?(((child::)?((\i\c*:)?(\i\c*|\*)))|\.)(/(((child::)?((\i\c*:)?(\i\c*|\*)))|\.))*)*"> + </xsd:pattern> + </xsd:restriction> + </xsd:simpleType> + </xsd:attribute> + </xsd:extension> + </xsd:complexContent> + </xsd:complexType> + </xsd:element> + + <xsd:element name="field" id="field"> + <xsd:annotation> + <xsd:documentation source="http://www.w3.org/TR/xmlschema-1/#element-field"/> + </xsd:annotation> + <xsd:complexType> + <xsd:complexContent> + <xsd:extension base="xsd:annotated"> + <xsd:attribute name="xpath" use="required"> + <xsd:simpleType> + <xsd:annotation> + <xsd:documentation>A subset of XPath expressions for use +in fields</xsd:documentation> + <xsd:documentation>A utility type, not for public +use</xsd:documentation> + </xsd:annotation> + <xsd:restriction base="xsd:token"> + <xsd:annotation> + <xsd:documentation>The following pattern is intended to allow XPath + expressions per the same EBNF as for selector, + with the following change: + Path ::= ('.//')? ( Step '/' )* ( Step | '@' NameTest ) + </xsd:documentation> + </xsd:annotation> + <xsd:pattern value="(\.//)?((((child::)?((\i\c*:)?(\i\c*|\*)))|\.)/)*((((child::)?((\i\c*:)?(\i\c*|\*)))|\.)|((attribute::|@)((\i\c*:)?(\i\c*|\*))))(\|(\.//)?((((child::)?((\i\c*:)?(\i\c*|\*)))|\.)/)*((((child::)?((\i\c*:)?(\i\c*|\*)))|\.)|((attribute::|@)((\i\c*:)?(\i\c*|\*)))))*"> + </xsd:pattern> + </xsd:restriction> + </xsd:simpleType> + </xsd:attribute> + </xsd:extension> + </xsd:complexContent> + </xsd:complexType> + </xsd:element> + + <xsd:complexType name="keybase"> + <xsd:complexContent> + <xsd:extension base="xsd:annotated"> + <xsd:sequence> + <xsd:element ref="xsd:selector"/> + <xsd:element ref="xsd:field" minOccurs="1" maxOccurs="unbounded"/> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:NCName" use="required"/> + </xsd:extension> + </xsd:complexContent> + </xsd:complexType> + + <xsd:group name="identityConstraint"> + <xsd:annotation> + <xsd:documentation>The three kinds of identity constraints, all with + type of or derived from 'keybase'. + </xsd:documentation> + </xsd:annotation> + <xsd:choice> + <xsd:element ref="xsd:unique"/> + <xsd:element ref="xsd:key"/> + <xsd:element ref="xsd:keyref"/> + </xsd:choice> + </xsd:group> + + <xsd:element name="unique" type="xsd:keybase" id="unique"> + <xsd:annotation> + <xsd:documentation source="http://www.w3.org/TR/xmlschema-1/#element-unique"/> + </xsd:annotation> + </xsd:element> + <xsd:element name="key" type="xsd:keybase" id="key"> + <xsd:annotation> + <xsd:documentation source="http://www.w3.org/TR/xmlschema-1/#element-key"/> + </xsd:annotation> + </xsd:element> + <xsd:element name="keyref" id="keyref"> + <xsd:annotation> + <xsd:documentation source="http://www.w3.org/TR/xmlschema-1/#element-keyref"/> + </xsd:annotation> + <xsd:complexType> + <xsd:complexContent> + <xsd:extension base="xsd:keybase"> + <xsd:attribute name="refer" type="xsd:QName" use="required"/> + </xsd:extension> + </xsd:complexContent> + </xsd:complexType> + </xsd:element> + + <xsd:element name="notation" id="notation"> + <xsd:annotation> + <xsd:documentation source="http://www.w3.org/TR/xmlschema-1/#element-notation"/> + </xsd:annotation> + <xsd:complexType> + <xsd:complexContent> + <xsd:extension base="xsd:annotated"> + <xsd:attribute name="name" type="xsd:NCName" use="required"/> + <xsd:attribute name="public" type="xsd:public"/> + <xsd:attribute name="system" type="xsd:anyURI"/> + </xsd:extension> + </xsd:complexContent> + </xsd:complexType> + </xsd:element> + + <xsd:simpleType name="public"> + <xsd:annotation> + <xsd:documentation> + A utility type, not for public use</xsd:documentation> + <xsd:documentation> + A public identifier, per ISO 8879</xsd:documentation> + </xsd:annotation> + <xsd:restriction base="xsd:token"/> + </xsd:simpleType> + + <xsd:element name="appinfo" id="appinfo"> + <xsd:annotation> + <xsd:documentation source="http://www.w3.org/TR/xmlschema-1/#element-appinfo"/> + </xsd:annotation> + <xsd:complexType mixed="true"> + <xsd:sequence minOccurs="0" maxOccurs="unbounded"> + <xsd:any processContents="lax"/> + </xsd:sequence> + <xsd:attribute name="source" type="xsd:anyURI"/> + <xsd:anyAttribute namespace="##other" processContents="lax"/> + </xsd:complexType> + </xsd:element> + + <xsd:element name="documentation" id="documentation"> + <xsd:annotation> + <xsd:documentation source="http://www.w3.org/TR/xmlschema-1/#element-documentation"/> + </xsd:annotation> + <xsd:complexType mixed="true"> + <xsd:sequence minOccurs="0" maxOccurs="unbounded"> + <xsd:any processContents="lax"/> + </xsd:sequence> + <xsd:attribute name="source" type="xsd:anyURI"/> + <xsd:attribute ref="xml:lang"/> + <xsd:anyAttribute namespace="##other" processContents="lax"/> + </xsd:complexType> + </xsd:element> + + <xsd:element name="annotation" id="annotation"> + <xsd:annotation> + <xsd:documentation source="http://www.w3.org/TR/xmlschema-1/#element-annotation"/> + </xsd:annotation> + <xsd:complexType> + <xsd:complexContent> + <xsd:extension base="xsd:openAttrs"> + <xsd:choice minOccurs="0" maxOccurs="unbounded"> + <xsd:element ref="xsd:appinfo"/> + <xsd:element ref="xsd:documentation"/> + </xsd:choice> + <xsd:attribute name="id" type="xsd:ID"/> + </xsd:extension> + </xsd:complexContent> + </xsd:complexType> + </xsd:element> + + <xsd:annotation> + <xsd:documentation> + notations for use within XML Schema schemas</xsd:documentation> + </xsd:annotation> + + <xsd:notation name="XMLSchemaStructures" public="structures" system="http://www.w3.org/2000/08/XMLSchema.xsd"/> + <xsd:notation name="XML" public="REC-xml-19980210" system="http://www.w3.org/TR/1998/REC-xml-19980210"/> + + <xsd:complexType name="anyType" mixed="true"> + <xsd:annotation> + <xsd:documentation> + Not the real urType, but as close an approximation as we can + get in the XML representation</xsd:documentation> + </xsd:annotation> + <xsd:sequence> + <xsd:any minOccurs="0" maxOccurs="unbounded" processContents="lax"/> + </xsd:sequence> + <xsd:anyAttribute processContents="lax"/> + </xsd:complexType> + + <xsd:annotation> + <xsd:documentation> + First the built-in primitive datatypes. These definitions are for + information only, the real built-in definitions are magic. + </xsd:documentation> + + <xsd:documentation> + For each built-in datatype in this schema (both primitive and + derived) can be uniquely addressed via a URI constructed + as follows: + 1) the base URI is the URI of the XML Schema namespace + 2) the fragment identifier is the name of the datatype + + For example, to address the int datatype, the URI is: + + http://www.w3.org/2001/XMLSchema#int + + Additionally, each facet definition element can be uniquely + addressed via a URI constructed as follows: + 1) the base URI is the URI of the XML Schema namespace + 2) the fragment identifier is the name of the facet + + For example, to address the maxInclusive facet, the URI is: + + http://www.w3.org/2001/XMLSchema#maxInclusive + + Additionally, each facet usage in a built-in datatype definition + can be uniquely addressed via a URI constructed as follows: + 1) the base URI is the URI of the XML Schema namespace + 2) the fragment identifier is the name of the datatype, followed + by a period (".") followed by the name of the facet + + For example, to address the usage of the maxInclusive facet in + the definition of int, the URI is: + + http://www.w3.org/2001/XMLSchema#int.maxInclusive + + </xsd:documentation> + </xsd:annotation> + + <xsd:simpleType name="string" id="string"> + <xsd:annotation> + <xsd:appinfo> + <hfp:hasFacet name="length"/> + <hfp:hasFacet name="minLength"/> + <hfp:hasFacet name="maxLength"/> + <hfp:hasFacet name="pattern"/> + <hfp:hasFacet name="enumeration"/> + <hfp:hasFacet name="whiteSpace"/> + <hfp:hasProperty name="ordered" value="false"/> + <hfp:hasProperty name="bounded" value="false"/> + <hfp:hasProperty name="cardinality" value="countably infinite"/> + <hfp:hasProperty name="numeric" value="false"/> + </xsd:appinfo> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#string"/> + </xsd:annotation> + <xsd:restriction base="xsd:anySimpleType"> + <xsd:whiteSpace value="preserve" id="string.preserve"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="boolean" id="boolean"> + <xsd:annotation> + <xsd:appinfo> + <hfp:hasFacet name="pattern"/> + <hfp:hasFacet name="whiteSpace"/> + <hfp:hasProperty name="ordered" value="false"/> + <hfp:hasProperty name="bounded" value="false"/> + <hfp:hasProperty name="cardinality" value="finite"/> + <hfp:hasProperty name="numeric" value="false"/> + </xsd:appinfo> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#boolean"/> + </xsd:annotation> + <xsd:restriction base="xsd:anySimpleType"> + <xsd:whiteSpace value="collapse" fixed="true" + id="boolean.whiteSpace"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="float" id="float"> + <xsd:annotation> + <xsd:appinfo> + <hfp:hasFacet name="pattern"/> + <hfp:hasFacet name="enumeration"/> + <hfp:hasFacet name="whiteSpace"/> + <hfp:hasFacet name="maxInclusive"/> + <hfp:hasFacet name="maxExclusive"/> + <hfp:hasFacet name="minInclusive"/> + <hfp:hasFacet name="minExclusive"/> + <hfp:hasProperty name="ordered" value="total"/> + <hfp:hasProperty name="bounded" value="true"/> + <hfp:hasProperty name="cardinality" value="finite"/> + <hfp:hasProperty name="numeric" value="true"/> + </xsd:appinfo> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#float"/> + </xsd:annotation> + <xsd:restriction base="xsd:anySimpleType"> + <xsd:whiteSpace value="collapse" fixed="true" + id="float.whiteSpace"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="double" id="double"> + <xsd:annotation> + <xsd:appinfo> + <hfp:hasFacet name="pattern"/> + <hfp:hasFacet name="enumeration"/> + <hfp:hasFacet name="whiteSpace"/> + <hfp:hasFacet name="maxInclusive"/> + <hfp:hasFacet name="maxExclusive"/> + <hfp:hasFacet name="minInclusive"/> + <hfp:hasFacet name="minExclusive"/> + <hfp:hasProperty name="ordered" value="total"/> + <hfp:hasProperty name="bounded" value="true"/> + <hfp:hasProperty name="cardinality" value="finite"/> + <hfp:hasProperty name="numeric" value="true"/> + </xsd:appinfo> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#double"/> + </xsd:annotation> + <xsd:restriction base="xsd:anySimpleType"> + <xsd:whiteSpace value="collapse" fixed="true" + id="double.whiteSpace"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="decimal" id="decimal"> + <xsd:annotation> + <xsd:appinfo> + <hfp:hasFacet name="totalDigits"/> + <hfp:hasFacet name="fractionDigits"/> + <hfp:hasFacet name="pattern"/> + <hfp:hasFacet name="whiteSpace"/> + <hfp:hasFacet name="enumeration"/> + <hfp:hasFacet name="maxInclusive"/> + <hfp:hasFacet name="maxExclusive"/> + <hfp:hasFacet name="minInclusive"/> + <hfp:hasFacet name="minExclusive"/> + <hfp:hasProperty name="ordered" value="total"/> + <hfp:hasProperty name="bounded" value="false"/> + <hfp:hasProperty name="cardinality" + value="countably infinite"/> + <hfp:hasProperty name="numeric" value="true"/> + </xsd:appinfo> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#decimal"/> + </xsd:annotation> + <xsd:restriction base="xsd:anySimpleType"> + <xsd:whiteSpace value="collapse" fixed="true" + id="decimal.whiteSpace"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="duration" id="duration"> + <xsd:annotation> + <xsd:appinfo> + <hfp:hasFacet name="pattern"/> + <hfp:hasFacet name="enumeration"/> + <hfp:hasFacet name="whiteSpace"/> + <hfp:hasFacet name="maxInclusive"/> + <hfp:hasFacet name="maxExclusive"/> + <hfp:hasFacet name="minInclusive"/> + <hfp:hasFacet name="minExclusive"/> + <hfp:hasProperty name="ordered" value="partial"/> + <hfp:hasProperty name="bounded" value="false"/> + <hfp:hasProperty name="cardinality" + value="countably infinite"/> + <hfp:hasProperty name="numeric" value="false"/> + </xsd:appinfo> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#duration"/> + </xsd:annotation> + <xsd:restriction base="xsd:anySimpleType"> + <xsd:whiteSpace value="collapse" fixed="true" + id="duration.whiteSpace"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="dateTime" id="dateTime"> + <xsd:annotation> + <xsd:appinfo> + <hfp:hasFacet name="pattern"/> + <hfp:hasFacet name="enumeration"/> + <hfp:hasFacet name="whiteSpace"/> + <hfp:hasFacet name="maxInclusive"/> + <hfp:hasFacet name="maxExclusive"/> + <hfp:hasFacet name="minInclusive"/> + <hfp:hasFacet name="minExclusive"/> + <hfp:hasProperty name="ordered" value="partial"/> + <hfp:hasProperty name="bounded" value="false"/> + <hfp:hasProperty name="cardinality" + value="countably infinite"/> + <hfp:hasProperty name="numeric" value="false"/> + </xsd:appinfo> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#dateTime"/> + </xsd:annotation> + <xsd:restriction base="xsd:anySimpleType"> + <xsd:whiteSpace value="collapse" fixed="true" + id="dateTime.whiteSpace"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="time" id="time"> + <xsd:annotation> + <xsd:appinfo> + <hfp:hasFacet name="pattern"/> + <hfp:hasFacet name="enumeration"/> + <hfp:hasFacet name="whiteSpace"/> + <hfp:hasFacet name="maxInclusive"/> + <hfp:hasFacet name="maxExclusive"/> + <hfp:hasFacet name="minInclusive"/> + <hfp:hasFacet name="minExclusive"/> + <hfp:hasProperty name="ordered" value="partial"/> + <hfp:hasProperty name="bounded" value="false"/> + <hfp:hasProperty name="cardinality" + value="countably infinite"/> + <hfp:hasProperty name="numeric" value="false"/> + </xsd:appinfo> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#time"/> + </xsd:annotation> + <xsd:restriction base="xsd:anySimpleType"> + <xsd:whiteSpace value="collapse" fixed="true" + id="time.whiteSpace"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="date" id="date"> + <xsd:annotation> + <xsd:appinfo> + <hfp:hasFacet name="pattern"/> + <hfp:hasFacet name="enumeration"/> + <hfp:hasFacet name="whiteSpace"/> + <hfp:hasFacet name="maxInclusive"/> + <hfp:hasFacet name="maxExclusive"/> + <hfp:hasFacet name="minInclusive"/> + <hfp:hasFacet name="minExclusive"/> + <hfp:hasProperty name="ordered" value="partial"/> + <hfp:hasProperty name="bounded" value="false"/> + <hfp:hasProperty name="cardinality" + value="countably infinite"/> + <hfp:hasProperty name="numeric" value="false"/> + </xsd:appinfo> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#date"/> + </xsd:annotation> + <xsd:restriction base="xsd:anySimpleType"> + <xsd:whiteSpace value="collapse" fixed="true" + id="date.whiteSpace"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="gYearMonth" id="gYearMonth"> + <xsd:annotation> + <xsd:appinfo> + <hfp:hasFacet name="pattern"/> + <hfp:hasFacet name="enumeration"/> + <hfp:hasFacet name="whiteSpace"/> + <hfp:hasFacet name="maxInclusive"/> + <hfp:hasFacet name="maxExclusive"/> + <hfp:hasFacet name="minInclusive"/> + <hfp:hasFacet name="minExclusive"/> + <hfp:hasProperty name="ordered" value="partial"/> + <hfp:hasProperty name="bounded" value="false"/> + <hfp:hasProperty name="cardinality" + value="countably infinite"/> + <hfp:hasProperty name="numeric" value="false"/> + </xsd:appinfo> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#gYearMonth"/> + </xsd:annotation> + <xsd:restriction base="xsd:anySimpleType"> + <xsd:whiteSpace value="collapse" fixed="true" + id="gYearMonth.whiteSpace"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="gYear" id="gYear"> + <xsd:annotation> + <xsd:appinfo> + <hfp:hasFacet name="pattern"/> + <hfp:hasFacet name="enumeration"/> + <hfp:hasFacet name="whiteSpace"/> + <hfp:hasFacet name="maxInclusive"/> + <hfp:hasFacet name="maxExclusive"/> + <hfp:hasFacet name="minInclusive"/> + <hfp:hasFacet name="minExclusive"/> + <hfp:hasProperty name="ordered" value="partial"/> + <hfp:hasProperty name="bounded" value="false"/> + <hfp:hasProperty name="cardinality" + value="countably infinite"/> + <hfp:hasProperty name="numeric" value="false"/> + </xsd:appinfo> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#gYear"/> + </xsd:annotation> + <xsd:restriction base="xsd:anySimpleType"> + <xsd:whiteSpace value="collapse" fixed="true" + id="gYear.whiteSpace"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="gMonthDay" id="gMonthDay"> + <xsd:annotation> + <xsd:appinfo> + <hfp:hasFacet name="pattern"/> + <hfp:hasFacet name="enumeration"/> + <hfp:hasFacet name="whiteSpace"/> + <hfp:hasFacet name="maxInclusive"/> + <hfp:hasFacet name="maxExclusive"/> + <hfp:hasFacet name="minInclusive"/> + <hfp:hasFacet name="minExclusive"/> + <hfp:hasProperty name="ordered" value="partial"/> + <hfp:hasProperty name="bounded" value="false"/> + <hfp:hasProperty name="cardinality" + value="countably infinite"/> + <hfp:hasProperty name="numeric" value="false"/> + </xsd:appinfo> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#gMonthDay"/> + </xsd:annotation> + <xsd:restriction base="xsd:anySimpleType"> + <xsd:whiteSpace value="collapse" fixed="true" + id="gMonthDay.whiteSpace"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="gDay" id="gDay"> + <xsd:annotation> + <xsd:appinfo> + <hfp:hasFacet name="pattern"/> + <hfp:hasFacet name="enumeration"/> + <hfp:hasFacet name="whiteSpace"/> + <hfp:hasFacet name="maxInclusive"/> + <hfp:hasFacet name="maxExclusive"/> + <hfp:hasFacet name="minInclusive"/> + <hfp:hasFacet name="minExclusive"/> + <hfp:hasProperty name="ordered" value="partial"/> + <hfp:hasProperty name="bounded" value="false"/> + <hfp:hasProperty name="cardinality" + value="countably infinite"/> + <hfp:hasProperty name="numeric" value="false"/> + </xsd:appinfo> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#gDay"/> + </xsd:annotation> + <xsd:restriction base="xsd:anySimpleType"> + <xsd:whiteSpace value="collapse" fixed="true" + id="gDay.whiteSpace"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="gMonth" id="gMonth"> + <xsd:annotation> + <xsd:appinfo> + <hfp:hasFacet name="pattern"/> + <hfp:hasFacet name="enumeration"/> + <hfp:hasFacet name="whiteSpace"/> + <hfp:hasFacet name="maxInclusive"/> + <hfp:hasFacet name="maxExclusive"/> + <hfp:hasFacet name="minInclusive"/> + <hfp:hasFacet name="minExclusive"/> + <hfp:hasProperty name="ordered" value="partial"/> + <hfp:hasProperty name="bounded" value="false"/> + <hfp:hasProperty name="cardinality" + value="countably infinite"/> + <hfp:hasProperty name="numeric" value="false"/> + </xsd:appinfo> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#gMonth"/> + </xsd:annotation> + <xsd:restriction base="xsd:anySimpleType"> + <xsd:whiteSpace value="collapse" fixed="true" + id="gMonth.whiteSpace"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="hexBinary" id="hexBinary"> + <xsd:annotation> + <xsd:appinfo> + <hfp:hasFacet name="length"/> + <hfp:hasFacet name="minLength"/> + <hfp:hasFacet name="maxLength"/> + <hfp:hasFacet name="pattern"/> + <hfp:hasFacet name="enumeration"/> + <hfp:hasFacet name="whiteSpace"/> + <hfp:hasProperty name="ordered" value="false"/> + <hfp:hasProperty name="bounded" value="false"/> + <hfp:hasProperty name="cardinality" + value="countably infinite"/> + <hfp:hasProperty name="numeric" value="false"/> + </xsd:appinfo> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#binary"/> + </xsd:annotation> + <xsd:restriction base="xsd:anySimpleType"> + <xsd:whiteSpace value="collapse" fixed="true" + id="hexBinary.whiteSpace"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="base64Binary" id="base64Binary"> + <xsd:annotation> + <xsd:appinfo> + <hfp:hasFacet name="length"/> + <hfp:hasFacet name="minLength"/> + <hfp:hasFacet name="maxLength"/> + <hfp:hasFacet name="pattern"/> + <hfp:hasFacet name="enumeration"/> + <hfp:hasFacet name="whiteSpace"/> + <hfp:hasProperty name="ordered" value="false"/> + <hfp:hasProperty name="bounded" value="false"/> + <hfp:hasProperty name="cardinality" + value="countably infinite"/> + <hfp:hasProperty name="numeric" value="false"/> + </xsd:appinfo> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#base64Binary"/> + </xsd:annotation> + <xsd:restriction base="xsd:anySimpleType"> + <xsd:whiteSpace value="collapse" fixed="true" + id="base64Binary.whiteSpace"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="anyURI" id="anyURI"> + <xsd:annotation> + <xsd:appinfo> + <hfp:hasFacet name="length"/> + <hfp:hasFacet name="minLength"/> + <hfp:hasFacet name="maxLength"/> + <hfp:hasFacet name="pattern"/> + <hfp:hasFacet name="enumeration"/> + <hfp:hasFacet name="whiteSpace"/> + <hfp:hasProperty name="ordered" value="false"/> + <hfp:hasProperty name="bounded" value="false"/> + <hfp:hasProperty name="cardinality" + value="countably infinite"/> + <hfp:hasProperty name="numeric" value="false"/> + </xsd:appinfo> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#anyURI"/> + </xsd:annotation> + <xsd:restriction base="xsd:anySimpleType"> + <xsd:whiteSpace value="collapse" fixed="true" + id="anyURI.whiteSpace"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="QName" id="QName"> + <xsd:annotation> + <xsd:appinfo> + <hfp:hasFacet name="length"/> + <hfp:hasFacet name="minLength"/> + <hfp:hasFacet name="maxLength"/> + <hfp:hasFacet name="pattern"/> + <hfp:hasFacet name="enumeration"/> + <hfp:hasFacet name="whiteSpace"/> + <hfp:hasProperty name="ordered" value="false"/> + <hfp:hasProperty name="bounded" value="false"/> + <hfp:hasProperty name="cardinality" + value="countably infinite"/> + <hfp:hasProperty name="numeric" value="false"/> + </xsd:appinfo> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#QName"/> + </xsd:annotation> + <xsd:restriction base="xsd:anySimpleType"> + <xsd:whiteSpace value="collapse" fixed="true" + id="QName.whiteSpace"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="NOTATION" id="NOTATION"> + <xsd:annotation> + <xsd:appinfo> + <hfp:hasFacet name="length"/> + <hfp:hasFacet name="minLength"/> + <hfp:hasFacet name="maxLength"/> + <hfp:hasFacet name="pattern"/> + <hfp:hasFacet name="enumeration"/> + <hfp:hasFacet name="whiteSpace"/> + <hfp:hasProperty name="ordered" value="false"/> + <hfp:hasProperty name="bounded" value="false"/> + <hfp:hasProperty name="cardinality" + value="countably infinite"/> + <hfp:hasProperty name="numeric" value="false"/> + </xsd:appinfo> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#NOTATION"/> + <xsd:documentation> + NOTATION cannot be used directly in a schema; rather a type + must be derived from it by specifying at least one enumeration + facet whose value is the name of a NOTATION declared in the + schema. + </xsd:documentation> + </xsd:annotation> + <xsd:restriction base="xsd:anySimpleType"> + <xsd:whiteSpace value="collapse" fixed="true" + id="NOTATION.whiteSpace"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:annotation> + <xsd:documentation> + Now the derived primitive types + </xsd:documentation> + </xsd:annotation> + + <xsd:simpleType name="normalizedString" id="normalizedString"> + <xsd:annotation> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#normalizedString"/> + </xsd:annotation> + <xsd:restriction base="xsd:string"> + <xsd:whiteSpace value="replace" + id="normalizedString.whiteSpace"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="token" id="token"> + <xsd:annotation> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#token"/> + </xsd:annotation> + <xsd:restriction base="xsd:normalizedString"> + <xsd:whiteSpace value="collapse" id="token.whiteSpace"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="language" id="language"> + <xsd:annotation> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#language"/> + </xsd:annotation> + <xsd:restriction base="xsd:token"> + <xsd:pattern + value="[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*" + id="language.pattern"> + <xsd:annotation> + <xsd:documentation + source="http://www.ietf.org/rfc/rfc3066.txt"> + pattern specifies the content of section 2.12 of XML 1.0e2 + and RFC 3066 (Revised version of RFC 1766). + </xsd:documentation> + </xsd:annotation> + </xsd:pattern> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="IDREFS" id="IDREFS"> + <xsd:annotation> + <xsd:appinfo> + <hfp:hasFacet name="length"/> + <hfp:hasFacet name="minLength"/> + <hfp:hasFacet name="maxLength"/> + <hfp:hasFacet name="enumeration"/> + <hfp:hasFacet name="whiteSpace"/> + <hfp:hasFacet name="pattern"/> + <hfp:hasProperty name="ordered" value="false"/> + <hfp:hasProperty name="bounded" value="false"/> + <hfp:hasProperty name="cardinality" + value="countably infinite"/> + <hfp:hasProperty name="numeric" value="false"/> + </xsd:appinfo> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#IDREFS"/> + </xsd:annotation> + <xsd:restriction> + <xsd:simpleType> + <xsd:list itemType="xsd:IDREF"/> + </xsd:simpleType> + <xsd:minLength value="1" id="IDREFS.minLength"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="ENTITIES" id="ENTITIES"> + <xsd:annotation> + <xsd:appinfo> + <hfp:hasFacet name="length"/> + <hfp:hasFacet name="minLength"/> + <hfp:hasFacet name="maxLength"/> + <hfp:hasFacet name="enumeration"/> + <hfp:hasFacet name="whiteSpace"/> + <hfp:hasFacet name="pattern"/> + <hfp:hasProperty name="ordered" value="false"/> + <hfp:hasProperty name="bounded" value="false"/> + <hfp:hasProperty name="cardinality" + value="countably infinite"/> + <hfp:hasProperty name="numeric" value="false"/> + </xsd:appinfo> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#ENTITIES"/> + </xsd:annotation> + <xsd:restriction> + <xsd:simpleType> + <xsd:list itemType="xsd:ENTITY"/> + </xsd:simpleType> + <xsd:minLength value="1" id="ENTITIES.minLength"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="NMTOKEN" id="NMTOKEN"> + <xsd:annotation> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#NMTOKEN"/> + </xsd:annotation> + <xsd:restriction base="xsd:token"> + <xsd:pattern value="\c+" id="NMTOKEN.pattern"> + <xsd:annotation> + <xsd:documentation + source="http://www.w3.org/TR/REC-xml#NT-Nmtoken"> + pattern matches production 7 from the XML spec + </xsd:documentation> + </xsd:annotation> + </xsd:pattern> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="NMTOKENS" id="NMTOKENS"> + <xsd:annotation> + <xsd:appinfo> + <hfp:hasFacet name="length"/> + <hfp:hasFacet name="minLength"/> + <hfp:hasFacet name="maxLength"/> + <hfp:hasFacet name="enumeration"/> + <hfp:hasFacet name="whiteSpace"/> + <hfp:hasFacet name="pattern"/> + <hfp:hasProperty name="ordered" value="false"/> + <hfp:hasProperty name="bounded" value="false"/> + <hfp:hasProperty name="cardinality" + value="countably infinite"/> + <hfp:hasProperty name="numeric" value="false"/> + </xsd:appinfo> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#NMTOKENS"/> + </xsd:annotation> + <xsd:restriction> + <xsd:simpleType> + <xsd:list itemType="xsd:NMTOKEN"/> + </xsd:simpleType> + <xsd:minLength value="1" id="NMTOKENS.minLength"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="Name" id="Name"> + <xsd:annotation> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#Name"/> + </xsd:annotation> + <xsd:restriction base="xsd:token"> + <xsd:pattern value="\i\c*" id="Name.pattern"> + <xsd:annotation> + <xsd:documentation + source="http://www.w3.org/TR/REC-xml#NT-Name"> + pattern matches production 5 from the XML spec + </xsd:documentation> + </xsd:annotation> + </xsd:pattern> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="NCName" id="NCName"> + <xsd:annotation> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#NCName"/> + </xsd:annotation> + <xsd:restriction base="xsd:Name"> + <xsd:pattern value="[\i-[:]][\c-[:]]*" id="NCName.pattern"> + <xsd:annotation> + <xsd:documentation + source="http://www.w3.org/TR/REC-xml-names/#NT-NCName"> + pattern matches production 4 from the Namespaces in XML spec + </xsd:documentation> + </xsd:annotation> + </xsd:pattern> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="ID" id="ID"> + <xsd:annotation> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#ID"/> + </xsd:annotation> + <xsd:restriction base="xsd:NCName"/> + </xsd:simpleType> + + <xsd:simpleType name="IDREF" id="IDREF"> + <xsd:annotation> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#IDREF"/> + </xsd:annotation> + <xsd:restriction base="xsd:NCName"/> + </xsd:simpleType> + + <xsd:simpleType name="ENTITY" id="ENTITY"> + <xsd:annotation> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#ENTITY"/> + </xsd:annotation> + <xsd:restriction base="xsd:NCName"/> + </xsd:simpleType> + + <xsd:simpleType name="integer" id="integer"> + <xsd:annotation> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#integer"/> + </xsd:annotation> + <xsd:restriction base="xsd:decimal"> + <xsd:fractionDigits value="0" fixed="true" id="integer.fractionDigits"/> + <xsd:pattern value="[\-+]?[0-9]+"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="nonPositiveInteger" id="nonPositiveInteger"> + <xsd:annotation> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#nonPositiveInteger"/> + </xsd:annotation> + <xsd:restriction base="xsd:integer"> + <xsd:maxInclusive value="0" id="nonPositiveInteger.maxInclusive"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="negativeInteger" id="negativeInteger"> + <xsd:annotation> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#negativeInteger"/> + </xsd:annotation> + <xsd:restriction base="xsd:nonPositiveInteger"> + <xsd:maxInclusive value="-1" id="negativeInteger.maxInclusive"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="long" id="long"> + <xsd:annotation> + <xsd:appinfo> + <hfp:hasProperty name="bounded" value="true"/> + <hfp:hasProperty name="cardinality" value="finite"/> + </xsd:appinfo> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#long"/> + </xsd:annotation> + <xsd:restriction base="xsd:integer"> + <xsd:minInclusive value="-9223372036854775808" id="long.minInclusive"/> + <xsd:maxInclusive value="9223372036854775807" id="long.maxInclusive"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="int" id="int"> + <xsd:annotation> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#int"/> + </xsd:annotation> + <xsd:restriction base="xsd:long"> + <xsd:minInclusive value="-2147483648" id="int.minInclusive"/> + <xsd:maxInclusive value="2147483647" id="int.maxInclusive"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="short" id="short"> + <xsd:annotation> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#short"/> + </xsd:annotation> + <xsd:restriction base="xsd:int"> + <xsd:minInclusive value="-32768" id="short.minInclusive"/> + <xsd:maxInclusive value="32767" id="short.maxInclusive"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="byte" id="byte"> + <xsd:annotation> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#byte"/> + </xsd:annotation> + <xsd:restriction base="xsd:short"> + <xsd:minInclusive value="-128" id="byte.minInclusive"/> + <xsd:maxInclusive value="127" id="byte.maxInclusive"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="nonNegativeInteger" id="nonNegativeInteger"> + <xsd:annotation> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#nonNegativeInteger"/> + </xsd:annotation> + <xsd:restriction base="xsd:integer"> + <xsd:minInclusive value="0" id="nonNegativeInteger.minInclusive"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="unsignedLong" id="unsignedLong"> + <xsd:annotation> + <xsd:appinfo> + <hfp:hasProperty name="bounded" value="true"/> + <hfp:hasProperty name="cardinality" value="finite"/> + </xsd:appinfo> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#unsignedLong"/> + </xsd:annotation> + <xsd:restriction base="xsd:nonNegativeInteger"> + <xsd:maxInclusive value="18446744073709551615" + id="unsignedLong.maxInclusive"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="unsignedInt" id="unsignedInt"> + <xsd:annotation> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#unsignedInt"/> + </xsd:annotation> + <xsd:restriction base="xsd:unsignedLong"> + <xsd:maxInclusive value="4294967295" + id="unsignedInt.maxInclusive"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="unsignedShort" id="unsignedShort"> + <xsd:annotation> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#unsignedShort"/> + </xsd:annotation> + <xsd:restriction base="xsd:unsignedInt"> + <xsd:maxInclusive value="65535" + id="unsignedShort.maxInclusive"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="unsignedByte" id="unsignedByte"> + <xsd:annotation> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#unsignedByte"/> + </xsd:annotation> + <xsd:restriction base="xsd:unsignedShort"> + <xsd:maxInclusive value="255" id="unsignedByte.maxInclusive"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="positiveInteger" id="positiveInteger"> + <xsd:annotation> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#positiveInteger"/> + </xsd:annotation> + <xsd:restriction base="xsd:nonNegativeInteger"> + <xsd:minInclusive value="1" id="positiveInteger.minInclusive"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="derivationControl"> + <xsd:annotation> + <xsd:documentation> + A utility type, not for public use</xsd:documentation> + </xsd:annotation> + <xsd:restriction base="xsd:NMTOKEN"> + <xsd:enumeration value="substitution"/> + <xsd:enumeration value="extension"/> + <xsd:enumeration value="restriction"/> + <xsd:enumeration value="list"/> + <xsd:enumeration value="union"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:group name="simpleDerivation"> + <xsd:choice> + <xsd:element ref="xsd:restriction"/> + <xsd:element ref="xsd:list"/> + <xsd:element ref="xsd:union"/> + </xsd:choice> + </xsd:group> + + <xsd:simpleType name="simpleDerivationSet"> + <xsd:annotation> + <xsd:documentation> + #all or (possibly empty) subset of {restriction, union, list} + </xsd:documentation> + <xsd:documentation> + A utility type, not for public use</xsd:documentation> + </xsd:annotation> + <xsd:union> + <xsd:simpleType> + <xsd:restriction base="xsd:token"> + <xsd:enumeration value="#all"/> + </xsd:restriction> + </xsd:simpleType> + <xsd:simpleType> + <xsd:list> + <xsd:simpleType> + <xsd:restriction base="xsd:derivationControl"> + <xsd:enumeration value="list"/> + <xsd:enumeration value="union"/> + <xsd:enumeration value="restriction"/> + </xsd:restriction> + </xsd:simpleType> + </xsd:list> + </xsd:simpleType> + </xsd:union> + </xsd:simpleType> + + <xsd:complexType name="simpleType" abstract="true"> + <xsd:complexContent> + <xsd:extension base="xsd:annotated"> + <xsd:group ref="xsd:simpleDerivation"/> + <xsd:attribute name="final" type="xsd:simpleDerivationSet"/> + <xsd:attribute name="name" type="xsd:NCName"> + <xsd:annotation> + <xsd:documentation> + Can be restricted to required or forbidden + </xsd:documentation> + </xsd:annotation> + </xsd:attribute> + </xsd:extension> + </xsd:complexContent> + </xsd:complexType> + + <xsd:complexType name="topLevelSimpleType"> + <xsd:complexContent> + <xsd:restriction base="xsd:simpleType"> + <xsd:sequence> + <xsd:element ref="xsd:annotation" minOccurs="0"/> + <xsd:group ref="xsd:simpleDerivation"/> + </xsd:sequence> + <xsd:attribute name="name" use="required" + type="xsd:NCName"> + <xsd:annotation> + <xsd:documentation> + Required at the top level + </xsd:documentation> + </xsd:annotation> + </xsd:attribute> + <xsd:anyAttribute namespace="##other" processContents="lax"/> + </xsd:restriction> + </xsd:complexContent> + </xsd:complexType> + + <xsd:complexType name="localSimpleType"> + <xsd:complexContent> + <xsd:restriction base="xsd:simpleType"> + <xsd:sequence> + <xsd:element ref="xsd:annotation" minOccurs="0"/> + <xsd:group ref="xsd:simpleDerivation"/> + </xsd:sequence> + <xsd:attribute name="name" use="prohibited"> + <xsd:annotation> + <xsd:documentation> + Forbidden when nested + </xsd:documentation> + </xsd:annotation> + </xsd:attribute> + <xsd:attribute name="final" use="prohibited"/> + <xsd:anyAttribute namespace="##other" processContents="lax"/> + </xsd:restriction> + </xsd:complexContent> + </xsd:complexType> + + <xsd:element name="simpleType" type="xsd:topLevelSimpleType" id="simpleType"> + <xsd:annotation> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#element-simpleType"/> + </xsd:annotation> + </xsd:element> + + <xsd:group name="facets"> + <xsd:annotation> + <xsd:documentation> + We should use a substitution group for facets, but + that's ruled out because it would allow users to + add their own, which we're not ready for yet. + </xsd:documentation> + </xsd:annotation> + <xsd:choice> + <xsd:element ref="xsd:minExclusive"/> + <xsd:element ref="xsd:minInclusive"/> + <xsd:element ref="xsd:maxExclusive"/> + <xsd:element ref="xsd:maxInclusive"/> + <xsd:element ref="xsd:totalDigits"/> + <xsd:element ref="xsd:fractionDigits"/> + <xsd:element ref="xsd:length"/> + <xsd:element ref="xsd:minLength"/> + <xsd:element ref="xsd:maxLength"/> + <xsd:element ref="xsd:enumeration"/> + <xsd:element ref="xsd:whiteSpace"/> + <xsd:element ref="xsd:pattern"/> + </xsd:choice> + </xsd:group> + + <xsd:group name="simpleRestrictionModel"> + <xsd:sequence> + <xsd:element name="simpleType" type="xsd:localSimpleType" minOccurs="0"/> + <xsd:group ref="xsd:facets" minOccurs="0" maxOccurs="unbounded"/> + </xsd:sequence> + </xsd:group> + + <xsd:element name="restriction" id="restriction"> + <xsd:complexType> + <xsd:annotation> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#element-restriction"> + base attribute and simpleType child are mutually + exclusive, but one or other is required + </xsd:documentation> + </xsd:annotation> + <xsd:complexContent> + <xsd:extension base="xsd:annotated"> + <xsd:group ref="xsd:simpleRestrictionModel"/> + <xsd:attribute name="base" type="xsd:QName" use="optional"/> + </xsd:extension> + </xsd:complexContent> + </xsd:complexType> + </xsd:element> + + <xsd:element name="list" id="list"> + <xsd:complexType> + <xsd:annotation> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#element-list"> + itemType attribute and simpleType child are mutually + exclusive, but one or other is required + </xsd:documentation> + </xsd:annotation> + <xsd:complexContent> + <xsd:extension base="xsd:annotated"> + <xsd:sequence> + <xsd:element name="simpleType" type="xsd:localSimpleType" + minOccurs="0"/> + </xsd:sequence> + <xsd:attribute name="itemType" type="xsd:QName" use="optional"/> + </xsd:extension> + </xsd:complexContent> + </xsd:complexType> + </xsd:element> + + <xsd:element name="union" id="union"> + <xsd:complexType> + <xsd:annotation> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#element-union"> + memberTypes attribute must be non-empty or there must be + at least one simpleType child + </xsd:documentation> + </xsd:annotation> + <xsd:complexContent> + <xsd:extension base="xsd:annotated"> + <xsd:sequence> + <xsd:element name="simpleType" type="xsd:localSimpleType" + minOccurs="0" maxOccurs="unbounded"/> + </xsd:sequence> + <xsd:attribute name="memberTypes" use="optional"> + <xsd:simpleType> + <xsd:list itemType="xsd:QName"/> + </xsd:simpleType> + </xsd:attribute> + </xsd:extension> + </xsd:complexContent> + </xsd:complexType> + </xsd:element> + + <xsd:complexType name="facet"> + <xsd:complexContent> + <xsd:extension base="xsd:annotated"> + <xsd:attribute name="value" use="required"/> + <xsd:attribute name="fixed" type="xsd:boolean" use="optional" + default="false"/> + </xsd:extension> + </xsd:complexContent> + </xsd:complexType> + + <xsd:complexType name="noFixedFacet"> + <xsd:complexContent> + <xsd:restriction base="xsd:facet"> + <xsd:sequence> + <xsd:element ref="xsd:annotation" minOccurs="0"/> + </xsd:sequence> + <xsd:attribute name="fixed" use="prohibited"/> + <xsd:anyAttribute namespace="##other" processContents="lax"/> + </xsd:restriction> + </xsd:complexContent> + </xsd:complexType> + + <xsd:element name="minExclusive" id="minExclusive" type="xsd:facet"> + <xsd:annotation> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#element-minExclusive"/> + </xsd:annotation> + </xsd:element> + <xsd:element name="minInclusive" id="minInclusive" type="xsd:facet"> + <xsd:annotation> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#element-minInclusive"/> + </xsd:annotation> + </xsd:element> + + <xsd:element name="maxExclusive" id="maxExclusive" type="xsd:facet"> + <xsd:annotation> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#element-maxExclusive"/> + </xsd:annotation> + </xsd:element> + <xsd:element name="maxInclusive" id="maxInclusive" type="xsd:facet"> + <xsd:annotation> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#element-maxInclusive"/> + </xsd:annotation> + </xsd:element> + + <xsd:complexType name="numFacet"> + <xsd:complexContent> + <xsd:restriction base="xsd:facet"> + <xsd:sequence> + <xsd:element ref="xsd:annotation" minOccurs="0"/> + </xsd:sequence> + <xsd:attribute name="value" type="xsd:nonNegativeInteger" use="required"/> + <xsd:anyAttribute namespace="##other" processContents="lax"/> + </xsd:restriction> + </xsd:complexContent> + </xsd:complexType> + + <xsd:element name="totalDigits" id="totalDigits"> + <xsd:annotation> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#element-totalDigits"/> + </xsd:annotation> + <xsd:complexType> + <xsd:complexContent> + <xsd:restriction base="xsd:numFacet"> + <xsd:sequence> + <xsd:element ref="xsd:annotation" minOccurs="0"/> + </xsd:sequence> + <xsd:attribute name="value" type="xsd:positiveInteger" use="required"/> + <xsd:anyAttribute namespace="##other" processContents="lax"/> + </xsd:restriction> + </xsd:complexContent> + </xsd:complexType> + </xsd:element> + <xsd:element name="fractionDigits" id="fractionDigits" type="xsd:numFacet"> + <xsd:annotation> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#element-fractionDigits"/> + </xsd:annotation> + </xsd:element> + + <xsd:element name="length" id="length" type="xsd:numFacet"> + <xsd:annotation> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#element-length"/> + </xsd:annotation> + </xsd:element> + <xsd:element name="minLength" id="minLength" type="xsd:numFacet"> + <xsd:annotation> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#element-minLength"/> + </xsd:annotation> + </xsd:element> + <xsd:element name="maxLength" id="maxLength" type="xsd:numFacet"> + <xsd:annotation> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#element-maxLength"/> + </xsd:annotation> + </xsd:element> + + <xsd:element name="enumeration" id="enumeration" type="xsd:noFixedFacet"> + <xsd:annotation> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#element-enumeration"/> + </xsd:annotation> + </xsd:element> + + <xsd:element name="whiteSpace" id="whiteSpace"> + <xsd:annotation> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#element-whiteSpace"/> + </xsd:annotation> + <xsd:complexType> + <xsd:complexContent> + <xsd:restriction base="xsd:facet"> + <xsd:sequence> + <xsd:element ref="xsd:annotation" minOccurs="0"/> + </xsd:sequence> + <xsd:attribute name="value" use="required"> + <xsd:simpleType> + <xsd:restriction base="xsd:NMTOKEN"> + <xsd:enumeration value="preserve"/> + <xsd:enumeration value="replace"/> + <xsd:enumeration value="collapse"/> + </xsd:restriction> + </xsd:simpleType> + </xsd:attribute> + <xsd:anyAttribute namespace="##other" processContents="lax"/> + </xsd:restriction> + </xsd:complexContent> + </xsd:complexType> + </xsd:element> + + <xsd:element name="pattern" id="pattern"> + <xsd:annotation> + <xsd:documentation + source="http://www.w3.org/TR/xmlschema-2/#element-pattern"/> + </xsd:annotation> + <xsd:complexType> + <xsd:complexContent> + <xsd:restriction base="xsd:noFixedFacet"> + <xsd:sequence> + <xsd:element ref="xsd:annotation" minOccurs="0"/> + </xsd:sequence> + <xsd:attribute name="value" type="xsd:string" use="required"/> + <xsd:anyAttribute namespace="##other" processContents="lax"/> + </xsd:restriction> + </xsd:complexContent> + </xsd:complexType> + </xsd:element> + +</xsd:schema> diff --git a/Klausuren/Sda1/2018Summer/Solve/src/main/resources/xml.xsd b/Klausuren/Sda1/2018Summer/Solve/src/main/resources/xml.xsd new file mode 100644 index 0000000000000000000000000000000000000000..e60e8c5981266215cba190f36b070b758b05c47b --- /dev/null +++ b/Klausuren/Sda1/2018Summer/Solve/src/main/resources/xml.xsd @@ -0,0 +1,286 @@ +<?xml version='1.0'?> +<xs:schema targetNamespace="http://www.w3.org/XML/1998/namespace" + xmlns:xs="http://www.w3.org/2001/XMLSchema" + xmlns ="http://www.w3.org/1999/xhtml" + xml:lang="en"> + + <xs:annotation> + <xs:documentation> + <div> + <h1>About the XML namespace</h1> + + <div class="bodytext"> + <p> + This schema document describes the XML namespace, in a form + suitable for import by other schema documents. + </p> + <p> + See <a href="http://www.w3.org/XML/1998/namespace.html"> + http://www.w3.org/XML/1998/namespace.html</a> and + <a href="http://www.w3.org/TR/REC-xml"> + http://www.w3.org/TR/REC-xml</a> for information + about this namespace. + </p> + <p> + Note that local names in this namespace are intended to be + defined only by the World Wide Web Consortium or its subgroups. + The names currently defined in this namespace are listed below. + They should not be used with conflicting semantics by any Working + Group, specification, or document instance. + </p> + <p> + See further below in this document for more information about <a + href="#usage">how to refer to this schema document from your own + XSD schema documents</a> and about <a href="#nsversioning">the + namespace-versioning policy governing this schema document</a>. + </p> + </div> + </div> + </xs:documentation> + </xs:annotation> + + <xs:attribute name="lang"> + <xs:annotation> + <xs:documentation> + <div> + + <h3>lang (as an attribute name)</h3> + <p> + denotes an attribute whose value + is a language code for the natural language of the content of + any element; its value is inherited. This name is reserved + by virtue of its definition in the XML specification.</p> + + </div> + <div> + <h4>Notes</h4> + <p> + Attempting to install the relevant ISO 2- and 3-letter + codes as the enumerated possible values is probably never + going to be a realistic possibility. + </p> + <p> + See BCP 47 at <a href="http://www.rfc-editor.org/rfc/bcp/bcp47.txt"> + http://www.rfc-editor.org/rfc/bcp/bcp47.txt</a> + and the IANA language subtag registry at + <a href="http://www.iana.org/assignments/language-subtag-registry"> + http://www.iana.org/assignments/language-subtag-registry</a> + for further information. + </p> + <p> + The union allows for the 'un-declaration' of xml:lang with + the empty string. + </p> + </div> + </xs:documentation> + </xs:annotation> + <xs:simpleType> + <xs:union memberTypes="xs:language"> + <xs:simpleType> + <xs:restriction base="xs:string"> + <xs:enumeration value=""/> + </xs:restriction> + </xs:simpleType> + </xs:union> + </xs:simpleType> + </xs:attribute> + + <xs:attribute name="space"> + <xs:annotation> + <xs:documentation> + <div> + + <h3>space (as an attribute name)</h3> + <p> + denotes an attribute whose + value is a keyword indicating what whitespace processing + discipline is intended for the content of the element; its + value is inherited. This name is reserved by virtue of its + definition in the XML specification.</p> + + </div> + </xs:documentation> + </xs:annotation> + <xs:simpleType> + <xs:restriction base="xs:NCName"> + <xs:enumeration value="default"/> + <xs:enumeration value="preserve"/> + </xs:restriction> + </xs:simpleType> + </xs:attribute> + + <xs:attribute name="base" type="xs:anyURI"> <xs:annotation> + <xs:documentation> + <div> + + <h3>base (as an attribute name)</h3> + <p> + denotes an attribute whose value + provides a URI to be used as the base for interpreting any + relative URIs in the scope of the element on which it + appears; its value is inherited. This name is reserved + by virtue of its definition in the XML Base specification.</p> + + <p> + See <a + href="http://www.w3.org/TR/xmlbase/">http://www.w3.org/TR/xmlbase/</a> + for information about this attribute. + </p> + </div> + </xs:documentation> + </xs:annotation> + </xs:attribute> + + <xs:attribute name="id" type="xs:ID"> + <xs:annotation> + <xs:documentation> + <div> + + <h3>id (as an attribute name)</h3> + <p> + denotes an attribute whose value + should be interpreted as if declared to be of type ID. + This name is reserved by virtue of its definition in the + xml:id specification.</p> + + <p> + See <a + href="http://www.w3.org/TR/xml-id/">http://www.w3.org/TR/xml-id/</a> + for information about this attribute. + </p> + </div> + </xs:documentation> + </xs:annotation> + </xs:attribute> + + <xs:attributeGroup name="specialAttrs"> + <xs:attribute ref="xml:base"/> + <xs:attribute ref="xml:lang"/> + <xs:attribute ref="xml:space"/> + <xs:attribute ref="xml:id"/> + </xs:attributeGroup> + + <xs:annotation> + <xs:documentation> + <div> + + <h3>Father (in any context at all)</h3> + + <div class="bodytext"> + <p> + denotes Jon Bosak, the chair of + the original XML Working Group. This name is reserved by + the following decision of the W3C XML Plenary and + XML Coordination groups: + </p> + <blockquote> + <p> + In appreciation for his vision, leadership and + dedication the W3C XML Plenary on this 10th day of + February, 2000, reserves for Jon Bosak in perpetuity + the XML name "xml:Father". + </p> + </blockquote> + </div> + </div> + </xs:documentation> + </xs:annotation> + + <xs:annotation> + <xs:documentation> + <div xml:id="usage" id="usage"> + <h2><a name="usage">About this schema document</a></h2> + + <div class="bodytext"> + <p> + This schema defines attributes and an attribute group suitable + for use by schemas wishing to allow <code>xml:base</code>, + <code>xml:lang</code>, <code>xml:space</code> or + <code>xml:id</code> attributes on elements they define. + </p> + <p> + To enable this, such a schema must import this schema for + the XML namespace, e.g. as follows: + </p> + <pre> + <schema . . .> + . . . + <import namespace="http://www.w3.org/XML/1998/namespace" + schemaLocation="http://www.w3.org/2001/xml.xsd"/> + </pre> + <p> + or + </p> + <pre> + <import namespace="http://www.w3.org/XML/1998/namespace" + schemaLocation="http://www.w3.org/2009/01/xml.xsd"/> + </pre> + <p> + Subsequently, qualified reference to any of the attributes or the + group defined below will have the desired effect, e.g. + </p> + <pre> + <type . . .> + . . . + <attributeGroup ref="xml:specialAttrs"/> + </pre> + <p> + will define a type which will schema-validate an instance element + with any of those attributes. + </p> + </div> + </div> + </xs:documentation> + </xs:annotation> + + <xs:annotation> + <xs:documentation> + <div id="nsversioning" xml:id="nsversioning"> + <h2><a name="nsversioning">Versioning policy for this schema document</a></h2> + <div class="bodytext"> + <p> + In keeping with the XML Schema WG's standard versioning + policy, this schema document will persist at + <a href="http://www.w3.org/2009/01/xml.xsd"> + http://www.w3.org/2009/01/xml.xsd</a>. + </p> + <p> + At the date of issue it can also be found at + <a href="http://www.w3.org/2001/xml.xsd"> + http://www.w3.org/2001/xml.xsd</a>. + </p> + <p> + The schema document at that URI may however change in the future, + in order to remain compatible with the latest version of XML + Schema itself, or with the XML namespace itself. In other words, + if the XML Schema or XML namespaces change, the version of this + document at <a href="http://www.w3.org/2001/xml.xsd"> + http://www.w3.org/2001/xml.xsd + </a> + will change accordingly; the version at + <a href="http://www.w3.org/2009/01/xml.xsd"> + http://www.w3.org/2009/01/xml.xsd + </a> + will not change. + </p> + <p> + Previous dated (and unchanging) versions of this schema + document are at: + </p> + <ul> + <li><a href="http://www.w3.org/2009/01/xml.xsd"> + http://www.w3.org/2009/01/xml.xsd</a></li> + <li><a href="http://www.w3.org/2007/08/xml.xsd"> + http://www.w3.org/2007/08/xml.xsd</a></li> + <li><a href="http://www.w3.org/2004/10/xml.xsd"> + http://www.w3.org/2004/10/xml.xsd</a></li> + <li><a href="http://www.w3.org/2001/03/xml.xsd"> + http://www.w3.org/2001/03/xml.xsd</a></li> + </ul> + </div> + </div> + </xs:documentation> + </xs:annotation> + +</xs:schema> + diff --git a/Klausuren/Sda1/2018Summer/Solve/src/test/java/de/hdm_stuttgart/mi/sda1/test/ex1/SchemaTest.java b/Klausuren/Sda1/2018Summer/Solve/src/test/java/de/hdm_stuttgart/mi/sda1/test/ex1/SchemaTest.java deleted file mode 100644 index 82e54951d870ef7ba64a650392f1cd0746d8f292..0000000000000000000000000000000000000000 --- a/Klausuren/Sda1/2018Summer/Solve/src/test/java/de/hdm_stuttgart/mi/sda1/test/ex1/SchemaTest.java +++ /dev/null @@ -1,26 +0,0 @@ -package de.hdm_stuttgart.mi.sda1.test.ex1; - -import de.hdm_stuttgart.mi.unitmarking.xsd.InstanceSetEvaluation; -import org.junit.Assert; -import org.junit.Test; - -/** - * Unit test for an XML instance set. CLI by: - * java -cp target/solvejpa-0.9-fat-tests.jar org.junit.runner.JUnitCore SchemaTest - */ -@SuppressWarnings("static-method") -public class SchemaTest { - /** - * Testing a suite of XML instances. - */ - @Test - public void testXmlInstanceSet() { - - final InstanceSetEvaluation ise = - new InstanceSetEvaluation("SchemaTest", "Schema/bib.xsd"); - - System.out.println(ise.getMessages()); - - Assert.assertTrue(ise.getErrorMessages(), ise.allTestsSucceeded); - } -} \ No newline at end of file diff --git a/Klausuren/Sda1/2018Summer/Solve/src/test/java/de/hdm_stuttgart/mi/sda1/test/ex1/ShowReachedPoints.java b/Klausuren/Sda1/2018Summer/Solve/src/test/java/de/hdm_stuttgart/mi/sda1/test/ex1/ShowReachedPoints.java new file mode 100644 index 0000000000000000000000000000000000000000..34d916adddcb0a8576cd2586321d3c28b3b89583 --- /dev/null +++ b/Klausuren/Sda1/2018Summer/Solve/src/test/java/de/hdm_stuttgart/mi/sda1/test/ex1/ShowReachedPoints.java @@ -0,0 +1,22 @@ +package de.hdm_stuttgart.mi.sda1.test.ex1; + +import de.hdm_stuttgart.mi.exam.unitmarking.RunTests; + +/** + * Unit test for an XML instance set. CLI by: + * java -cp target/solvejpa-0.9-fat-tests.jar org.junit.runner.JUnitCore ShowReachedPoints + */ +@SuppressWarnings("static-method") +public class ShowReachedPoints { + /** + * Execution reveals the number of reached points. + * + * @param args Unused + */ + public static void main(String[] args) { + RunTests.exec( + "Aufgabe 1", + Test_SchemaByInstances.class + ); + } +} \ No newline at end of file diff --git a/Klausuren/Sda1/2018Summer/Solve/src/test/java/de/hdm_stuttgart/mi/sda1/test/ex1/Test_SchemaByInstances.java b/Klausuren/Sda1/2018Summer/Solve/src/test/java/de/hdm_stuttgart/mi/sda1/test/ex1/Test_SchemaByInstances.java new file mode 100644 index 0000000000000000000000000000000000000000..7ec681b6a8bf431402905ec90abaa1fa0c1a3694 --- /dev/null +++ b/Klausuren/Sda1/2018Summer/Solve/src/test/java/de/hdm_stuttgart/mi/sda1/test/ex1/Test_SchemaByInstances.java @@ -0,0 +1,153 @@ +package de.hdm_stuttgart.mi.sda1.test.ex1; + +import de.hdm_stuttgart.mi.exam.unitmarking.ExaminationTestDefaults; +import de.hdm_stuttgart.mi.exam.unitmarking.Marking; +import de.hdm_stuttgart.mi.exam.unitmarking.xml.XmlTestSupport; +import org.junit.FixMethodOrder; +import org.junit.Test; +import org.junit.runners.MethodSorters; + +@FixMethodOrder(MethodSorters.NAME_ASCENDING) +public class Test_SchemaByInstances extends ExaminationTestDefaults { + + private final XmlTestSupport xmlTestSupport = new XmlTestSupport("SchemaTest"); + + @Test + @Marking(points = 1) + public void test_0100_valid_minimum() { + xmlTestSupport.assertValid("0100_valid_minimum.xml"); + } + + @Test + @Marking(points = 1) + public void test_0200_valid_noPublisher() { + xmlTestSupport.assertValid("0200_valid_noPublisher.xml"); + } + + @Test + @Marking(points = 1) + public void test_0210_valid_singlePublisher() { + xmlTestSupport.assertValid("0210_valid_singlePublisher.xml"); + } + + @Test + @Marking(points = 1) + public void test_0230_valid_multiplePublisher() { + xmlTestSupport.assertValid("0230_valid_multiplePublisher.xml"); + } + + @Test + @Marking(points = 2) + public void test_0240_invalid_duplicatePublisherId() { + xmlTestSupport.assertInvalid("0240_invalid_duplicatePublisherId.xml"); + xmlTestSupport.assertValid("0230_valid_multiplePublisher.xml"); + } + + @Test + @Marking(points = 2) + public void test_0250_invalid_duplicatePublisherNameCity() { + xmlTestSupport.assertInvalid("0250_invalid_duplicatePublisherNameCity.xml"); + xmlTestSupport.assertValid("0230_valid_multiplePublisher.xml"); + } + + @Test + @Marking(points = 2) + public void test_0260_invalid_publisherLevel() { + xmlTestSupport.assertInvalid("0260_invalid_publisherLevel.xml"); + xmlTestSupport.assertValid("0230_valid_multiplePublisher.xml"); + } + + @Test + @Marking(points = 1) + public void test_0300_valid_books() { + xmlTestSupport.assertValid("0300_valid_books.xml"); + } + + @Test + @Marking(points = 2) + public void test_0310_invalid_bookNoTitle() { + xmlTestSupport.assertInvalid("0310_invalid_bookNoTitle.xml"); + xmlTestSupport.assertValid("0300_valid_books.xml"); + } + + @Test + @Marking(points = 2) + public void test_0320_invalid_bookNoAuthor() { + xmlTestSupport.assertInvalid("0320_invalid_bookNoAuthor.xml"); + xmlTestSupport.assertValid("0300_valid_books.xml"); + } + + @Test + @Marking(points = 1) + public void test_0400_valid_websites() { + xmlTestSupport.assertValid("0400_valid_websites.xml"); + } + + @Test + @Marking(points = 2) + public void test_0410_invalid_websiteDateViolation() { + xmlTestSupport.assertInvalid("0410_invalid_websiteDateViolation.xml"); + xmlTestSupport.assertValid("0400_valid_websites.xml"); + } + + @Test + @Marking(points = 2) + public void test_0420_invalid_websiteMissingAccessDate() { + xmlTestSupport.assertInvalid("0420_invalid_websiteMissingAccessDate.xml"); + xmlTestSupport.assertValid("0400_valid_websites.xml"); + } + + @Test + @Marking(points = 2) + public void test_0430_invalid_websiteMissingUrl() { + xmlTestSupport.assertInvalid("0430_invalid_websiteMissingUrl.xml"); + xmlTestSupport.assertValid("0400_valid_websites.xml"); + } + + @Test + @Marking(points = 2) + public void test_0440_invalid_websiteUrlFormatViolation() { + xmlTestSupport.assertInvalid("0440_invalid_websiteUrlFormatViolation.xml"); + xmlTestSupport.assertValid("0400_valid_websites.xml"); + } + + @Test + @Marking(points = 1) + public void test_0500_valid_booksWebsites() { + xmlTestSupport.assertValid("0500_valid_booksWebsites.xml"); + } + + @Test + @Marking(points = 1) + public void test_0510_invalid_bookDuplicateId() { + xmlTestSupport.assertInvalid("0510_invalid_bookDuplicateId.xml"); + xmlTestSupport.assertValid("0500_valid_booksWebsites.xml"); + } + + @Test + @Marking(points = 1) + public void test_0515_invalid_bookYear() { + xmlTestSupport.assertInvalid("0515_invalid_bookYear.xml"); + xmlTestSupport.assertValid("0500_valid_booksWebsites.xml"); + } + + @Test + @Marking(points = 1) + public void test_0520_invalid_bibDuplicateId() { + xmlTestSupport.assertInvalid("0520_invalid_bibDuplicateId.xml"); + xmlTestSupport.assertValid("0500_valid_booksWebsites.xml"); + } + + @Test + @Marking(points = 1) + public void test_0600_invalid_bookInvalidPublisher() { + xmlTestSupport.assertInvalid("0600_invalid_bookInvalidPublisher.xml"); + xmlTestSupport.assertValid("0300_valid_books.xml"); + } + + @Test + @Marking(points = 1) + public void test_0700_valid_bibPublisherIdCompat() { + xmlTestSupport.assertValid("0700_valid_bibPublisherIdCompat.xml"); + } +} \ No newline at end of file diff --git a/ws/Artifacts/Unitmarking/pom.xml b/ws/Artifacts/Unitmarking/pom.xml index 87c0a682fc2132177d36d2c07ee66f7ef59ed310..f0c9504c46df4b14a0d02079b8ec29ebe9a1e72b 100644 --- a/ws/Artifacts/Unitmarking/pom.xml +++ b/ws/Artifacts/Unitmarking/pom.xml @@ -4,7 +4,7 @@ <groupId>de.hdm_stuttgart.mi.exam</groupId> <artifactId>unitmarking</artifactId> - <version>0.9</version> + <version>1.0</version> <packaging>jar</packaging> <name>unitmarking</name> @@ -52,13 +52,6 @@ <version>1.1.6</version> </dependency> - <dependency> - <groupId>org.xmlunit</groupId> - <artifactId>xmlunit-core</artifactId> - <version>2.6.2</version> - </dependency> - - </dependencies> <build> diff --git a/ws/Artifacts/Unitmarking/src/main/java/de/hdm_stuttgart/mi/exam/unitmarking/xml/XmlTestSupport.java b/ws/Artifacts/Unitmarking/src/main/java/de/hdm_stuttgart/mi/exam/unitmarking/xml/XmlTestSupport.java index 69b1098a445ad3a938ca7705d629bbf0120339d4..fdfb70279adcb303c8e6470b6b5e45119ad5d0f9 100644 --- a/ws/Artifacts/Unitmarking/src/main/java/de/hdm_stuttgart/mi/exam/unitmarking/xml/XmlTestSupport.java +++ b/ws/Artifacts/Unitmarking/src/main/java/de/hdm_stuttgart/mi/exam/unitmarking/xml/XmlTestSupport.java @@ -1,122 +1,201 @@ package de.hdm_stuttgart.mi.exam.unitmarking.xml; import org.junit.Assert; +import org.w3c.dom.Attr; +import org.w3c.dom.Element; import org.xml.sax.SAXException; -import org.xmlunit.XMLUnitException; -import org.xmlunit.builder.Input; -import org.xmlunit.validation.Languages; -import org.xmlunit.validation.ValidationResult; -import org.xmlunit.validation.Validator; +import org.xml.sax.SAXParseException; +import org.xml.sax.helpers.DefaultHandler; +import javax.xml.XMLConstants; +import javax.xml.parsers.DocumentBuilder; +import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; -import javax.xml.parsers.SAXParser; -import javax.xml.parsers.SAXParserFactory; -import javax.xml.transform.Source; import javax.xml.transform.stream.StreamSource; -import java.io.File; +import javax.xml.validation.SchemaFactory; +import javax.xml.validation.Validator; import java.io.IOException; -import java.util.stream.Collectors; -import java.util.stream.StreamSupport; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.HashMap; +import java.util.Map; public class XmlTestSupport { - static { - final Validator xmlSchemaValidatorTmp = Validator.forLanguage(Languages.W3C_XML_SCHEMA_NS_URI); - xmlSchemaValidatorTmp.setSchemaSource(new StreamSource("src/main/resources/XMLSchema.xsd")); - xmlSchemaValidator = xmlSchemaValidatorTmp; - } - - static final Validator xmlSchemaValidator; - - private SAXParser nonValidatingParser; - private WellformedCheckHandler wch; - - private final String schemaFileName; - private final Validator validator; - public final String schemaInvalidErrorMessages; - - public XmlTestSupport(final String schemaFileName) { - this.schemaFileName = schemaFileName; - - Validator validatorTmp = null; - String schemaInvalidErrorMessagesTmp = null; - wch = new WellformedCheckHandler(); + static public final String + /** + * <p>The XML Schema namespace as being defined in + * https://www.w3.org/TR/xmlschema-1/#Instance_Document_Constructions.</p> + */ + xmlns_xsi = "http://www.w3.org/2001/XMLSchema-instance" + /** + * <p>The schema reference attribute name, see {@link #xmlns_xsi} for explanation.</p> + */ + ,noNamespaceSchemaLocationAttributeName = "noNamespaceSchemaLocation"; + + static private final SchemaFactory schemaFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI); + static private final Map<Path, Validator> validator2schema = new HashMap<>(); + private final DocumentBuilder nonValidatingBuilder; + + /** + * The directory containing schema unit tests. + */ + public final String testDirectoryPathname; + + + /** + * Unit test support for schema unit tests. + * + * @param testDirectoryPathname see {@link #testDirectoryPathname} + */ + public XmlTestSupport(final String testDirectoryPathname) { + this.testDirectoryPathname = testDirectoryPathname; + final DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); + factory.setNamespaceAware(true); + factory.setValidating(false); + DocumentBuilder nonValidatingBuilderTmp = null; try { - SAXParserFactory spf = SAXParserFactory.newInstance(); - spf.setValidating(false); - spf.setNamespaceAware(true); - - nonValidatingParser = spf.newSAXParser(); - nonValidatingParser.parse(new File(schemaFileName), wch); - - // Document is well-formed, so what about validity? - try { - final Source source = Input.fromFile(schemaFileName).build(); - final ValidationResult r = xmlSchemaValidator.validateInstance(source); - if (r.isValid()) { - validatorTmp = Validator.forLanguage(Languages.W3C_XML_SCHEMA_NS_URI); - validatorTmp.setSchemaSource(new StreamSource(schemaFileName)); - } else { - schemaInvalidErrorMessagesTmp = "Schema " + schemaFileName + " is invalid:" - + formatErrorMessages(r); - } - } catch (final XMLUnitException e) { - final Throwable cause = e.getCause(); - schemaInvalidErrorMessagesTmp = - null == cause? - e.getMessage(): - " Not well-formed?\n " + cause.getMessage(); - } - - } catch (SAXException e) { - schemaInvalidErrorMessagesTmp = " Unable to parse " + schemaFileName + " " + - wch.formatErrorMessages() + "\n schema is possibly not well-formed\n " + - e.getMessage(); - }catch (ParserConfigurationException | IOException e) { - schemaInvalidErrorMessagesTmp = " Unable to parse " + schemaFileName + " " + - e.getMessage() ; + nonValidatingBuilderTmp = factory.newDocumentBuilder(); + nonValidatingBuilderTmp.setErrorHandler(new DefaultHandler()); + } catch (ParserConfigurationException e) { + Assert.fail("Unable to create non-validating parser:" + e); + } finally { + nonValidatingBuilder = nonValidatingBuilderTmp; } + } - validator = validatorTmp; - schemaInvalidErrorMessages = schemaInvalidErrorMessagesTmp; + /** + * Assert whether or not the given instance is valid. + * + * @param instanceFilename The XML instance containing an XML schema reference to be handled. + * @param expectValidInstance A value of true of false will cause the assertion to fail in case the instance is + * invalid or valid respectively. + */ + private void assertExpectedValidationStatus(final String instanceFilename, final boolean expectValidInstance) { + + final Path instancePath = Paths.get(testDirectoryPathname, instanceFilename).normalize(); + + final Attr schemaPathNameAttr = parseWellFormed( // Schema reference found? + instancePath).getAttributeNodeNS(xmlns_xsi, noNamespaceSchemaLocationAttributeName); + + Assert.assertNotNull( // Oops, no schema! + "No schema provided by attribute " + noNamespaceSchemaLocationAttributeName + + " from namespace\n" + xmlns_xsi + " in file " + getClickableFileName(instanceFilename, 1), + schemaPathNameAttr); + + final Path schemaPath = Paths.get( + instancePath.getParent().toString(), // Strip filename from path, + schemaPathNameAttr.getValue()).normalize(); // add relative schema path + + parseWellFormed(schemaPath); // Schema is well-formed? + final Path xmlSchemaPath = Paths.get("src/main/resources/XMLSchema.xsd"); + validate(schemaPath, xmlSchemaPath, true);// Schema valid with respect to XML schema standard ? + validate(instancePath, schemaPath, expectValidInstance); // Instance valid or invalid with respect to given XML schema ? } - public void assertValid(final String instanceFileName) { + /** + * <p>Assert a given instance to be valid. The following steps will be evaluated:</p> + * + * <ol> + * <li> + * <p>Check instance for well-formedness</p> + * <p>Possible failure: Instnce may not be well-formed.</p> + * </li> + * <li> + * <p>Get the associated schema using the instance's {@link #noNamespaceSchemaLocationAttributeName} + * * attribute value.</p> + * <p>Possible failures:</p> + * <ul> + * <li>Missing attribute or wrong namespace</li> + * <li>Missing or wrong attribute value not being resolvable to an XML Schema.</li> + * </ul> + * </li> + * <li> + * <p>Check the associated schema to be well-formed.</p> + * <p>Possible failure: The schema may not be well-formed.</p> + * </li> + * <li> + * <p>Check the associated schema itself to be valid with respect to + * * <a href="https://www.w3.org/TR/xmlschema-1/#normative-schemaSchema">A Schema for Schemas</a>.</p> + * <p>Possible failure: The schema may not be well-formed.</p> + * </li> + * <li id="valid2schema"> + * <p>Check the instance for validity with respect to the associated schema.</p> + * <p>Possible failure: The instance may not be valid.</p> + * </li> + * </ol> + * + * <p>Any negative outcome will result in a test failure.</p> + * + * @param instanceFilename The instance to be examined. + */ + public void assertValid(final String instanceFilename) { + assertExpectedValidationStatus(instanceFilename, true); + } - parseWellFormed(instanceFileName); + /** + * <p>Similar to {@link #assertValid(String)} except for the <a href="#valid2schema">very last step</a> being + * expected to fail.</p> + * + * @param instanceFilename The instance to be examined. + */ + public void assertInvalid(final String instanceFilename) { + assertExpectedValidationStatus(instanceFilename, false); + } - final ValidationResult r = validator.validateInstance(Input.fromFile(instanceFileName).build()); + static void validate(final Path instancePath, final Path schemaPath, final boolean expectValidInstance) { - if (! r.isValid()) { - Assert.fail(instanceFileName + " expected to be valid but:\n " + formatErrorMessages(r) + "\n"); + final String instanceFilename = instancePath.getFileName().toString(); + try { + Validator validator = // Validator already present from + validator2schema.get(schemaPath); // parsing another instance? + if (null == validator) { + validator = schemaFactory.newSchema(schemaPath.toFile()).newValidator(); + validator2schema.put(schemaPath, validator); + } + validator.validate( // Re-do parsing: Starting from DOMSource(root) + new StreamSource(instancePath.toFile())); // conceals line numbers, sigh! + if (!expectValidInstance) { + Assert.fail("Instance " + getClickableFileName(instanceFilename, 1) + " is supposed to be invalid"); + } + } catch (final SAXParseException e) { + if (expectValidInstance) { + Assert.fail("Instance " + getClickableFileName(instanceFilename, e.getLineNumber()) + + " is invalid:\n" + format(e) + "\n"); + } + } catch (final SAXException e) { + if (expectValidInstance) { + Assert.fail("Instance " + instanceFilename + " is NOT valid reason:" + e + "\n"); + } + } catch (final IOException e) { + Assert.fail("Unable to read " + instanceFilename + ": " + e + "\n"); } } - private void parseWellFormed(final String instanceFileName) { - wch.clear(); + private Element parseWellFormed(final Path instancePath) { try { - nonValidatingParser.parse(new File(instanceFileName), wch); - } catch (final SAXException e) { - Assert.fail(instanceFileName + " possibly not well-formed:\n " + - wch.formatErrorMessages()); - }catch (final IOException e) { - Assert.fail(e.getMessage()); + return nonValidatingBuilder.parse( + instancePath.toFile()).getDocumentElement(); + } catch (final SAXParseException e) { + Assert.fail("Unable to parse " + instancePath.toString() + + ":\n " + getClickableFileName(instancePath.getFileName().toString(), e.getLineNumber()) + ")\n" + + format(e) + "\nDocument possibly not well-formed\n"); + } catch (final SAXException e) { + Assert.fail("Unable to parse '" + instancePath + "':\n" + e); + } catch (final IOException e) { + Assert.fail("Unable to read '" + instancePath + "':\n" + e); } + return null; // Runtime unreachable due to previously either returning or assert based test failure. } - public void assertInvalid(final String instanceFileName) { - - parseWellFormed(instanceFileName); - if (validator.validateInstance(Input.fromFile(instanceFileName).build()).isValid()) { - Assert.fail(instanceFileName + "should be invalid\n"); - } + static private String format(final SAXParseException e) { + return "line=" + e.getLineNumber() + ", column=" + e.getColumnNumber() + ":\n" + + e.getMessage(); } - - static public String formatErrorMessages(final ValidationResult r) { - return StreamSupport. - stream(r.getProblems().spliterator(), true). - map(p -> "\n line=" + p.getLine() + ", column=" + p.getColumn() + ":\n " + p.getMessage()). - collect(Collectors.joining("\n ")); + // See + // https://stackoverflow.com/questions/7930844/is-it-possible-to-have-clickable-class-names-in-console-output-in-intellij + static private String getClickableFileName(final String fileName, final int line) { + return ".(" + fileName + ":" + line + ")"; } } \ No newline at end of file diff --git a/ws/Artifacts/Unitmarking/src/main/java/de/hdm_stuttgart/mi/unitmarking/xsd/CreateTestClass.java b/ws/Artifacts/Unitmarking/src/main/java/de/hdm_stuttgart/mi/unitmarking/xsd/CreateTestClass.java new file mode 100644 index 0000000000000000000000000000000000000000..73ca55273c761387ff994e402ad01c5b228336c1 --- /dev/null +++ b/ws/Artifacts/Unitmarking/src/main/java/de/hdm_stuttgart/mi/unitmarking/xsd/CreateTestClass.java @@ -0,0 +1,103 @@ +package de.hdm_stuttgart.mi.unitmarking.xsd; + +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.jdom2.Document; +import org.jdom2.JDOMException; +import org.jdom2.ProcessingInstruction; +import org.jdom2.filter.Filters; +import org.jdom2.input.SAXBuilder; +import org.jdom2.input.sax.XMLReaders; +import org.jdom2.xpath.XPathExpression; +import org.jdom2.xpath.XPathFactory; + +import java.io.File; +import java.io.IOException; +import java.util.Arrays; +import java.util.Comparator; +import java.util.List; + +/** + * Evaluate a given set of XML document instances + * + */ +class CreateTestClass { + + private static Logger log = LogManager.getLogger(CreateTestClass.class); + private final String xmlTestFileDir; + + /** + * + * @param xmlTestFileDir Directory containing XML instances to be processed. + */ + CreateTestClass(final String xmlTestFileDir) { + + this.xmlTestFileDir = xmlTestFileDir; + + System.out.println("private final XmlTestSupport xmlTestSupport = new XmlTestSupport(\""+ + xmlTestFileDir +"\");\n"); + + Arrays.stream(new File(xmlTestFileDir).listFiles(path -> path.getPath().endsWith(".xml"))). + sorted(Comparator.comparing(File::toString)). + forEach(this::readTestHeader); + + } + + private void readTestHeader(final File instanceFilename) { + + final SAXBuilder metainfoParser = new SAXBuilder(XMLReaders.NONVALIDATING); + try { + final Document doc = metainfoParser.build(instanceFilename); + + final XPathExpression<ProcessingInstruction> searchHeader = + XPathFactory.instance().compile( + "/processing-instruction('xmlTest')", + Filters.processinginstruction()); + final List<ProcessingInstruction> xmlTestList = + searchHeader.evaluate(doc); + + switch (xmlTestList.size()) { + case 0: + log.info("No 'xmlTest PI found, possible dependency file"); + break; + case 1: + writeTest(instanceFilename.getName(), xmlTestList.get(0)); + break; + default: + log.info("Found " + xmlTestList.size() + "' annotations in file '" + instanceFilename.getPath() + "'\n"); + } + + } catch (final JDOMException e) { + log.error("Document '" + instanceFilename.getPath() + + "' is invalid:", e); + log.error("Unable to parse document " + instanceFilename.getPath() + ": " + e + "\n"); + } catch (final IOException e) { + log.error("Unable to read document " + instanceFilename.getPath() + ": " + e + "\n"); + } + } + + private void writeTest(final String fileName, final ProcessingInstruction pi) { + + final int points = Integer.parseInt(pi.getPseudoAttributeValue("points")); + final boolean expectedToBeValid = Boolean.parseBoolean(pi.getPseudoAttributeValue("expectedToBeValid")); + + System.out.println("@Test @Marking(points = " + points + ")"); + + final String fileBaseName = fileName.replaceFirst("[.][^.]+$", ""); + System.out.println("public void test_" + fileBaseName + "() {"); + + + if (expectedToBeValid) { + System.out.println(" xmlTestSupport.assertValid(\"" + fileName + "\");"); + } else { + System.out.println(" xmlTestSupport.assertInvalid(\"" + fileName + "\");"); + } + + final String preconditionValidFilename = pi.getPseudoAttributeValue("preconditionValid"); + + if (null != preconditionValidFilename) { + System.out.println(" xmlTestSupport.assertValid(\"" + preconditionValidFilename + "\");"); + } + System.out.println("}\n"); + } +} diff --git a/ws/Artifacts/Unitmarking/src/main/java/de/hdm_stuttgart/mi/unitmarking/xsd/GenerateUnitTestClass.java b/ws/Artifacts/Unitmarking/src/main/java/de/hdm_stuttgart/mi/unitmarking/xsd/GenerateUnitTestClass.java new file mode 100644 index 0000000000000000000000000000000000000000..d6abbda96cacea7234a1e6a773b4fe0d308fcb87 --- /dev/null +++ b/ws/Artifacts/Unitmarking/src/main/java/de/hdm_stuttgart/mi/unitmarking/xsd/GenerateUnitTestClass.java @@ -0,0 +1,14 @@ +package de.hdm_stuttgart.mi.unitmarking.xsd; + + +/** + * Hack: Should be copied avoiding versioning problems. + */ +public class GenerateUnitTestClass { + + public static void main(String[] args) { + + final CreateTestClass create = + new CreateTestClass("SchemaTest"); + } +} diff --git a/ws/Artifacts/Unitmarking/src/main/java/de/hdm_stuttgart/mi/unitmarking/xsd/InstanceSetEvaluation.java b/ws/Artifacts/Unitmarking/src/main/java/de/hdm_stuttgart/mi/unitmarking/xsd/InstanceSetEvaluation.java index 681b2ee72424d1fda38e8c7177183b7cd15e9a0d..6ab8111dc752afad532949f57ebfa66b53f8fc7c 100644 --- a/ws/Artifacts/Unitmarking/src/main/java/de/hdm_stuttgart/mi/unitmarking/xsd/InstanceSetEvaluation.java +++ b/ws/Artifacts/Unitmarking/src/main/java/de/hdm_stuttgart/mi/unitmarking/xsd/InstanceSetEvaluation.java @@ -105,34 +105,34 @@ public class InstanceSetEvaluation { void readTestHeader(final File instanceFilename, final String xsdSchemaFilename) { - final SAXBuilder metainfoParser = new SAXBuilder(XMLReaders.NONVALIDATING); - try { - final Document doc = metainfoParser.build(instanceFilename); - - final XPathExpression<ProcessingInstruction> searchHeader = - XPathFactory.instance().compile( - "/processing-instruction('xmlTest')", - Filters.processinginstruction()); - final List<ProcessingInstruction> xmlTestList = - searchHeader.evaluate(doc); - - switch (xmlTestList.size()) { - case 0: - log.info("No 'xmlTest PI found, possible dependency file"); - break; - case 1: - tests.add(new InstanceTest(xmlTestList.get(0), xmlTestFileDir, xsdSchemaFilename, instanceFilename)); - break; - default: - warnings.append("Found " + xmlTestList.size() + "' annotations in file '" + instanceFilename.getPath() + "'\n"); - } - - } catch (final JDOMException e) { - log.error("Document '" + instanceFilename.getPath() + - "' is invalid:", e); - warnings.append("Unable to parse document " + instanceFilename.getPath() + ": " + e + "\n"); - } catch (final IOException e) { - warnings.append("Unable to read document " + instanceFilename.getPath() + ": " + e + "\n"); - } +// final SAXBuilder metainfoParser = new SAXBuilder(XMLReaders.NONVALIDATING); +// try { +// final Document doc = metainfoParser.build(instanceFilename); +// +// final XPathExpression<ProcessingInstruction> searchHeader = +// XPathFactory.instance().compile( +// "/processing-instruction('xmlTest')", +// Filters.processinginstruction()); +// final List<ProcessingInstruction> xmlTestList = +// searchHeader.evaluate(doc); +// +// switch (xmlTestList.size()) { +// case 0: +// log.info("No 'xmlTest PI found, possible dependency file"); +// break; +// case 1: +// tests.add(new InstanceTest(xmlTestList.get(0), xmlTestFileDir, xsdSchemaFilename, instanceFilename)); +// break; +// default: +// warnings.append("Found " + xmlTestList.size() + "' annotations in file '" + instanceFilename.getPath() + "'\n"); +// } +// +// } catch (final JDOMException e) { +// log.error("Document '" + instanceFilename.getPath() + +// "' is invalid:", e); +// warnings.append("Unable to parse document " + instanceFilename.getPath() + ": " + e + "\n"); +// } catch (final IOException e) { +// warnings.append("Unable to read document " + instanceFilename.getPath() + ": " + e + "\n"); +// } } } diff --git a/ws/Artifacts/Unitmarking/src/main/java/de/hdm_stuttgart/mi/unitmarking/xsd/InstanceTest.java b/ws/Artifacts/Unitmarking/src/main/java/de/hdm_stuttgart/mi/unitmarking/xsd/InstanceTest.java index 83d4adc46eb04356f0d1ce771b18d4e7fb0de04a..11e0bf683dfa31d369c02a206404fc48e1765720 100644 --- a/ws/Artifacts/Unitmarking/src/main/java/de/hdm_stuttgart/mi/unitmarking/xsd/InstanceTest.java +++ b/ws/Artifacts/Unitmarking/src/main/java/de/hdm_stuttgart/mi/unitmarking/xsd/InstanceTest.java @@ -75,14 +75,14 @@ public class InstanceTest { * @param xmlTest The PI meta annotation header containing the expected * result, points etc. * @param xmlTestFileDir The directory containing the XML instance files. + * @param xsdSchemaFilename The schema to be used for validation. * @param xmlInstance The current instance to be evaluated. */ public InstanceTest(final ProcessingInstruction xmlTest, final String xmlTestFileDir, final String xsdSchemaFilename, final File xmlInstance) { Validator validator = null; - - SchemaFactory sf = SchemaFactory.newInstance( + final SchemaFactory sf = SchemaFactory.newInstance( "http://www.w3.org/XML/XMLSchema/v1.1"); Schema s;