<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <xs:element name="DisclosureSystems">
    <xs:complexType>
      <xs:sequence>
        <xs:element minOccurs="0" maxOccurs="unbounded" ref="DisclosureSystem"/>
      </xs:sequence>
      <xs:anyAttribute namespace="http://www.w3.org/2001/XMLSchema-instance"/>
    </xs:complexType>
  </xs:element>
  <xs:simpleType name="validationType">
    <xs:restriction base="xs:token">
	  <!--  this fixed restriction list is removed as the current practice is to allow
	        authorities and users to extend the plug-in set with validations defined locally
	        in the plug-ins
      <xs:enumeration value="EFM"/>
      <xs:enumeration value="GFM"/>
      <xs:enumeration value="HMRC"/>
      <xs:enumeration value="SBR-NL"/>
      <xs:enumeration value="EBA"/>
      <xs:enumeration value="EIOPA"/>
      -->
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="emptyString">
    <xs:restriction base="xs:string">
      <xs:length value="0"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="ncnameOrEmptyString">
    <xs:union memberTypes="xs:NCName emptyString"/>
  </xs:simpleType>
  <xs:element name="DisclosureSystem">
    <xs:complexType>
      <xs:attribute name="validationType" use="required" type="validationType"/>
      <xs:attribute name="exclusiveTypesPattern" use="optional"/>
      <xs:attribute name="contextElement" use="optional" type="xs:NCName"/>
      <xs:attribute name="defaultLanguage" use="optional" type="xs:NCName"/>
      <xs:attribute name="defaultXmlLang" use="optional" type="ncnameOrEmptyString"/>
      <xs:attribute name="defaultXmlEncoding" use="optional" type="xs:string"/> 
      <!-- defaultXmlEncoding may be an empty string to detect when missing in an XML document -->
      <xs:attribute name="xmlLangPattern" />
      <xs:attribute name="xmlLangIsInheritable" use="optional" type="xs:boolean" default="true"/>
      <!-- xml:lang inheritance for label and footnote, spec sections 4.11.1.2.1 and 5.2.2.2.1 -->
      <xs:attribute name="deiAmendmentFlagElement" use="optional" type="xs:NCName"/>
      <xs:attribute name="deiCurrentFiscalYearEndDateElement" use="optional" type="xs:NCName"/>
      <xs:attribute name="deiDocumentFiscalYearFocusElement" use="optional" type="xs:NCName"/>
      <xs:attribute name="deiDocumentPeriodEndDateElement" use="optional" type="xs:NCName"/>
      <xs:attribute name="deiFilerIdentifierElement" use="optional" type="xs:NCName"/>
      <xs:attribute name="deiFilerNameElement" use="optional" type="xs:NCName"/>
      <xs:attribute name="deiNamespacePattern" use="optional"/>
      <xs:attribute name="description" />
      <xs:attribute name="identifierSchemePattern" use="optional"/>
      <xs:attribute name="identifierValueName" use="optional"/>
      <xs:attribute name="identifierValuePattern" use="optional"/>
      <xs:attribute name="labelCheckPattern" use="optional"/>
      <xs:attribute name="labelTrimPattern" use="optional"/>
      <xs:attribute name="names" use="required"/>
      <xs:attribute name="roleDefinitionPattern" use="optional"/>
      <xs:attribute name="standardTaxonomiesUrl" use="optional" />
      <xs:attribute name="validTaxonomiesUrl" use="optional" />
      <xs:attribute name="mappingsUrl" />
      <xs:attribute name="utrUrl" />
      <xs:attribute name="utrStatusFilters" />
      <xs:attribute name="validateFileText" type="xs:boolean"/>
      <xs:attribute name="validateEntryText" type="xs:boolean"/>
      <xs:attribute name="allowedExternalHrefPattern" type="xs:string"/>
      <xs:attribute name="allowedImageTypes" type="xs:string"/>
      <xs:attribute name="blockDisallowedReferences" type="xs:boolean"/>
      <xs:attribute name="maxSubmissionSubdirectoryEntryNesting" type="xs:integer"/>
      <xs:attribute name="logLevelFilter" />
      <xs:attribute name="logCodeFilter" />
      <xs:attribute name="standardTaxonomyDatabase" />
      <xs:attribute name="standardTaxonomyUrlPattern" />
      <xs:attribute name="options" />
    </xs:complexType>
  </xs:element>
</xs:schema>
