<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
           xmlns="http://purl.org/dc/xmlns/2008/09/01/dc-ds-xml/"
           targetNamespace="http://purl.org/dc/xmlns/2008/09/01/dc-ds-xml/"
           elementFormDefault="qualified"
           attributeFormDefault="qualified">

  <xs:annotation>
    <xs:documentation xml:lang="en">
      XML Schema for http://purl.org/dc/xmlns/2008/09/01/dc-ds-xml/ namespace

      Created 2008-09-01

      Created by

      Pete Johnston (pete.johnston@eduserv.org.uk)

      This schema declares a set of XML elements and attributes for use in DC-DS-XML documents.

    </xs:documentation>

  </xs:annotation>

  <xs:import namespace="http://www.w3.org/XML/1998/namespace"
             schemaLocation="http://www.w3.org/2001/xml.xsd">
  </xs:import>

  <xs:complexType name="DescriptionSetElement" final="extension">
    <xs:annotation>
      <xs:documentation>
        The DescriptionSetElement complexType defines the content model for a DC-XML-Full Description Set Element.
        A DC-XML-Full Description Set Element may contain one or more DC-XML-Full Description Elements.
        A DC-XML-Full Description Set Element may also have XML attributes, the names of which may be from any other XML namespace.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element ref="description" minOccurs="1" maxOccurs="unbounded" />
    </xs:sequence>
    <xs:attributeGroup ref="DescriptionSetElementAttributes" />
  </xs:complexType>

  <xs:attributeGroup name="DescriptionSetElementAttributes">
    <xs:anyAttribute namespace="##other" processContents="lax" />
  </xs:attributeGroup>


  <xs:element name="descriptionSet" type="DescriptionSetElement" />


  <xs:complexType name="DescriptionElement" final="extension">
    <xs:annotation>
      <xs:documentation>
        The DescriptionElement complexType defines the content model for a DC-XML-Full Description Element.
        A DC-XML-Full Description Element may contain one or more DC-XML-Full Statement Elements.
        A DC-XML-Full Description Element may also have a dcxf:resourceURI and a dcxf:resourceId attribute.
        A DC-XML-Full Description Element may also have other XML attributes, the names of which may be from any other XML namespace.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element ref="statement" minOccurs="1" maxOccurs="unbounded" />
    </xs:sequence>
    <xs:attributeGroup ref="DescriptionElementAttributes" />
  </xs:complexType>

  <xs:attributeGroup name="DescriptionElementAttributes">
    <xs:attribute ref="resourceId" use="optional"/> <!-- can't constrain either resourceId or resourceURI -->
    <xs:attribute ref="resourceURI" use="optional"/>
    <xs:anyAttribute namespace="##other" processContents="lax" />
  </xs:attributeGroup>

  <xs:attribute name="resourceId" type="xs:ID" />

  <xs:attribute name="resourceURI" type="xs:anyURI" />


  <xs:element name="description" type="DescriptionElement" />


  <xs:complexType name="StatementElement" final="extension">
    <xs:annotation>
      <xs:documentation>
        The StatementElement complexType defines the content model for a DC-XML-Full Statement Element.
        A DC-XML-Full Statement Element must have a dcxf:propertyURI or dcxf:propertyPrefName attribute.
        A DC-XML-Full Statement Element may contain Value String Elements.
        A DC-XML-Full Statement Element may also have a dcxf:valueURI, dcxf:vesURI, or dcxf:valueRef attribute.
        A DC-XML-Full Statement Element may also have other XML attributes, the names of which may be from any other XML namespace.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:choice minOccurs="0" maxOccurs="unbounded">
        <xs:element ref="valueString"/>
        <xs:element ref="literalValueString"/>
      </xs:choice>
    </xs:sequence>
    <xs:attributeGroup ref="StatementElementAttributes"/>
  </xs:complexType>

  <xs:attributeGroup name="StatementElementAttributes">
    <xs:attribute ref="propertyURI" use="optional"/>
    <xs:attribute ref="vesURI" use="optional"/>
    <xs:attribute ref="valueURI" use="optional"/> <!-- can't constrain either valueRef or valueURI -->
    <xs:attribute ref="valueRef" use="optional"/>
    <xs:anyAttribute namespace="##other" processContents="lax" />
  </xs:attributeGroup>

  <xs:attribute name="propertyURI" type="xs:anyURI" />

  <xs:attribute name="valueURI" type="xs:anyURI" />

  <xs:attribute name="vesURI" type="xs:anyURI" />

  <xs:attribute name="valueRef" type="xs:IDREF" />


  <xs:element name="statement" type="StatementElement" />



  <xs:complexType name="ValueStringElement" mixed="true" final="extension">
    <xs:annotation>
      <xs:documentation>

      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded" processContents="lax"/>
    </xs:sequence>
    <xs:attributeGroup ref="ValueStringElementAttributes"/>
  </xs:complexType>

  <xs:attributeGroup name="ValueStringElementAttributes">
    <xs:attribute ref="xml:lang" use="optional"/> <!-- can't constrain either xml:lang or sesURI -->
    <xs:attribute ref="sesURI" use="optional"/>
    <xs:anyAttribute namespace="##other" processContents="lax" />
  </xs:attributeGroup>

  <xs:attribute name="sesURI" type="xs:anyURI" />


  <xs:element name="valueString" type="ValueStringElement" />

  <xs:element name="literalValueString" type="ValueStringElement" />

</xs:schema>
