<?xml version="1.0" encoding="utf-8"?>

<!DOCTYPE hrc
  PUBLIC "-//Cail Lomecb//DTD Colorer HRC take5//EN" "http://colorer.sf.net/2003/hrc.dtd">
<hrc xmlns="http://colorer.sf.net/2003/hrc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:hrc="http://colorer.sf.net/2003/hrc" xmlns:xs="http://www.w3.org/2001/XMLSchema" version="take5" xsi:schemaLocation="http://colorer.sf.net/2003/hrc http://colorer.sf.net/2003/hrc.xsd">
<!--
  insert this define into HRC base catalog file (colorer.hrc)

  <prototype name="xsd2hrc.custom" group="group" description="xsd2hrc.custom" targetNamespace="uri:colorer:custom">
    <location link="xsd2hrc.custom.hrc"/>
    <filename>/\./ix</filename>
  </prototype>
-->
   <type name="xsd2hrc.custom">
      <annotation>
         <documentation>
           XSLT Generated HRC scheme for language 'xsd2hrc.custom'
           from XML Schema with xsd2hrc.xsl version 0.9 (c) Cail Lomecb

           Scheme parameters:
             targetNamespace             : uri:colorer:custom
             hrctype                     : xsd2hrc.custom
             allow-common-attr           : yes
             allow-any-attr              : no
             allow-unknown-elements      : no
             allow-unknown-root-elements : no
             force-single-root           : yes
             default prefixes            : 
               you can change them with entity 'nsprefix'

         </documentation>
         <documentation>
          Schema documentation:
    This is the XML Schema for custom description format of
    xsd2hrc.xsl transformer. It simply defines few elements and
    imports Colorer HRC language namespace to make life better
    Cail Lomecb (cail@nm.ru)
  </documentation>
         <contributors>None</contributors>
      </annotation>

      <import type="def"/>

      <region name="element.start.name" parent="xml:element.defined.start.name"/>
      <region name="element.end.name" parent="xml:element.defined.end.name"/>
      <region name="element.start.lt" parent="xml:element.start.lt"/>
      <region name="element.start.gt" parent="xml:element.start.gt"/>
      <region name="element.end.lt" parent="xml:element.end.lt"/>
      <region name="element.end.gt" parent="xml:element.end.gt"/>
      <region name="element.nsprefix" parent="element.start.name"/>
      <region name="element.nscolon" parent="xml:element.nscolon"/>
      <region name="Attribute.name" parent="xml:Attribute.defined.name"/>
      <region name="Attribute.nsprefix" parent="xml:Attribute.nsprefix"/>
      <region name="AttValue" parent="xml:AttValue.defined"/>
      <region name="AttValue.start" parent="xml:AttValue.defined.start"/>
      <region name="AttValue.end" parent="xml:AttValue.defined.end"/>
      <region name="Enumeration" parent="xml:Enumeration" description="Enumerated type values"/>

      <entity name="ns-real-prefix" value=""/>
      <entity name="nsprefix" value=""/>

      <scheme name="_hrc_int_elementContent">
         <block start="/~( (&lt;) (  ((%xml:NCName;) (:) )? (%xml:Name;) ) \M &gt;?   )/x" end="/( (&lt;\/) (\y3\b)?= ( (%xml:NCName;) (:) )? (%xml:Name;) \b \M \s* (&gt;?)                   | (\/ \M &gt;) )/x" region01="PairStart" region02="element.start.lt" region05="element.nsprefix" region06="element.nscolon" region07="element.start.name" region11="PairEnd" region12="element.end.lt" region15="element.nsprefix" region16="element.nscolon" region17="element.end.name" region18="element.end.gt" region19="element.start.gt" scheme="xml:elementContent2"/>
         <inherit scheme="xml:badChar"/>
      </scheme>
      <scheme name="_hrc_int_AttValue">
         <block start="/(&#34;)/" end="/(\y1)/" region00="PairStart" region10="PairEnd" region01="AttValue.start" region11="AttValue.end" scheme="xml:AttValue.content.quot" region="AttValue"/>
         <block start="/(')/" end="/(\y1)/" region00="PairStart" region10="PairEnd" region01="AttValue.start" region11="AttValue.end" scheme="xml:AttValue.content.apos" region="AttValue"/>
      </scheme>
      <scheme name="AttributeContent">
         <inherit scheme="xml:AttributeContent">
            <virtual scheme="xml:AttValue" subst-scheme="_hrc_int_AttValue"/>
         </inherit>
      </scheme>
      <scheme name="custom-element">
         <block start="/\M &lt; (%nsprefix;custom ([\s\/&gt;]|$) )/x" end="/ &gt; /x" scheme="_hrc_int_d0e7-elementContent"/>
      </scheme>
