<?xml version="1.0" encoding="windows-1251"?>

<custom xmlns="uri:colorer:custom">
  <!-- XML Schema magic simple types definition -->

  <custom-type targetNamespace="http://www.w3.org/2001/XMLSchema">

    <prefix>s</prefix>
    <prefix>xs</prefix>
    <prefix>xsd</prefix>
    <prefix>wxs</prefix>
    <empty-prefix/>

    <contributors>Cail Lomecb</contributors>

    <top-level>
      <element>schema</element>
    </top-level>

    <outline>
      <element name='schema' extract='withAttribute' description='Schema root'/>
      <element name='import' extract='withAttribute' description='Schema import'/>
      <element name='include' extract='withAttribute' description='Schema include'/>
      <element name='element' extract='withAttribute' description='Global element'/>
      <element name='group' extract='withAttribute' description='Global group'/>
      <element name='attribute' extract='withAttribute' description='Global attribute'/>
      <element name='attributeGroup' extract='withAttribute' description='Schema global attribute group'/>
      <element name='complexType' extract='withAttribute' description='Global complex type'/>
      <element name='simpleType' extract='withAttribute' description='Global simple type'/>
      <element name='annotation' extract='withAttribute' description='Annotation definition'/>
    </outline>

    <type xmlns="http://colorer.sf.net/2003/hrc">

      <scheme name="anyType-content"/>
      <scheme name="anySimpleType-content"/>
      <scheme name="anySimpleType-AttributeContent">
        <inherit scheme="AttributeContent">
          <virtual scheme="xml:AttValue.content.stream" subst-scheme="anySimpleType-content"/>
        </inherit>
      </scheme>

      <scheme name="string-content">
        <regexp match="/[%xml:Char;]/" priority="low"/>
      </scheme>
      <scheme name="boolean-content">
        <regexp match="/\b(true|1)\b/" region="BooleanConstant"/>
        <regexp match="/\b(false|0)\b/" region="BooleanConstant"/>
      </scheme>
      <scheme name="decimal-content">
        <regexp match="/ [\-+]? (\d+\.?\d* | \.\d+\b) /ix" region="Number"/>
      </scheme>
      <scheme name="float-content">
        <inherit scheme="FloatNumber"/>
        <regexp match="/ INF|-INF|NaN /x" region="Number"/>
      </scheme>
      <scheme name="double-content">
        <inherit scheme="float-content"/>
      </scheme>

      <scheme name="duration-content">
        <regexp match="/[\-+]? P \d+Y \d+M \d+D (T \d+H \d+M (\d+(\.\d*)?)S)? /x" region="Date"/>
      </scheme>
      <scheme name="dateTime-content">
        <regexp match="/[\-+]? \d{4,} - \d\d - \d\d T \d\d:\d\d:(\d\d(\.\d+)?) (Z|[+-]\d\d:\d\d)?/x" region="Date"/>
      </scheme>
      <scheme name="time-content">
        <regexp match="/[\-+]? \d\d:\d\d:(\d\d(\.\d+)?) (Z|[+-]\d\d:\d\d)?/x" region="Date"/>
      </scheme>
      <scheme name="date-content">
        <regexp match="/[\-+]? \d{4,} - \d\d - \d\d/x" region="Date"/>
      </scheme>
      <scheme name="gYearMonth-content">
        <regexp match="/[\-+]? \d{4,} - \d\d/x" region="Date"/>
      </scheme>
      <scheme name="gYear-content">
        <regexp match="/[\-+]? \d{4,}/x" region="Date"/>
      </scheme>
      <scheme name="gMonthDay-content">
        <regexp match="/\-\- \d\d - \d\d/x" region="Date"/>
      </scheme>
      <scheme name="gDay-content">
        <regexp match="/\-\-\- \d\d/x" region="Date"/>
      </scheme>
      <scheme name="gMonth-content">
        <regexp match="/\-\- \d\d \-\-/x" region="Date"/>
      </scheme>

      <scheme name="hexBinary-content">
        <regexp match="/[0-9a-fA-F]+/ix"/>
      </scheme>
      <scheme name="base64Binary-content">
        <regexp match="/[\x3D-\x7A]+/ix"/>
      </scheme>

      <scheme name="anyURI-content">
        <inherit scheme="def:NetURL"/>
        <inherit scheme="string-content"/>
      </scheme>
      <scheme name="QName-content">
        <regexp match="/\b (?{}%xml:NCName;(\:))?%xml:NCName; \b/ix" region1="Attribute.nsprefix"/>
      </scheme>
      <scheme name="NOTATION-content">
        <!-- It is an ˇerrorˇ for NOTATION to be used directly in a schema. Only datatypes that are ˇderivedˇ from NOTATION by specifying a value for ˇenumerationˇ can be used in a schema. -->
      </scheme>


  <!-- derived datatypes -->

      <scheme name="normalizedString-content">
        <regexp match="/\t+/" region="xml:badChar"/>
        <inherit scheme="string-content"/>
      </scheme>

      <scheme name="token-content">
        <!--<regexp match="/\S\s/" priority="low"/>
        <regexp match="/.$|^./" region="xml:badChar"/>
        <regexp match="/\s+/" region="xml:badChar"/>-->
        <inherit scheme="normalizedString-content"/>
      </scheme>
      <scheme name="language-content">
        <regexp match="/\b([a-zA-Z]{2}|[iI]-[a-zA-Z]+|[xX]-[a-zA-Z]{1,8})(-[a-zA-Z]{1,8})*\b/ix"/>
      </scheme>
      <scheme name="NMTOKEN-content">
        <regexp match="/\b %xml:Nmtoken; \b/ix"/>
      </scheme>
      <scheme name="NMTOKENS-content">
        <regexp match="/\b %xml:Nmtoken; \b /ix"/>
      </scheme>
      <scheme name="Name-content">
        <regexp match="/\b %xml:Name; \b/ix"/>
      </scheme>
      <scheme name="NCName-content">
        <regexp match="/\b %xml:NCName; \b/ix"/>
      </scheme>
      <scheme name="ID-content">
        <inherit scheme="NCName-content"/>
      </scheme>
      <scheme name="IDREF-content">
        <inherit scheme="NCName-content"/>
      </scheme>
      <scheme name="IDREFS-content">
        <inherit scheme="NCName-content"/>
      </scheme>
      <scheme name="ENTITY-content">
        <inherit scheme="NCName-content"/>
      </scheme>
      <scheme name="ENTITIES-content">
        <inherit scheme="NCName-content"/>
      </scheme>
      <scheme name="integer-content">
        <regexp match="/[-+]?\d+ \b/x" region="NumberDec"/>
      </scheme>
      <scheme name="nonPositiveInteger-content">
        <regexp match="/0 | -\d+ \b/x" region="NumberDec"/>
      </scheme>
      <scheme name="negativeInteger-content">
        <regexp match="/ \- \d+ \b/x" region="NumberDec"/>
      </scheme>
      <scheme name="nonNegativeInteger-content">
        <regexp match="/\+? \d+ \b/x" region="NumberDec"/>
      </scheme>
      <scheme name="positiveInteger-content">
        <regexp match="/\+? \d+ \b/x" region="NumberDec"/>
      </scheme>
      <scheme name="long-content">
        <regexp match="/[\-+]? \d{1,19} \b/x" region="NumberDec"/>
      </scheme>
      <scheme name="int-content">
        <regexp match="/[\-+]? \d{1,10} \b/x" region="NumberDec"/>
      </scheme>
      <scheme name="short-content">
        <regexp match="/[\-+]? \d{1,5} \b/x" region="NumberDec"/>
      </scheme>
      <scheme name="byte-content">
        <regexp match="/[\-+]? \d{1,3} \b/x" region="NumberDec"/>
      </scheme>
      <scheme name="unsignedLong-content">
        <regexp match="/\d{1,19} \b/x" region="NumberDec"/>
      </scheme>
      <scheme name="unsignedInt-content">
        <regexp match="/\d{1,10} \b/x" region="NumberDec"/>
      </scheme>
      <scheme name="unsignedShort-content">
        <regexp match="/\d{1,5} \b/x" region="NumberDec"/>
      </scheme>
      <scheme name="unsignedByte-content">
        <regexp match="/\d{1,3} \b/x" region="NumberDec"/>
      </scheme>
    </type>
  </custom-type>
</custom>