<!--
        parent: custom
-->

      <scheme name="_hrc_int_d0e7-content">
         <block start="/\M &lt; (%nsprefix;custom-type ([\s\/&gt;]|$) )/x" end="/ &gt; /x" scheme="custom-type-Type-elementContent"/>
      </scheme>
      <scheme name="_hrc_int_d0e7-content-error">
         <inherit scheme="_hrc_int_d0e7-content"/>
         <inherit scheme="xml:badChar"/>
      </scheme>
      <scheme name="_hrc_int_d0e7-Attributes"/>
      <scheme name="_hrc_int_d0e7-elementContent">
         <inherit scheme="_hrc_int_elementContent">
            <virtual scheme="xml:element" subst-scheme="_hrc_int_d0e7-content"/>
            <virtual scheme="xml:content.cdata" subst-scheme="xml:badChar"/>
            <virtual scheme="xml:Attribute.any" subst-scheme="_hrc_int_d0e7-Attributes"/>
         </inherit>
      </scheme>

      <scheme name="custom-type-Type-content">
         <block start="/\M &lt; (%nsprefix;prefix ([\s\/&gt;]|$) )/x" end="/ &gt; /x" scheme="xmlschema:NCName-elementContent"/>
         <block start="/\M &lt; (%nsprefix;empty-prefix ([\s\/&gt;]|$) )/x" end="/ &gt; /x" scheme="_hrc_int_d0e15-elementContent"/>
         <block start="/\M &lt; (%nsprefix;any-prefix ([\s\/&gt;]|$) )/x" end="/ &gt; /x" scheme="_hrc_int_d0e17-elementContent"/>
         <block start="/\M &lt; (%nsprefix;contributors ([\s\/&gt;]|$) )/x" end="/ &gt; /x" scheme="xmlschema:string-elementContent"/>
         <block start="/\M &lt; (%nsprefix;top-level ([\s\/&gt;]|$) )/x" end="/ &gt; /x" scheme="_hrc_int_d0e20-elementContent"/>
         <block start="/\M &lt; (%nsprefix;outline ([\s\/&gt;]|$) )/x" end="/ &gt; /x" scheme="_hrc_int_d0e25-elementContent"/>
         <block start="/\M &lt; (%nsprefix;type ([\s\/&gt;]|$) )/x" end="/ &gt; /x" scheme="hrc:type-elementContent"/>
      </scheme>
      <scheme name="custom-type-Type-content-error">
         <inherit scheme="custom-type-Type-content"/>
         <inherit scheme="xml:badChar"/>
      </scheme>
      <scheme name="custom-type-Type-Attributes">
         <block end="/[&#34;']?#1/" region02="Attribute.name" start="/(\s?#1|^)(targetNamespace)\M([\s\=]|$)/x" scheme="xmlschema:anyURI-AttributeContent"/>
      </scheme>
      <scheme name="custom-type-Type-elementContent">
         <inherit scheme="_hrc_int_elementContent">
            <virtual scheme="xml:element" subst-scheme="custom-type-Type-content"/>
            <virtual scheme="xml:content.cdata" subst-scheme="xml:badChar"/>
            <virtual scheme="xml:Attribute.any" subst-scheme="custom-type-Type-Attributes"/>
         </inherit>
      </scheme>
<!--
        parent: empty-prefix
-->

      <scheme name="_hrc_int_d0e15-content"/>
      <scheme name="_hrc_int_d0e15-content-error">
         <inherit scheme="_hrc_int_d0e15-content"/>
         <inherit scheme="xml:badChar"/>
      </scheme>
      <scheme name="_hrc_int_d0e15-Attributes"/>
      <scheme name="_hrc_int_d0e15-elementContent">
         <inherit scheme="_hrc_int_elementContent">
            <virtual scheme="xml:element" subst-scheme="_hrc_int_d0e15-content"/>
            <virtual scheme="xml:content.cdata" subst-scheme="xml:badChar"/>
            <virtual scheme="xml:Attribute.any" subst-scheme="_hrc_int_d0e15-Attributes"/>
         </inherit>
      </scheme>
<!--
        parent: any-prefix
-->

      <scheme name="_hrc_int_d0e17-content"/>
      <scheme name="_hrc_int_d0e17-content-error">
         <inherit scheme="_hrc_int_d0e17-content"/>
         <inherit scheme="xml:badChar"/>
      </scheme>
      <scheme name="_hrc_int_d0e17-Attributes"/>
      <scheme name="_hrc_int_d0e17-elementContent">
         <inherit scheme="_hrc_int_elementContent">
            <virtual scheme="xml:element" subst-scheme="_hrc_int_d0e17-content"/>
            <virtual scheme="xml:content.cdata" subst-scheme="xml:badChar"/>
            <virtual scheme="xml:Attribute.any" subst-scheme="_hrc_int_d0e17-Attributes"/>
         </inherit>
      </scheme>
<!--
        parent: top-level
-->

      <scheme name="_hrc_int_d0e20-content">
         <block start="/\M &lt; (%nsprefix;element ([\s\/&gt;]|$) )/x" end="/ &gt; /x" scheme="xmlschema:NCName-elementContent"/>
         <block start="/\M &lt; (%nsprefix;group ([\s\/&gt;]|$) )/x" end="/ &gt; /x" scheme="xmlschema:NCName-elementContent"/>
      </scheme>
      <scheme name="_hrc_int_d0e20-content-error">
         <inherit scheme="_hrc_int_d0e20-content"/>
         <inherit scheme="xml:badChar"/>
      </scheme>
      <scheme name="_hrc_int_d0e20-Attributes"/>
      <scheme name="_hrc_int_d0e20-elementContent">
         <inherit scheme="_hrc_int_elementContent">
            <virtual scheme="xml:element" subst-scheme="_hrc_int_d0e20-content"/>
            <virtual scheme="xml:content.cdata" subst-scheme="xml:badChar"/>
            <virtual scheme="xml:Attribute.any" subst-scheme="_hrc_int_d0e20-Attributes"/>
         </inherit>
      </scheme>
<!--
        parent: outline
-->

      <scheme name="_hrc_int_d0e25-content">
         <block start="/\M &lt; (%nsprefix;element ([\s\/&gt;]|$) )/x" end="/ &gt; /x" scheme="_hrc_int_d0e28-elementContent"/>
      </scheme>
      <scheme name="_hrc_int_d0e25-content-error">
         <inherit scheme="_hrc_int_d0e25-content"/>
         <inherit scheme="xml:badChar"/>
      </scheme>
      <scheme name="_hrc_int_d0e25-Attributes"/>
      <scheme name="_hrc_int_d0e25-elementContent">
         <inherit scheme="_hrc_int_elementContent">
            <virtual scheme="xml:element" subst-scheme="_hrc_int_d0e25-content"/>
            <virtual scheme="xml:content.cdata" subst-scheme="xml:badChar"/>
            <virtual scheme="xml:Attribute.any" subst-scheme="_hrc_int_d0e25-Attributes"/>
         </inherit>
      </scheme>
<!--
        parent: element
-->

      <scheme name="_hrc_int_d0e28-content"/>
      <scheme name="_hrc_int_d0e28-content-error">
         <inherit scheme="_hrc_int_d0e28-content"/>
         <inherit scheme="xml:badChar"/>
      </scheme>
      <scheme name="_hrc_int_d0e28-Attributes">
         <block end="/[&#34;']?#1/" region02="Attribute.name" start="/(\s?#1|^)(name)\M([\s\=]|$)/x" scheme="xmlschema:NCName-AttributeContent"/>
         <block end="/[&#34;']?#1/" region02="Attribute.name" start="/(\s?#1|^)(extract)\M([\s\=]|$)/x" scheme="_hrc_int_d0e31-AttributeContent"/>
         <block end="/[&#34;']?#1/" region02="Attribute.name" start="/(\s?#1|^)(description)\M([\s\=]|$)/x" scheme="xmlschema:string-AttributeContent"/>
      </scheme>
      <scheme name="_hrc_int_d0e28-elementContent">
         <inherit scheme="_hrc_int_elementContent">
            <virtual scheme="xml:element" subst-scheme="_hrc_int_d0e28-content"/>
            <virtual scheme="xml:content.cdata" subst-scheme="xml:badChar"/>
            <virtual scheme="xml:Attribute.any" subst-scheme="_hrc_int_d0e28-Attributes"/>
         </inherit>
      </scheme>
<!--
        parent: extract
-->

      <scheme name="_hrc_int_d0e31-content">
         <regexp region="Enumeration" match="/attributeValue/"/>
         <regexp region="Enumeration" match="/withAttribute/"/>
         <regexp region="Enumeration" match="/fullElement/"/>
         <regexp region="Enumeration" match="/tillNext/"/>
      </scheme>
      <scheme name="_hrc_int_d0e31-content-error">
         <inherit scheme="_hrc_int_d0e31-content"/>
         <inherit scheme="xml:badChar"/>
      </scheme>
      <scheme name="_hrc_int_d0e31-Attributes"/>
      <scheme name="_hrc_int_d0e31-AttributeContent">
         <inherit scheme="AttributeContent">
            <virtual scheme="xml:AttValue.content.stream" subst-scheme="_hrc_int_d0e31-content-error"/>
         </inherit>
      </scheme>

      <scheme name="patterns-Type-content">
         <block start="/\M &lt; (%nsprefix;match ([\s\/&gt;]|$) )/x" end="/ &gt; /x" scheme="_hrc_int_d0e43-elementContent"/>
      </scheme>
      <scheme name="patterns-Type-content-error">
         <inherit scheme="patterns-Type-content"/>
         <inherit scheme="xml:badChar"/>
      </scheme>
      <scheme name="patterns-Type-Attributes"/>
      <scheme name="patterns-Type-elementContent">
         <inherit scheme="_hrc_int_elementContent">
            <virtual scheme="xml:element" subst-scheme="patterns-Type-content"/>
            <virtual scheme="xml:content.cdata" subst-scheme="xml:badChar"/>
            <virtual scheme="xml:Attribute.any" subst-scheme="patterns-Type-Attributes"/>
         </inherit>
      </scheme>
<!--
        parent: match
-->

      <scheme name="_hrc_int_d0e43-content"/>
      <scheme name="_hrc_int_d0e43-content-error">
         <inherit scheme="_hrc_int_d0e43-content"/>
         <inherit scheme="xml:badChar"/>
      </scheme>
      <scheme name="_hrc_int_d0e43-Attributes">
         <block end="/[&#34;']?#1/" region02="Attribute.name" start="/(\s?#1|^)(token)\M([\s\=]|$)/x" scheme="xmlschema:token-AttributeContent"/>
         <block end="/[&#34;']?#1/" region02="Attribute.name" start="/(\s?#1|^)(subst)\M([\s\=]|$)/x" scheme="xmlschema:string-AttributeContent"/>
      </scheme>
      <scheme name="_hrc_int_d0e43-elementContent">
         <inherit scheme="_hrc_int_elementContent">
            <virtual scheme="xml:element" subst-scheme="_hrc_int_d0e43-content"/>
            <virtual scheme="xml:content.cdata" subst-scheme="xml:badChar"/>
            <virtual scheme="xml:Attribute.any" subst-scheme="_hrc_int_d0e43-Attributes"/>
         </inherit>
      </scheme>


      <scheme name="xsd2hrc.custom-root" access="public">
         <annotation>
            <documentation>
               You can replace these elements with needed single root element
               with customizing HRC generation process.
              </documentation>
         </annotation>
         <inherit scheme="custom-element"/>
      </scheme>
      <scheme name="xsd2hrc.custom" access="public">
         <inherit scheme="xml:singleroot">
            <virtual scheme="xml:element" subst-scheme="xsd2hrc.custom-root"/>
         </inherit>
      </scheme>
   </type>
</hrc>
