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

<articleinfo>

<releaseinfo>Colorer-take5 beta2 library HRC Reference. September 2003</releaseinfo>
<title>HRC Language Reference</title>

<pubdate>12 September 2003</pubdate>

<revhistory>
<revision>
  <revnumber>take5.beta2</revnumber>
  <date>12 September 2003</date>
  <revremark>(Available as
    <ulink url="http://colorer.sf.net/hrc-ref/">HTML</ulink>,
    <ulink url="http://colorer.sf.net/hrc-ref/hrc-ref.pdf">PDF</ulink>,
    <ulink url="http://colorer.sf.net/hrc-ref/hrc-ref.zip">DocBook</ulink>)
  </revremark>
</revision>
<revision>
  <revnumber>take5.beta1</revnumber>
  <date>30 March 2003</date>
</revision>
<revision>
  <revnumber>take5.alpha3</revnumber>
  <date>1 March 2003</date>
</revision>
<revision>
  <revnumber>take5.alpha2</revnumber>
  <date>30 January 2003</date>
</revision>
</revhistory>
<author>
  <firstname>Igor</firstname><surname>Ruskih</surname>
  <affiliation>
    <address>
      <email>cail at nm.ru</email>
    </address>
  </affiliation>
</author>

<copyright><year>2003</year><holder>Igor Ruskih (Cail Lomecb)</holder></copyright>

<abstract><title>Abstract</title>
<para>This reference defines syntax and semantic of
<acronym role="Highlighting Resource Codes">HRC</acronym>
language, used in Colorer-take5 Library to represent and describe
syntax and lexical structure of target programming language.
This description is used by library to
parse and colourise text in editors or other systems.
</para>
</abstract>
</articleinfo>


<section id="introduction">
<title>Introduction</title>

<para>
HRC is a script language, describing parse process of text files to produce
syntax highlighting. It is based on XML language, and defines its
own XML vocabulary and structure.
HRC language was developed to achieve most flexible and efficient process
of describing programming language structure.
</para>
<para>
Started nearly in year 1999, it was a simple XML-like structure, describing
some common language construction. But later it has grown into
the much more complex and powerful language, describing complex relations between
different languages, syntax contexts.
</para>

</section>



<section id="core">
<title>Core Syntax</title>
<para>
HRC language allows describing and storing syntax rules for numerous languages.
All language descriptions are divided into two parts:
<emphasis role="strong">Informal</emphasis> part, used to describe
this language properties, language choose rules (<literal>prototype</literal>),
and <emphasis role="strong">Formal</emphasis> part, which defines
syntax and semantic of target parsed language (<literal>type</literal>).
Prototypes are used to determine, which type to apply to the currently opened
file, they define some internal application-dependent properties
and other useful information about language.
</para>
<formalpara><title>Structure</title><para>
Each HRC file contains declaration of one or more prototypes or
one language type. Root XML content starts with <literal>hrc</literal>
element, which contains all other definitions.
</para>

<anchor xmlns:xs="http://www.w3.org/2001/XMLSchema" id="typehrc"/><para xmlns:xs="http://www.w3.org/2001/XMLSchema" role="xsdocwrap"><para role="xsdocdecl">Element Name:
   <literal>hrc</literal>, type:
   <link linkend="xsidhrc"><literal>hrc</literal></link></para><para role="xsdoc">Root of the HRC file XML structure.</para><para role="xsdochead">Attribute:
   <literal>version</literal>, type:
     <ulink url="http://www.w3.org/TR/xmlschema-2#NMTOKEN"><literal>xs:NMTOKEN</literal></ulink></para><para role="xsdoc">Specifies version of HRC language. For example, 'take5' for Colorer-take5.</para><para role="xsdocdecl">Content:</para><para role="xsdochead">Element:
   <literal>annotation</literal>, type:
    <link linkend="typeannotation"><literal>annotation</literal></link></para><para role="xsdoc">Defines formal documentation for HRC language elements.</para><para role="xsdochead">Element:
   <literal>prototype</literal>, type:
    <link linkend="typeprototype"><literal>prototype</literal></link></para><para role="xsdoc">Defines prototype of single target programming language.</para><para role="xsdochead">Element:
   <literal>type</literal>, type:
    <link linkend="typetype"><literal>type</literal></link></para><para role="xsdoc">Language container, used to store all parser specific information.</para></para>

<para>
Each HRC language object is defined using XML elements and attributes.
You can find definition of HRC XML Syntax in <xref linkend="hrcxsd"/>.
Each element in HRC can be documented with XML Schema-like standard 
elements:
</para>

<anchor xmlns:xs="http://www.w3.org/2001/XMLSchema" id="typeannotation"/><para xmlns:xs="http://www.w3.org/2001/XMLSchema" role="xsdocwrap"><para role="xsdocdecl">Element Name:
   <literal>annotation</literal>, type:
   <link linkend="xsidannotation"><literal>annotation</literal></link></para><para role="xsdoc">Defines formal documentation for HRC language elements.</para><para role="xsdocdecl">Content:</para><para role="xsdochead">Element:
   <literal>appinfo</literal>, type:
    <link linkend="xsidappinfo"><literal>appinfo</literal></link></para><para role="xsdoc"/><para role="xsdochead">Element:
   <literal>documentation</literal>, type:
    <link linkend="xsiddocumentation"><literal>documentation</literal></link></para><para role="xsdoc"/><para role="xsdochead">Element:
   <literal>contributors</literal>, type:
    <link linkend="xsidcontributors"><literal>contributors</literal></link></para><para role="xsdoc"/></para>

<para>
Annotation object can be used anywhere in HRC context to document
and describe any of the HRC elements.

</para>
</formalpara>


<section id="core.filetypes"><title>File Types</title>
<para>Each language prototype requires definition of
language name and description. These properties are used
to determine language in context of other language definitions
and in inter-languages linkage.
</para>


<section id="core.filetypes.proto"><title>Prototypes</title>

<anchor xmlns:xs="http://www.w3.org/2001/XMLSchema" id="typeprototype"/><para xmlns:xs="http://www.w3.org/2001/XMLSchema" role="xsdocwrap"><para role="xsdocdecl">Element Name:
   <literal>prototype</literal>, type:
   <link linkend="xsidprototype"><literal>prototype</literal></link></para><para role="xsdoc">Defines prototype of single target programming language. This prototype must have name, equals to real type, defined in linked resource.</para><para role="xsdochead">Attribute:
   <literal>name</literal>, type:
     <ulink url="http://www.w3.org/TR/xmlschema-2#NCName"><literal>xs:NCName</literal></ulink></para><para role="xsdoc">Common internal name of this language type. Must be valid XML non-qualified name.</para><para role="xsdochead">Attribute:
   <literal>description</literal>, type:
     <ulink url="http://www.w3.org/TR/xmlschema-2#string"><literal>xs:string</literal></ulink></para><para role="xsdoc">User description, used to represent language in target IDE.</para><para role="xsdochead">Attribute:
   <literal>group</literal>, type:
     <ulink url="http://www.w3.org/TR/xmlschema-2#Name"><literal>xs:Name</literal></ulink></para><para role="xsdoc">Group of languages, this language belongs to.</para><para role="xsdochead">Attribute:
   <literal>targetNamespace</literal>, type:
     <ulink url="http://www.w3.org/TR/xmlschema-2#anyURI"><literal>xs:anyURI</literal></ulink></para><para role="xsdoc">Applicable to the XML group of languages. Specifies namespace, this HRC file describing. Allows automatically linking and combining different XML languages in HRC.</para><para role="xsdocdecl">Content:</para><para role="xsdochead">Element:
   <literal>annotation</literal>, type:
    <link linkend="typeannotation"><literal>annotation</literal></link></para><para role="xsdoc">Defines formal documentation for HRC language elements.</para><para role="xsdochead">Element:
   <literal>location</literal>, type:
    <link linkend="xsidlocation"><literal>location</literal></link></para><para role="xsdoc">Points to the location of HRC file with this language description. Link is well formed URI address of requested HRC file. This location can be relative to the location of parent type, or absolute (with any URI schema). If URI schema is absent, 'file://' is assumed.</para><para role="xsdochead">Element:
   <literal>filename</literal>, type:
    <link linkend="typefilename"><literal>filename</literal></link></para><para role="xsdoc">Defines Regular Expression, used to identify programming language by its file name.</para><para role="xsdochead">Element:
   <literal>firstline</literal>, type:
    <link linkend="typefirstline"><literal>firstline</literal></link></para><para role="xsdoc">Defines Regular Expression, used to identify programming language by its starting content.</para><para role="xsdochead">Element:
   <literal>parameters</literal>, type:
    <link linkend="xsidparameters"><literal>parameters</literal></link></para><para role="xsdoc">Custom parameters, used to specify additional properties of this language type. These can include different language resources (icons, templates and so on).</para></para>

<para>

Each language must be chosen by library before starting syntax highlighting
process. This is made with help of <literal>firstline</literal> and <literal>filename</literal>
parameters. Each matched instance of one of these parameters adds some additional
weight to total language weight. This value is taken by default, or could be changed
explicitly with <literal>weight</literal> attribute of these elements.
When total weights of all types are evaluated, first language with maximum
weight is selected to assign to opened file.

</para>

<anchor xmlns:xs="http://www.w3.org/2001/XMLSchema" id="typefilename"/><para xmlns:xs="http://www.w3.org/2001/XMLSchema" role="xsdocwrap"><para role="xsdocdecl">Element Name:
   <literal>filename</literal>, type:
   <link linkend="xsidfilename"><literal>filename</literal></link></para><para role="xsdoc">Defines Regular Expression, used to identify programming language by its file name. This can include file's extension or some more complex dependencies.</para><para role="xsdochead">Attribute:
   <literal>weight</literal>, type:
     <ulink url="http://www.w3.org/TR/xmlschema-2#decimal"><literal>xs:decimal</literal></ulink>, default:
     <literal>2</literal></para><para role="xsdoc">This attribute defines weight, added to the total language weight, when choosing one from a list of available.</para></para>
<anchor xmlns:xs="http://www.w3.org/2001/XMLSchema" id="typefirstline"/><para xmlns:xs="http://www.w3.org/2001/XMLSchema" role="xsdocwrap"><para role="xsdocdecl">Element Name:
   <literal>firstline</literal>, type:
   <link linkend="xsidfirstline"><literal>firstline</literal></link></para><para role="xsdoc">Defines Regular Expression, used to identify programming language by its starting content. First line could be used, or some small part of text. This entry has less default weight against filename one.</para><para role="xsdochead">Attribute:
   <literal>weight</literal>, type:
     <ulink url="http://www.w3.org/TR/xmlschema-2#decimal"><literal>xs:decimal</literal></ulink>, default:
     <literal>1</literal></para><para role="xsdoc">This attribute defines weight, added to the total language weight, when choosing one from a list of available.</para></para>

<para>
If any of these two operators is used more than one time, each its matched
instance adds specified weight to the total language weight.

</para>
</section>

<section id="core.filetypes.type"><title>Types</title>
<para>
Each prototype defines its linkage with real file type, describing
information, specific for the syntax parsing process. This information
is stored in basic units, called <literal>type</literal>s.

</para>

<anchor xmlns:xs="http://www.w3.org/2001/XMLSchema" id="typetype"/><para xmlns:xs="http://www.w3.org/2001/XMLSchema" role="xsdocwrap"><para role="xsdocdecl">Element Name:
   <literal>type</literal>, type:
   <link linkend="xsidtype"><literal>type</literal></link></para><para role="xsdoc">Language container, used to store all parser specific information. These defines are used by parser to analyze and colorize target text data.</para><para role="xsdochead">Attribute:
   <literal>name</literal>, type:
     <ulink url="http://www.w3.org/TR/xmlschema-2#NCName"><literal>xs:NCName</literal></ulink></para><para role="xsdoc">HRC Language type name.</para><para role="xsdochead">Attribute:
   <literal>access</literal>, type:
     <link linkend="xsidaccess"><literal>access</literal></link>, default:
     <literal>private</literal></para><para role="xsdoc">Deprecated???</para><para role="xsdocdecl">Content:</para><para role="xsdochead">Element:
   <literal>annotation</literal>, type:
    <link linkend="typeannotation"><literal>annotation</literal></link></para><para role="xsdoc">Defines formal documentation for HRC language elements.</para><para role="xsdochead">Element:
   <literal>import</literal>, type:
    <link linkend="typeimport"><literal>import</literal></link></para><para role="xsdoc">Import statement.</para><para role="xsdochead">Element:
   <literal>region</literal>, type:
    <link linkend="typeregion"><literal>region</literal></link></para><para role="xsdoc">Definition of basic syntax region - text range with assigned syntax meaning.</para><para role="xsdochead">Element:
   <literal>entity</literal>, type:
    <link linkend="typeentity"><literal>entity</literal></link></para><para role="xsdoc">HRC Entity definition.</para><para role="xsdochead">Element:
   <literal>scheme</literal>, type:
    <link linkend="typescheme"><literal>scheme</literal></link></para><para role="xsdoc">HRC Scheme is basic unit, which represents some fixed set of lexemes, tokens and syntax regions (lexical context).</para></para>



<anchor xmlns:xs="http://www.w3.org/2001/XMLSchema" id="typeregion"/><para xmlns:xs="http://www.w3.org/2001/XMLSchema" role="xsdocwrap"><para role="xsdocdecl">Element Name:
   <literal>region</literal>, type:
   <link linkend="xsidregion"><literal>region</literal></link></para><para role="xsdoc">Definition of basic syntax region - text range with assigned syntax meaning. Later, these regions could be mapped into required color information and displayed on screen.</para><para role="xsdochead">Attribute:
   <literal>name</literal>, type:
     <ulink url="http://www.w3.org/TR/xmlschema-2#NCName"><literal>xs:NCName</literal></ulink></para><para role="xsdoc">HRC Region name.</para><para role="xsdochead">Attribute:
   <literal>parent</literal>, type:
     <link linkend="xsidQName"><literal>QName</literal></link></para><para role="xsdoc">Region's parent reference. If region has parent, its properties could be inherited from this one. Also region inheritance creates tree structure of HRC Regions.</para><para role="xsdochead">Attribute:
   <literal>description</literal>, type:
     <ulink url="http://www.w3.org/TR/xmlschema-2#string"><literal>xs:string</literal></ulink></para><para role="xsdoc">Optional description, used to represent region's purpose and to show it to user in convient and friendly way.</para></para>

<anchor xmlns:xs="http://www.w3.org/2001/XMLSchema" id="typeentity"/><para xmlns:xs="http://www.w3.org/2001/XMLSchema" role="xsdocwrap"><para role="xsdocdecl">Element Name:
   <literal>entity</literal>, type:
   <link linkend="xsidentity"><literal>entity</literal></link></para><para role="xsdoc">HRC Entity definition. Entities are some form of macro-definitions, they lately could be used in regular expressions syntax to make them more simple. Each entity consists of Entity name and Entity content, which would be substituted into regular expression, when parser finds entity reference. Each entity could be referenced with %entityname; syntax.</para><para role="xsdochead">Attribute:
   <literal>name</literal>, type:
     <ulink url="http://www.w3.org/TR/xmlschema-2#NCName"><literal>xs:NCName</literal></ulink></para><para role="xsdoc">HRC Entity name.</para><para role="xsdochead">Attribute:
   <literal>value</literal>, type:
     <ulink url="http://www.w3.org/TR/xmlschema-2#string"><literal>xs:string</literal></ulink></para><para role="xsdoc">HRC Entity value, used to substitute entity in RE string.</para></para>

</section>

</section>

<section id="core.schemas"><title>Schemas</title>

<anchor xmlns:xs="http://www.w3.org/2001/XMLSchema" id="typescheme"/><para xmlns:xs="http://www.w3.org/2001/XMLSchema" role="xsdocwrap"><para role="xsdocdecl">Element Name:
   <literal>scheme</literal>, type:
   <link linkend="xsidscheme"><literal>scheme</literal></link></para><para role="xsdoc">HRC Scheme is basic unit, which represents some fixed set of lexemes, tokens and syntax regions (lexical context). Each time at any position in the text only one schema is active. And its content is applied to the current text position. When starting text parse process, scheme with name, equals to its type name is used.</para><para role="xsdochead">Attribute:
   <literal>name</literal>, type:
     <ulink url="http://www.w3.org/TR/xmlschema-2#NCName"><literal>xs:NCName</literal></ulink></para><para role="xsdoc">HRC Scheme name.</para><para role="xsdochead">Attribute:
   <literal>access</literal>, type:
     <link linkend="xsidaccess"><literal>access</literal></link>, default:
     <literal>private</literal></para><para role="xsdoc">Deprecated???</para><para role="xsdocdecl">Content:</para><para role="xsdochead">Element:
   <literal>annotation</literal>, type:
    <link linkend="typeannotation"><literal>annotation</literal></link></para><para role="xsdoc">Defines formal documentation for HRC language elements.</para><para role="xsdochead">Element:
   <literal>regexp</literal>, type:
    <link linkend="typeregexp"><literal>regexp</literal></link></para><para role="xsdoc">Regular Expression token.</para><para role="xsdochead">Element:
   <literal>block</literal>, type:
    <link linkend="typeblock"><literal>block</literal></link></para><para role="xsdoc">Context switch operator.</para><para role="xsdochead">Element:
   <literal>keywords</literal>, type:
    <link linkend="typekeywords"><literal>keywords</literal></link></para><para role="xsdoc">List of tokens with equal properties.</para><para role="xsdochead">Element:
   <literal>inherit</literal>, type:
    <link linkend="typeinherit"><literal>inherit</literal></link></para><para role="xsdoc">Scheme inheritance construction.</para></para>

</section>

<section id="core.namespaces"><title>Namespaces</title>
<para>xxxxxx</para>
</section>

</section>

<section id="schemesyntax"><title>Scheme syntax</title>


<section id="schemesyntax.keywords"><title>Keyword lists</title>
<anchor xmlns:xs="http://www.w3.org/2001/XMLSchema" id="typekeywords"/><para xmlns:xs="http://www.w3.org/2001/XMLSchema" role="xsdocwrap"><para role="xsdocdecl">Element Name:
   <literal>keywords</literal>, type:
   <link linkend="xsidkeywords"><literal>keywords</literal></link></para><para role="xsdoc">List of tokens with equal properties. Keywords, symbols and so on... These lists are used to make processing of many tokens faster, when it isn't required to use RE to define syntax tokens.</para><para role="xsdochead">Attribute:
   <literal>ignorecase</literal>, default:
     <literal>yes</literal></para><para role="xsdoc">Match this list of tokens with case sensitive or no.</para><para role="xsdochead">Attribute:
   <literal>region</literal>, type:
     <link linkend="xsidQName"><literal>QName</literal></link></para><para role="xsdoc">Region, assigned to this list of tokens. Each token can define its custom region.</para><para role="xsdochead">Attribute:
   <literal>priority</literal>, type:
     <link linkend="xsidpriority"><literal>priority</literal></link>, default:
     <literal>low</literal></para><para role="xsdoc">Priority of any token could be normal (default) and low.</para><para role="xsdochead">Attribute:
   <literal>worddiv</literal>, type:
     <link linkend="xsidREworddiv"><literal>REworddiv</literal></link></para><para role="xsdoc">Class of characters, used to search words edges.</para><para role="xsdocdecl">Content:</para><para role="xsdochead">Element:
   <literal>word</literal>, type:
    <link linkend="typeword"><literal>word</literal></link></para><para role="xsdoc">Keyword tokens - use specified word edges.</para><para role="xsdochead">Element:
   <literal>symb</literal>, type:
    <link linkend="typesymb"><literal>symb</literal></link></para><para role="xsdoc">Symbol tokens - ignores specified word edges.</para></para>
<anchor xmlns:xs="http://www.w3.org/2001/XMLSchema" id="typeword"/><para xmlns:xs="http://www.w3.org/2001/XMLSchema" role="xsdocwrap"><para role="xsdocdecl">Element Name:
   <literal>word</literal>, type:
   <link linkend="xsidword"><literal>word</literal></link></para><para role="xsdoc">Keyword tokens - use specified word edges.</para><para role="xsdochead">Attribute:
   <literal>name</literal>, type:
     <ulink url="http://www.w3.org/TR/xmlschema-2#string"><literal>xs:string</literal></ulink></para><para role="xsdoc"/><para role="xsdochead">Attribute:
   <literal>region</literal>, type:
     <link linkend="xsidQName"><literal>QName</literal></link></para><para role="xsdoc">A pair of type name and valid XML name.</para></para>
<anchor xmlns:xs="http://www.w3.org/2001/XMLSchema" id="typesymb"/><para xmlns:xs="http://www.w3.org/2001/XMLSchema" role="xsdocwrap"><para role="xsdocdecl">Element Name:
   <literal>symb</literal>, type:
   <link linkend="xsidsymb"><literal>symb</literal></link></para><para role="xsdoc">Symbol tokens - ignores specified word edges.</para><para role="xsdochead">Attribute:
   <literal>name</literal>, type:
     <ulink url="http://www.w3.org/TR/xmlschema-2#string"><literal>xs:string</literal></ulink></para><para role="xsdoc"/><para role="xsdochead">Attribute:
   <literal>region</literal>, type:
     <link linkend="xsidQName"><literal>QName</literal></link></para><para role="xsdoc">A pair of type name and valid XML name.</para></para>
<para>
</para>
</section>
<section id="schemesyntax.re"><title>Regular Expressions</title>
<anchor xmlns:xs="http://www.w3.org/2001/XMLSchema" id="typeregexp"/><para xmlns:xs="http://www.w3.org/2001/XMLSchema" role="xsdocwrap"><para role="xsdocdecl">Element Name:
   <literal>regexp</literal>, type:
   <link linkend="xsidregexp"><literal>regexp</literal></link></para><para role="xsdoc">Regular Expression token.</para><para role="xsdochead">Attribute:
   <literal>match</literal>, type:
     <link linkend="xsidREstring"><literal>REstring</literal></link></para><para role="xsdoc">RE syntax</para><para role="xsdochead">Attribute:
   <literal>priority</literal>, type:
     <link linkend="xsidpriority"><literal>priority</literal></link>, default:
     <literal>normal</literal></para><para role="xsdoc">Priority of any token could be normal (default) and low.</para></para>
<para>
</para>
</section>
<section id="schemesyntax.contextswitch"><title>Blocked context switch</title>
<anchor xmlns:xs="http://www.w3.org/2001/XMLSchema" id="typeblock"/><para xmlns:xs="http://www.w3.org/2001/XMLSchema" role="xsdocwrap"><para role="xsdocdecl">Element Name:
   <literal>block</literal>, type:
   <link linkend="xsidblock"><literal>block</literal></link></para><para role="xsdoc">Context switch operator. Used to switch currently used context into the specified one. Context is switched, if RE pattern, placed in 'start' attribute, is matches. Switched context is closed, then parser finds match of the 'end' RE.</para><para role="xsdochead">Attribute:
   <literal>start</literal>, type:
     <link linkend="xsidREstring"><literal>REstring</literal></link></para><para role="xsdoc">Regular Expression</para><para role="xsdochead">Attribute:
   <literal>end</literal>, type:
     <link linkend="xsidREstring"><literal>REstring</literal></link></para><para role="xsdoc">Regular Expression</para><para role="xsdochead">Attribute:
   <literal>scheme</literal>, type:
     <link linkend="xsidQName"><literal>QName</literal></link></para><para role="xsdoc">A pair of type name and valid XML name.</para><para role="xsdochead">Attribute:
   <literal>priority</literal>, type:
     <link linkend="xsidpriority"><literal>priority</literal></link>, default:
     <literal>normal</literal></para><para role="xsdoc">Priority of any token could be normal (default) and low.</para><para role="xsdochead">Attribute:
   <literal>content-priority</literal>, type:
     <link linkend="xsidpriority"><literal>priority</literal></link>, default:
     <literal>normal</literal></para><para role="xsdoc">Priority of any token could be normal (default) and low.</para><para role="xsdochead">Attribute:
   <literal>region</literal>, type:
     <link linkend="xsidQName"><literal>QName</literal></link></para><para role="xsdoc">A pair of type name and valid XML name.</para><para role="xsdochead">Attribute:
   <literal>region00</literal>, type:
     <link linkend="xsidQName"><literal>QName</literal></link></para><para role="xsdoc">A pair of type name and valid XML name.</para><para role="xsdochead">Attribute:
   <literal>region01</literal>, type:
     <link linkend="xsidQName"><literal>QName</literal></link></para><para role="xsdoc">A pair of type name and valid XML name.</para><para role="xsdochead">Attribute:
   <literal>region02</literal>, type:
     <link linkend="xsidQName"><literal>QName</literal></link></para><para role="xsdoc">A pair of type name and valid XML name.</para><para role="xsdochead">Attribute:
   <literal>region03</literal>, type:
     <link linkend="xsidQName"><literal>QName</literal></link></para><para role="xsdoc">A pair of type name and valid XML name.</para><para role="xsdochead">Attribute:
   <literal>region04</literal>, type:
     <link linkend="xsidQName"><literal>QName</literal></link></para><para role="xsdoc">A pair of type name and valid XML name.</para><para role="xsdochead">Attribute:
   <literal>region05</literal>, type:
     <link linkend="xsidQName"><literal>QName</literal></link></para><para role="xsdoc">A pair of type name and valid XML name.</para><para role="xsdochead">Attribute:
   <literal>region06</literal>, type:
     <link linkend="xsidQName"><literal>QName</literal></link></para><para role="xsdoc">A pair of type name and valid XML name.</para><para role="xsdochead">Attribute:
   <literal>region07</literal>, type:
     <link linkend="xsidQName"><literal>QName</literal></link></para><para role="xsdoc">A pair of type name and valid XML name.</para><para role="xsdochead">Attribute:
   <literal>region08</literal>, type:
     <link linkend="xsidQName"><literal>QName</literal></link></para><para role="xsdoc">A pair of type name and valid XML name.</para><para role="xsdochead">Attribute:
   <literal>region09</literal>, type:
     <link linkend="xsidQName"><literal>QName</literal></link></para><para role="xsdoc">A pair of type name and valid XML name.</para><para role="xsdochead">Attribute:
   <literal>region0a</literal>, type:
     <link linkend="xsidQName"><literal>QName</literal></link></para><para role="xsdoc">A pair of type name and valid XML name.</para><para role="xsdochead">Attribute:
   <literal>region0b</literal>, type:
     <link linkend="xsidQName"><literal>QName</literal></link></para><para role="xsdoc">A pair of type name and valid XML name.</para><para role="xsdochead">Attribute:
   <literal>region0c</literal>, type:
     <link linkend="xsidQName"><literal>QName</literal></link></para><para role="xsdoc">A pair of type name and valid XML name.</para><para role="xsdochead">Attribute:
   <literal>region0d</literal>, type:
     <link linkend="xsidQName"><literal>QName</literal></link></para><para role="xsdoc">A pair of type name and valid XML name.</para><para role="xsdochead">Attribute:
   <literal>region0e</literal>, type:
     <link linkend="xsidQName"><literal>QName</literal></link></para><para role="xsdoc">A pair of type name and valid XML name.</para><para role="xsdochead">Attribute:
   <literal>region0f</literal>, type:
     <link linkend="xsidQName"><literal>QName</literal></link></para><para role="xsdoc">A pair of type name and valid XML name.</para><para role="xsdochead">Attribute:
   <literal>region10</literal>, type:
     <link linkend="xsidQName"><literal>QName</literal></link></para><para role="xsdoc">A pair of type name and valid XML name.</para><para role="xsdochead">Attribute:
   <literal>region11</literal>, type:
     <link linkend="xsidQName"><literal>QName</literal></link></para><para role="xsdoc">A pair of type name and valid XML name.</para><para role="xsdochead">Attribute:
   <literal>region12</literal>, type:
     <link linkend="xsidQName"><literal>QName</literal></link></para><para role="xsdoc">A pair of type name and valid XML name.</para><para role="xsdochead">Attribute:
   <literal>region13</literal>, type:
     <link linkend="xsidQName"><literal>QName</literal></link></para><para role="xsdoc">A pair of type name and valid XML name.</para><para role="xsdochead">Attribute:
   <literal>region14</literal>, type:
     <link linkend="xsidQName"><literal>QName</literal></link></para><para role="xsdoc">A pair of type name and valid XML name.</para><para role="xsdochead">Attribute:
   <literal>region15</literal>, type:
     <link linkend="xsidQName"><literal>QName</literal></link></para><para role="xsdoc">A pair of type name and valid XML name.</para><para role="xsdochead">Attribute:
   <literal>region16</literal>, type:
     <link linkend="xsidQName"><literal>QName</literal></link></para><para role="xsdoc">A pair of type name and valid XML name.</para><para role="xsdochead">Attribute:
   <literal>region17</literal>, type:
     <link linkend="xsidQName"><literal>QName</literal></link></para><para role="xsdoc">A pair of type name and valid XML name.</para><para role="xsdochead">Attribute:
   <literal>region18</literal>, type:
     <link linkend="xsidQName"><literal>QName</literal></link></para><para role="xsdoc">A pair of type name and valid XML name.</para><para role="xsdochead">Attribute:
   <literal>region19</literal>, type:
     <link linkend="xsidQName"><literal>QName</literal></link></para><para role="xsdoc">A pair of type name and valid XML name.</para><para role="xsdochead">Attribute:
   <literal>region1a</literal>, type:
     <link linkend="xsidQName"><literal>QName</literal></link></para><para role="xsdoc">A pair of type name and valid XML name.</para><para role="xsdochead">Attribute:
   <literal>region1b</literal>, type:
     <link linkend="xsidQName"><literal>QName</literal></link></para><para role="xsdoc">A pair of type name and valid XML name.</para><para role="xsdochead">Attribute:
   <literal>region1c</literal>, type:
     <link linkend="xsidQName"><literal>QName</literal></link></para><para role="xsdoc">A pair of type name and valid XML name.</para><para role="xsdochead">Attribute:
   <literal>region1d</literal>, type:
     <link linkend="xsidQName"><literal>QName</literal></link></para><para role="xsdoc">A pair of type name and valid XML name.</para><para role="xsdochead">Attribute:
   <literal>region1e</literal>, type:
     <link linkend="xsidQName"><literal>QName</literal></link></para><para role="xsdoc">A pair of type name and valid XML name.</para><para role="xsdochead">Attribute:
   <literal>region1f</literal>, type:
     <link linkend="xsidQName"><literal>QName</literal></link></para><para role="xsdoc">A pair of type name and valid XML name.</para><para role="xsdocdecl">Content:</para><para role="xsdochead">Element:
   <literal>start</literal>, type:
    <link linkend="typeblockInner"><literal>blockInner</literal></link></para><para role="xsdoc">Alternative style of RE definition.</para><para role="xsdochead">Element:
   <literal>end</literal>, type:
    <link linkend="typeblockInner"><literal>blockInner</literal></link></para><para role="xsdoc">Alternative style of RE definition.</para></para>

<anchor xmlns:xs="http://www.w3.org/2001/XMLSchema" id="typeblockInner"/><para xmlns:xs="http://www.w3.org/2001/XMLSchema" role="xsdocwrap"><para role="xsdocdecl">Element Name:
   <literal>blockInner</literal>, type:
   <link linkend="xsidblockInner"><literal>blockInner</literal></link></para><para role="xsdoc">Alternative style of RE definition. Could be used, when RE is very complex and it is easier to use character (or CDATA) sections to define it.</para></para>

<para>
</para>
</section>

<section id="schemesyntax.boundaries"><title>Scheme boundaries and priority</title>
<para>
</para>
</section>

</section>

<section id="interscheme"><title>Inter-scheme links</title>

<section id="interscheme.inheritance"><title>Inheritance</title>

<anchor xmlns:xs="http://www.w3.org/2001/XMLSchema" id="typeinherit"/><para xmlns:xs="http://www.w3.org/2001/XMLSchema" role="xsdocwrap"><para role="xsdocdecl">Element Name:
   <literal>inherit</literal>, type:
   <link linkend="xsidinherit"><literal>inherit</literal></link></para><para role="xsdoc">Scheme inheritance construction. If one scheme is inherited in another, then the latter scheme takes all the definitions from the former, as it was included directly in place of inherit operator. One scheme can't inherit another, if that scheme is already makes inheritance (even indirect) of the first one.</para><para role="xsdochead">Attribute:
   <literal>scheme</literal>, type:
     <link linkend="xsidQName"><literal>QName</literal></link></para><para role="xsdoc">Inherited scheme name.</para><para role="xsdocdecl">Content:</para><para role="xsdochead">Element:
   <literal>virtual</literal>, type:
    <link linkend="typevirtual"><literal>virtual</literal></link></para><para role="xsdoc">Inheritance substitution element.</para></para>

<anchor xmlns:xs="http://www.w3.org/2001/XMLSchema" id="typevirtual"/><para xmlns:xs="http://www.w3.org/2001/XMLSchema" role="xsdocwrap"><para role="xsdocdecl">Element Name:
   <literal>virtual</literal>, type:
   <link linkend="xsidvirtual"><literal>virtual</literal></link></para><para role="xsdoc">Inheritance substitution element. While inheriting one scheme in another, it is possible to redefine inner inherited schemes with some others. This could be used to change inherited language behavior.</para><para role="xsdochead">Attribute:
   <literal>scheme</literal>, type:
     <link linkend="xsidQName"><literal>QName</literal></link></para><para role="xsdoc">Redefined scheme.</para><para role="xsdochead">Attribute:
   <literal>subst-scheme</literal>, type:
     <link linkend="xsidQName"><literal>QName</literal></link></para><para role="xsdoc">Scheme to use instead redefined one.</para></para>

<para>
</para>
</section>

<section id="interscheme.substitution"><title>Schemes substitutions</title>
<para/>
</section>
</section>



<appendix id="hrcre">
<title>Regular Expressions syntax</title>

<section id="hrcre.intro"><title>Introduction</title>
<para>
All work of the Colorer library and HRC language is based on the regular expressions (RE) usage.
They allows you to create universal syntax rules of highlighting in HRC.
</para>

<para>
Regular expressions consist of the set of characters.
Some of these are simple, and some are special metacharacters.
All metacharacters (escapes) are divided into three categories: first - zerolength (words boundaries and so on);
second - class metacharacters (<literal>\w</literal>, <literal>\s</literal> <literal>.</literal>);
and the third class is operators.
RE operators could be applied to single character,
to block, enwrapped in brackets or into other operators.
You can use brackets to group any sequence of characters.
Regular expressions in HRC Language are like Perl regexp in their base syntax.
There are some differences in extended operators.
</para>
</section>

<section id="hrcre.syntax"><title>Syntax</title>
<para>
All regexps must be in slashes <literal>/.../</literal>
After the end slash there could be parameters:

<itemizedlist>
<listitem><simpara><literal>i</literal> - ignore symbol case</simpara></listitem>
<listitem><simpara><literal>x</literal> - ignore direct spaces and crlf (for comfort)</simpara></listitem>
<listitem><simpara><literal>s</literal> - suppose, that regexp is single line - it means, than '.' class should include \r\n symbols. </simpara></listitem>
</itemizedlist>
Each symbol in RE is linearly compared with the target string.
Everything, that doesn't looks like metacharacters, means simple character.
</para>
</section>

<section id="hrcre.meta"><title>Metacharacters</title>

<table><title>Metacharacters</title><tgroup cols="2"><tbody>
<row><entry><literal>^</literal></entry><entry>Match the beginning of the line</entry></row>
<row><entry><literal>$</literal></entry><entry>Match the end of the line</entry></row>
<row><entry><literal>.</literal></entry><entry>Match any character (except \r\n)</entry></row>
<row><entry><literal>[...]</literal></entry><entry>Match characters in set</entry></row>
<row><entry><literal>[^...]</literal></entry><entry>Match characters not in set.
          Here all the operators are disabled, but you can
          use other metacharacters,  and  range  operator:
          a-z means all chars from first to second (a - z)</entry></row>
<row><entry><literal>\#</literal></entry><entry>Next symbol '#' after slash (except a-z and 1-9)</entry></row>
<row><entry><literal>\b</literal></entry><entry>Start of word</entry></row>
<row><entry><literal>\B</literal></entry><entry>End of word</entry></row>
<row><entry><literal>\xNN</literal></entry><entry><literal>NN</literal> - ASCII char (hex)</entry></row>
<row><entry><literal>\n</literal></entry><entry>0x10 (lf)</entry></row>
<row><entry><literal>\r</literal></entry><entry>0x13 (cr)</entry></row>
<row><entry><literal>\t</literal></entry><entry>0x09 (tab)</entry></row>
<row><entry><literal>\s</literal></entry><entry>tab/space/cr/lf</entry></row>
<row><entry><literal>\S</literal></entry><entry>Non-space</entry></row>
<row><entry><literal>\w</literal></entry><entry>Word symbol (chars, digits, _)</entry></row>
<row><entry><literal>\W</literal></entry><entry>Non-word symbol</entry></row>
<row><entry><literal>\d</literal></entry><entry>Digit</entry></row>
<row><entry><literal>\D</literal></entry><entry>Non-Digit</entry></row>
<row><entry><literal>\u</literal></entry><entry>Uppercase symbol</entry></row>
<row><entry><literal>\l</literal></entry><entry>Lowercase symbol</entry></row>
</tbody></tgroup></table>
</section>

<section id="hrcre.exmeta"><title>Extended metacharacter</title>
<para>These metacharacters are incompatible with Perl</para>
<table><title>Extended Metacharacters</title><tgroup cols="2"><tbody>
<row><entry><literal>\c</literal></entry><entry>means 'non-word before'</entry></row>
<row><entry><literal>\N</literal></entry><entry>Link inside of regexp to one of its brackets.
          <literal>N</literal>  - needed brackets pair.  This operator  works
          only with non-operator symbols in a bracket.
</entry></row>
</tbody></tgroup></table>

<para>And these could be disabled during compilaton as highlight-dependent</para>
<table><title>Extended Metacharacters</title><tgroup cols="2"><tbody>
<row><entry><literal>~</literal></entry><entry>Matches for the start of parent scheme (end of start start).</entry></row>
<row><entry><literal>\m</literal></entry><entry>Change start of regexp</entry></row>
<row><entry><literal>\M</literal></entry><entry>Change end of regexp</entry></row>
<row><entry><literal>\yN</literal></entry><entry>Link  to  the   external  regexp (in End  to the Start param). N - requeried brackets pair.</entry></row>
</tbody></tgroup></table>

</section>


<section id="hrcre.ops"><title>Operators</title>
<para>
Operators couldn't be used without some preceding character sequence.
Each operator must be applied to the appropriate character,
metacharacter, or block of their combination (enclosed with brackets).
</para>

<table><title>Operators</title><tgroup cols="2"><tbody>
<row><entry><literal>( )</literal></entry><entry>Group and remember characters to form one pattern.</entry></row>
<row><entry><literal>|</literal></entry><entry>Match previous or next pattern.</entry></row>
<row><entry><literal>*</literal></entry><entry>Match previous pattern 0 or more times.</entry></row>
<row><entry><literal>+</literal></entry><entry>Match previous pattern 1 or more times.</entry></row>
<row><entry><literal>?</literal></entry><entry>Match previous pattern 0 or 1 times.</entry></row>
<row><entry><literal>{n}</literal></entry><entry>Repeat n times.</entry></row>
<row><entry><literal>{n,}</literal></entry><entry>Repeat n or more times.</entry></row>
<row><entry><literal>{n,m}</literal></entry><entry>Repeat from n to m times.</entry></row>
</tbody></tgroup></table>

<para>
If you'll add <literal>?</literal> after operator, it becomes nongreedy.
For example <literal>*</literal> operator becomes nongreedy if placing <literal>*?</literal>
Greedy operator tries to take as much in string, as it can.
Nongreedy takes by minimum.
</para>
</section>


<section id="hrcre.exops"><title>Extended operators</title>
<table><title>Extended Operators</title><tgroup cols="2"><tbody>
<row><entry><literal>?#N</literal></entry><entry>Look-behind. N - symbol count.</entry></row>
<row><entry><literal>?~N</literal></entry><entry>Inverted Look-behind.</entry></row>
<row><entry><literal>?=</literal></entry><entry>Look-ahead.</entry></row>
<row><entry><literal>?!</literal></entry><entry>Inverted Look-ahead.</entry></row>
</tbody></tgroup></table>
<para>
Note, that two last operators exist in Perl - in form of <literal>(?=foobar)</literal>.
But colorer uses syntax <literal>(foobar)?=</literal>
</para>
</section>

<section id="hrcre.examples"><title>Examples</title>
<example><title>RE examples</title>
<para>

<variablelist>
<varlistentry>
<term><literal>/foobar/</literal></term>
<listitem><para>will match "foobar", "foobar barfoo"</para></listitem>
</varlistentry>

<varlistentry>
<term><literal>/ FOO bar /ix</literal></term>
<listitem><para>will match "foobar" "FOOBAR" "foobar and two other foos"</para></listitem>
</varlistentry>

<varlistentry>
<term><literal>/(foo)?bar/</literal></term>
<listitem><para>will match "foobar", "bar"</para></listitem>
</varlistentry>

<varlistentry>
<term><literal>/^foobar$/</literal></term>
<listitem><para>will match _only_ with "foobar"</para></listitem>
</varlistentry>

<varlistentry>
<term><literal>/([\d\.])+/</literal></term>
<listitem><para>will match any number</para></listitem>
</varlistentry>

<varlistentry>
<term><literal>/(foo|bar)+/</literal></term>
<listitem><para>will match "foofoofoobarfoobar", "bar"</para></listitem>
</varlistentry>

<varlistentry>
<term><literal>/f[obar]+r/</literal></term>
<listitem><para>will match "foobar", "for", "far"</para></listitem>
</varlistentry>
</variablelist>

</para>
</example>
</section>

</appendix>





<appendix id="coding_rec">
<title>HRC Coding Recommendations</title>
<para>
Пока хочу сказать, что нужно править всю базу на предмет
появившихся пространств имен. Так как раньше ничего этого не было,
каждая схема именовалась со своим префиксом.
И теперь это все надо убирать нафиг.
Иными словами, в описании каждого типа файлов
схемы нужно переименовывать, убирать префиксы и называть их нормальными
именами.
То же самое относится к использованию сущностей и определений регионов.
</para>
<para>
По возможности не надо использовать функции импорта других типов,
потому как это уменьшает читабельность.
Исключением может быть только тип <type>def</type>, и случаи,
когда очень много ссылок на объекты других типов.
Намного понятней выглядит <literal>scheme='c:StringCore'</literal>
чем просто <literal>scheme='StringCore'</literal>.
</para>
<warning><title>changes:</title>
<para>
Возможно, <literal>&lt;import&gt;</literal> я вообще уберу.
</para>
</warning>

</appendix>

<appendix id="catalog.xml">
<title>Format of <literal>catalog.xml</literal> file</title>
<para>

Catalog of all Colorer Library resources is a convenient way to
unify creation and management of all the Colorer features.

This catalog is stored in <literal>catalog.xml</literal> file,
and mapped into the ParserFactory class.

Catalog supports storing of all installed HRC modules, management
of error logging and listing of available HRD sets.

</para>
<anchor xmlns:xs="http://www.w3.org/2001/XMLSchema" id="typecatalog"/><para xmlns:xs="http://www.w3.org/2001/XMLSchema" role="xsdocwrap"><para role="xsdocdecl">Element Name:
   <literal>catalog</literal>, type:
   <link linkend="xsidcatalog"><literal>catalog</literal></link></para><para role="xsdoc">Describes all available Colorer Library resources.</para><para role="xsdocdecl">Content:</para><para role="xsdochead">Element:
   <literal>hrc-sets</literal>, type:
    <link linkend="typehrc-sets"><literal>hrc-sets</literal></link></para><para role="xsdoc">Lists all installed root locations of HRC codes.</para><para role="xsdochead">Element:
   <literal>hrd-sets</literal>, type:
    <link linkend="typehrd-sets"><literal>hrd-sets</literal></link></para><para role="xsdoc">Lists all available HRD sets.</para></para>

<anchor xmlns:xs="http://www.w3.org/2001/XMLSchema" id="typehrc-sets"/><para xmlns:xs="http://www.w3.org/2001/XMLSchema" role="xsdocwrap"><para role="xsdocdecl">Element Name:
   <literal>hrc-sets</literal>, type:
   <link linkend="xsidhrc-sets"><literal>hrc-sets</literal></link></para><para role="xsdoc">Lists all installed root locations of HRC codes. These locations are loaded when HRC bases are created.</para><para role="xsdochead">Attribute:
   <literal>log-location</literal>, type:
     <ulink url="http://www.w3.org/TR/xmlschema-2#string"><literal>xs:string</literal></ulink></para><para role="xsdoc">Path to the default library log file. If missed, there is no logging.</para><para role="xsdocdecl">Content:</para><para role="xsdochead">Element:
   <literal>location</literal>, type:
    <link linkend="typelocation"><literal>location</literal></link></para><para role="xsdoc">Single resource location.</para></para>
<anchor xmlns:xs="http://www.w3.org/2001/XMLSchema" id="typehrd-sets"/><para xmlns:xs="http://www.w3.org/2001/XMLSchema" role="xsdocwrap"><para role="xsdocdecl">Element Name:
   <literal>hrd-sets</literal>, type:
   <link linkend="xsidhrd-sets"><literal>hrd-sets</literal></link></para><para role="xsdoc">Lists all available HRD sets. Each HRD Entry describes single color scheme, used to represent colored text. Note, that one Entry</para><para role="xsdocdecl">Content:</para><para role="xsdochead">Element:
   <literal>hrd</literal>, type:
    <link linkend="typehrd-entry"><literal>hrd-entry</literal></link></para><para role="xsdoc">Describes one HRD properties set.</para></para>
<anchor xmlns:xs="http://www.w3.org/2001/XMLSchema" id="typehrd-entry"/><para xmlns:xs="http://www.w3.org/2001/XMLSchema" role="xsdocwrap"><para role="xsdocdecl">Element Name:
   <literal>hrd-entry</literal>, type:
   <link linkend="xsidhrd-entry"><literal>hrd-entry</literal></link></para><para role="xsdoc">Describes one HRD properties set.</para><para role="xsdochead">Attribute:
   <literal>class</literal>, type:
     <ulink url="http://www.w3.org/TR/xmlschema-2#NMTOKEN"><literal>xs:NMTOKEN</literal></ulink></para><para role="xsdoc">HRD class. Currently available 'console', 'rgb' and 'text' classes.</para><para role="xsdochead">Attribute:
   <literal>name</literal>, type:
     <ulink url="http://www.w3.org/TR/xmlschema-2#NMTOKEN"><literal>xs:NMTOKEN</literal></ulink></para><para role="xsdoc">Internal name of this set, used to referring from executable codes.</para><para role="xsdochead">Attribute:
   <literal>description</literal>, type:
     <ulink url="http://www.w3.org/TR/xmlschema-2#string"><literal>xs:string</literal></ulink></para><para role="xsdoc">User-friendly description of this HRD set.</para><para role="xsdocdecl">Content:</para><para role="xsdochead">Element:
   <literal>location</literal>, type:
    <link linkend="typelocation"><literal>location</literal></link></para><para role="xsdoc">Single resource location.</para></para>
<anchor xmlns:xs="http://www.w3.org/2001/XMLSchema" id="typelocation"/><para xmlns:xs="http://www.w3.org/2001/XMLSchema" role="xsdocwrap"><para role="xsdocdecl">Element Name:
   <literal>location</literal>, type:
   <link linkend="xsidlocation"><literal>location</literal></link></para><para role="xsdoc">Single resource location. Path can be relative to the catalog location, or absolute URI with or without URI schema specification.</para><para role="xsdochead">Attribute:
   <literal>link</literal>, type:
     <ulink url="http://www.w3.org/TR/xmlschema-2#string"><literal>xs:string</literal></ulink></para><para role="xsdoc"/></para>

<programlisting xmlns:xs="http://www.w3.org/2001/XMLSchema">&lt;<literal role="xs_elem">schema</literal> <literal role="xs_attr">targetNamespace</literal>="<literal role="xs_attrval">http://colorer.sf.net/2003/catalog</literal>" <literal role="xs_attr">elementFormDefault</literal>="<literal role="xs_attrval">qualified</literal>"
  xmlns="http://www.w3.org/2001/XMLSchema"
  xmlns:xs="http://www.w3.org/2001/XMLSchema"&gt;

  &lt;<literal role="xs_elem">element</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">catalog</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">catalog</literal>"/&gt;

<anchor id="xsidcatalog"/>  &lt;<literal role="xs_elem">complexType</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval"><link linkend="typecatalog">catalog</link></literal>"&gt;
    &lt;<literal role="xs_elem">sequence</literal>&gt;
      &lt;<literal role="xs_elem">element</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">hrc-sets</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">hrc-sets</literal>"/&gt;
      &lt;<literal role="xs_elem">element</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">hrd-sets</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">hrd-sets</literal>"/&gt;
    &lt;/<literal role="xs_elem">sequence</literal>&gt;
  &lt;/<literal role="xs_elem">complexType</literal>&gt;

<anchor id="xsidhrc-sets"/>  &lt;<literal role="xs_elem">complexType</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval"><link linkend="typehrc-sets">hrc-sets</link></literal>"&gt;
    &lt;<literal role="xs_elem">sequence</literal>&gt;
      &lt;<literal role="xs_elem">element</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">location</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">location</literal>" <literal role="xs_attr">maxOccurs</literal>="<literal role="xs_attrval">unbounded</literal>"/&gt;
    &lt;/<literal role="xs_elem">sequence</literal>&gt;
    &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">log-location</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">xs:string</literal>"&gt;
    &lt;/<literal role="xs_elem">attribute</literal>&gt;
  &lt;/<literal role="xs_elem">complexType</literal>&gt;

<anchor id="xsidhrd-sets"/>  &lt;<literal role="xs_elem">complexType</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval"><link linkend="typehrd-sets">hrd-sets</link></literal>"&gt;
    &lt;<literal role="xs_elem">sequence</literal>&gt;
      &lt;<literal role="xs_elem">element</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">hrd</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">hrd-entry</literal>" <literal role="xs_attr">minOccurs</literal>="<literal role="xs_attrval">0</literal>" <literal role="xs_attr">maxOccurs</literal>="<literal role="xs_attrval">unbounded</literal>"/&gt;
    &lt;/<literal role="xs_elem">sequence</literal>&gt;
  &lt;/<literal role="xs_elem">complexType</literal>&gt;

<anchor id="xsidhrd-entry"/>  &lt;<literal role="xs_elem">complexType</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval"><link linkend="typehrd-entry">hrd-entry</link></literal>"&gt;
    &lt;<literal role="xs_elem">sequence</literal>&gt;
      &lt;<literal role="xs_elem">element</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">location</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">location</literal>" <literal role="xs_attr">maxOccurs</literal>="<literal role="xs_attrval">unbounded</literal>"/&gt;
    &lt;/<literal role="xs_elem">sequence</literal>&gt;
    &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">class</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">xs:NMTOKEN</literal>" <literal role="xs_attr">use</literal>="<literal role="xs_attrval">required</literal>"&gt;
    &lt;/<literal role="xs_elem">attribute</literal>&gt;
    &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">name</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">xs:NMTOKEN</literal>" <literal role="xs_attr">use</literal>="<literal role="xs_attrval">required</literal>"&gt;
    &lt;/<literal role="xs_elem">attribute</literal>&gt;
    &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">description</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">xs:string</literal>"&gt;
    &lt;/<literal role="xs_elem">attribute</literal>&gt;
  &lt;/<literal role="xs_elem">complexType</literal>&gt;

<anchor id="xsidlocation"/>  &lt;<literal role="xs_elem">complexType</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval"><link linkend="typelocation">location</link></literal>"&gt;
    &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">link</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">xs:string</literal>" <literal role="xs_attr">use</literal>="<literal role="xs_attrval">required</literal>"/&gt;
  &lt;/<literal role="xs_elem">complexType</literal>&gt;
&lt;/<literal role="xs_elem">schema</literal>&gt;
</programlisting>

<para>
</para>
</appendix>

<appendix id="hrd">
<title>Format of <literal>HRD</literal> color schemes</title>
<para>
<acronym role="Highlighting Resource Descriptions">HRD</acronym>
storage is used to assign each HRC Region with some editor-specific properties.
Commonly, these include color and style information.
HRD file consists of the list of the entries, each of them describing one
HRC Region.

</para>
<anchor xmlns:xs="http://www.w3.org/2001/XMLSchema" id="typehrd"/><para xmlns:xs="http://www.w3.org/2001/XMLSchema" role="xsdocwrap"><para role="xsdocdecl">Element Name:
   <literal>hrd</literal>, type:
   <link linkend="xsidhrd"><literal>hrd</literal></link></para><para role="xsdoc">List of assigns between regions and their external properties. These properties commonly include text decoration parameters, such as color, style, font and so on... Global color layering model can be chosen by the target application, depending on its text presentation style, features and requirements. In general, all transparent colors must inherit color value from its parent schema color. If the current schema is a top-level, default fore- and back-ground colors are used. Default Colors could be stored in HRD, using standard default region 'def:Text', or could be requested by application from the GUI environment.</para><para role="xsdocdecl">Content:</para><para role="xsdochead">Element:
   <literal>assign</literal>, type:
    <link linkend="typeassign"><literal>assign</literal></link></para><para role="xsdoc">Single entry, describes region's properties.</para></para>

<anchor xmlns:xs="http://www.w3.org/2001/XMLSchema" id="typeassign"/><para xmlns:xs="http://www.w3.org/2001/XMLSchema" role="xsdocwrap"><para role="xsdocdecl">Element Name:
   <literal>assign</literal>, type:
   <link linkend="xsidassign"><literal>assign</literal></link></para><para role="xsdoc">Single entry, describes region's properties. If entry is specified more than one time, then used the latest definition. This allows processing of several HRD files to complete color description of target HRC regions.</para><para role="xsdochead">Attribute:
   <literal>name</literal></para><para role="xsdoc">Full qualified region name (a pair [type:name]). Note, that if region has no HRD properties associations, it inherits properties from its parent. If any of its ancestors has no assigned properties, region visualization must be skipped (it becomes fully transparent).</para><para role="xsdochead">Attribute:
   <literal>fore</literal>, type:
     <ulink url="http://www.w3.org/TR/xmlschema-2#token"><literal>xs:token</literal></ulink></para><para role="xsdoc">Foreground color. If missed, transparent color assumed.</para><para role="xsdochead">Attribute:
   <literal>back</literal>, type:
     <ulink url="http://www.w3.org/TR/xmlschema-2#token"><literal>xs:token</literal></ulink></para><para role="xsdoc">Background color. If missed, transparent color assumed.</para><para role="xsdochead">Attribute:
   <literal>style</literal>, type:
     <ulink url="http://www.w3.org/TR/xmlschema-2#token"><literal>xs:token</literal></ulink></para><para role="xsdoc">Style bits (bold, italic, underline).</para><para role="xsdochead">Attribute:
   <literal>stext</literal>, type:
     <ulink url="http://www.w3.org/TR/xmlschema-2#string"><literal>xs:string</literal></ulink></para><para role="xsdoc">Text prefix mapping (foreground).</para><para role="xsdochead">Attribute:
   <literal>etext</literal>, type:
     <ulink url="http://www.w3.org/TR/xmlschema-2#string"><literal>xs:string</literal></ulink></para><para role="xsdoc">Text prefix mapping (background).</para><para role="xsdochead">Attribute:
   <literal>sback</literal>, type:
     <ulink url="http://www.w3.org/TR/xmlschema-2#string"><literal>xs:string</literal></ulink></para><para role="xsdoc">Text Suffix mapping (foreground).</para><para role="xsdochead">Attribute:
   <literal>eback</literal>, type:
     <ulink url="http://www.w3.org/TR/xmlschema-2#string"><literal>xs:string</literal></ulink></para><para role="xsdoc">Text Suffix mapping (background).</para></para>

<para>
It is possible to maintain different HRD settings for different languages,
or to compile them into one single HRD file.
The former allows you to distribute recommended settings with each language,
and the latter - to unify modifying and storing changed HRD settings with provided UI.

</para>
<programlisting xmlns:xs="http://www.w3.org/2001/XMLSchema">&lt;<literal role="xs_elem">schema</literal> <literal role="xs_attr">targetNamespace</literal>="<literal role="xs_attrval">http://colorer.sf.net/2003/hrd</literal>" <literal role="xs_attr">elementFormDefault</literal>="<literal role="xs_attrval">qualified</literal>"
  xmlns="http://www.w3.org/2001/XMLSchema"
  xmlns:xs="http://www.w3.org/2001/XMLSchema"&gt;

  &lt;<literal role="xs_elem">element</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">hrd</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">hrd</literal>"/&gt;

<anchor id="xsidhrd"/>  &lt;<literal role="xs_elem">complexType</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval"><link linkend="typehrd">hrd</link></literal>"&gt;
    &lt;<literal role="xs_elem">sequence</literal> <literal role="xs_attr">minOccurs</literal>="<literal role="xs_attrval">0</literal>" <literal role="xs_attr">maxOccurs</literal>="<literal role="xs_attrval">unbounded</literal>"&gt;
      &lt;<literal role="xs_elem">element</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">assign</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">assign</literal>"/&gt;
    &lt;/<literal role="xs_elem">sequence</literal>&gt;
  &lt;/<literal role="xs_elem">complexType</literal>&gt;

<anchor id="xsidassign"/>  &lt;<literal role="xs_elem">complexType</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval"><link linkend="typeassign">assign</link></literal>"&gt;
    &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">name</literal>" <literal role="xs_attr">use</literal>="<literal role="xs_attrval">required</literal>"&gt;
      &lt;<literal role="xs_elem">simpleType</literal>&gt;
        &lt;<literal role="xs_elem">restriction</literal> <literal role="xs_attr">base</literal>="<literal role="xs_attrval">xs:string</literal>"&gt;
          &lt;<literal role="xs_elem">pattern</literal> <literal role="xs_attr">value</literal>="<literal role="xs_attrval">\i\c*\:\i\c*</literal>"/&gt;
        &lt;/<literal role="xs_elem">restriction</literal>&gt;
      &lt;/<literal role="xs_elem">simpleType</literal>&gt;
    &lt;/<literal role="xs_elem">attribute</literal>&gt;
    &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">fore</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">xs:token</literal>"&gt;
    &lt;/<literal role="xs_elem">attribute</literal>&gt;
    &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">back</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">xs:token</literal>"&gt;
    &lt;/<literal role="xs_elem">attribute</literal>&gt;
    &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">style</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">xs:token</literal>"&gt;
    &lt;/<literal role="xs_elem">attribute</literal>&gt;
    &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">stext</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">xs:string</literal>"&gt;
    &lt;/<literal role="xs_elem">attribute</literal>&gt;
    &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">etext</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">xs:string</literal>"&gt;
    &lt;/<literal role="xs_elem">attribute</literal>&gt;
    &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">sback</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">xs:string</literal>"&gt;
    &lt;/<literal role="xs_elem">attribute</literal>&gt;
    &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">eback</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">xs:string</literal>"&gt;
    &lt;/<literal role="xs_elem">attribute</literal>&gt;
  &lt;/<literal role="xs_elem">complexType</literal>&gt;
&lt;/<literal role="xs_elem">schema</literal>&gt;
</programlisting>

<para>
</para>
</appendix>

<appendix id="hrcxsd">
<title>XML Schema for HRC Language</title>
<para>
This XML Schema instance was automatically generated
from original hrc.xsd source, available at
<ulink url="http://colorer.sf.net/2003/hrc.xsd">http://colorer.sf.net/2003/hrc.xsd</ulink>.
All comments and documentation tags were stripped to achieve more compact format.
To use this schema in other, than informational purposes, use up-to-date
version, available on the link above.
</para>

<programlisting xmlns:xs="http://www.w3.org/2001/XMLSchema">&lt;<literal role="xs_elem">schema</literal> <literal role="xs_attr">targetNamespace</literal>="<literal role="xs_attrval">http://colorer.sf.net/2003/hrc</literal>" <literal role="xs_attr">elementFormDefault</literal>="<literal role="xs_attrval">qualified</literal>"
  xmlns="http://www.w3.org/2001/XMLSchema"
  xmlns:xs="http://www.w3.org/2001/XMLSchema"&gt;

<anchor id="xsidREstring"/>  &lt;<literal role="xs_elem">simpleType</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">REstring</literal>"&gt;
    &lt;<literal role="xs_elem">restriction</literal> <literal role="xs_attr">base</literal>="<literal role="xs_attrval">xs:string</literal>"&gt;
      &lt;<literal role="xs_elem">whiteSpace</literal> <literal role="xs_attr">value</literal>="<literal role="xs_attrval">collapse</literal>"/&gt;
      &lt;<literal role="xs_elem">pattern</literal> <literal role="xs_attr">value</literal>="<literal role="xs_attrval">/.*/[ix]*</literal>"/&gt;
    &lt;/<literal role="xs_elem">restriction</literal>&gt;
  &lt;/<literal role="xs_elem">simpleType</literal>&gt;

<anchor id="xsidREworddiv"/>  &lt;<literal role="xs_elem">simpleType</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">REworddiv</literal>"&gt;
    &lt;<literal role="xs_elem">restriction</literal> <literal role="xs_attr">base</literal>="<literal role="xs_attrval">xs:string</literal>"&gt;
      &lt;<literal role="xs_elem">whiteSpace</literal> <literal role="xs_attr">value</literal>="<literal role="xs_attrval">collapse</literal>"/&gt;
      &lt;<literal role="xs_elem">pattern</literal> <literal role="xs_attr">value</literal>="<literal role="xs_attrval">\[.*\]|%.*;</literal>"/&gt;
    &lt;/<literal role="xs_elem">restriction</literal>&gt;
  &lt;/<literal role="xs_elem">simpleType</literal>&gt;

<anchor id="xsidREstring-or-null"/>  &lt;<literal role="xs_elem">simpleType</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">REstring-or-null</literal>"&gt;
    &lt;<literal role="xs_elem">union</literal> <literal role="xs_attr">memberTypes</literal>="<literal role="xs_attrval">REstring</literal>"&gt;
      &lt;<literal role="xs_elem">simpleType</literal>&gt;
        &lt;<literal role="xs_elem">restriction</literal> <literal role="xs_attr">base</literal>="<literal role="xs_attrval">xs:string</literal>"&gt;
          &lt;<literal role="xs_elem">enumeration</literal> <literal role="xs_attr">value</literal>="<literal role="xs_attrval"/>"/&gt;
        &lt;/<literal role="xs_elem">restriction</literal>&gt;
      &lt;/<literal role="xs_elem">simpleType</literal>&gt;
    &lt;/<literal role="xs_elem">union</literal>&gt;
  &lt;/<literal role="xs_elem">simpleType</literal>&gt;

<anchor id="xsidQName"/>  &lt;<literal role="xs_elem">simpleType</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">QName</literal>"&gt;
    &lt;<literal role="xs_elem">restriction</literal> <literal role="xs_attr">base</literal>="<literal role="xs_attrval">xs:string</literal>"/&gt;
  &lt;/<literal role="xs_elem">simpleType</literal>&gt;

  &lt;<literal role="xs_elem">attributeGroup</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">regionX</literal>"&gt;
    &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">region</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">QName</literal>"/&gt;
    &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">region0</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">QName</literal>"/&gt;
    &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">region1</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">QName</literal>"/&gt;
    &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">region2</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">QName</literal>"/&gt;
    &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">region3</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">QName</literal>"/&gt;
    &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">region4</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">QName</literal>"/&gt;
    &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">region5</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">QName</literal>"/&gt;
    &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">region6</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">QName</literal>"/&gt;
    &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">region7</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">QName</literal>"/&gt;
    &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">region8</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">QName</literal>"/&gt;
    &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">region9</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">QName</literal>"/&gt;
    &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">regiona</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">QName</literal>"/&gt;
    &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">regionb</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">QName</literal>"/&gt;
    &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">regionc</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">QName</literal>"/&gt;
    &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">regiond</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">QName</literal>"/&gt;
    &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">regione</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">QName</literal>"/&gt;
    &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">regionf</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">QName</literal>"/&gt;
  &lt;/<literal role="xs_elem">attributeGroup</literal>&gt;

  &lt;<literal role="xs_elem">element</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">hrc</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">hrc</literal>"/&gt;

<anchor id="xsidhrc"/>  &lt;<literal role="xs_elem">complexType</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval"><link linkend="typehrc">hrc</link></literal>"&gt;
    &lt;<literal role="xs_elem">sequence</literal>&gt;
      &lt;<literal role="xs_elem">element</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">annotation</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">annotation</literal>" <literal role="xs_attr">minOccurs</literal>="<literal role="xs_attrval">0</literal>"/&gt;
      &lt;<literal role="xs_elem">element</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">prototype</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">prototype</literal>" <literal role="xs_attr">minOccurs</literal>="<literal role="xs_attrval">0</literal>" <literal role="xs_attr">maxOccurs</literal>="<literal role="xs_attrval">unbounded</literal>"/&gt;
      &lt;<literal role="xs_elem">element</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">type</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">type</literal>" <literal role="xs_attr">minOccurs</literal>="<literal role="xs_attrval">0</literal>" <literal role="xs_attr">maxOccurs</literal>="<literal role="xs_attrval">unbounded</literal>"/&gt;
    &lt;/<literal role="xs_elem">sequence</literal>&gt;
    &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">version</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">xs:NMTOKEN</literal>" <literal role="xs_attr">use</literal>="<literal role="xs_attrval">required</literal>"&gt;
    &lt;/<literal role="xs_elem">attribute</literal>&gt;
  &lt;/<literal role="xs_elem">complexType</literal>&gt;

<anchor id="xsidannotation"/>  &lt;<literal role="xs_elem">complexType</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval"><link linkend="typeannotation">annotation</link></literal>"&gt;
    &lt;<literal role="xs_elem">choice</literal> <literal role="xs_attr">minOccurs</literal>="<literal role="xs_attrval">0</literal>" <literal role="xs_attr">maxOccurs</literal>="<literal role="xs_attrval">unbounded</literal>"&gt;
      &lt;<literal role="xs_elem">element</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">appinfo</literal>"&gt;
        &lt;<literal role="xs_elem">complexType</literal> <literal role="xs_attr">mixed</literal>="<literal role="xs_attrval">true</literal>"&gt;
          &lt;<literal role="xs_elem">sequence</literal> <literal role="xs_attr">minOccurs</literal>="<literal role="xs_attrval">0</literal>" <literal role="xs_attr">maxOccurs</literal>="<literal role="xs_attrval">unbounded</literal>"&gt;
            &lt;<literal role="xs_elem">any</literal> <literal role="xs_attr">namespace</literal>="<literal role="xs_attrval">##other</literal>" <literal role="xs_attr">processContents</literal>="<literal role="xs_attrval">lax</literal>"/&gt;
          &lt;/<literal role="xs_elem">sequence</literal>&gt;
        &lt;/<literal role="xs_elem">complexType</literal>&gt;
      &lt;/<literal role="xs_elem">element</literal>&gt;
      &lt;<literal role="xs_elem">element</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">documentation</literal>"&gt;
        &lt;<literal role="xs_elem">complexType</literal> <literal role="xs_attr">mixed</literal>="<literal role="xs_attrval">true</literal>"&gt;
          &lt;<literal role="xs_elem">sequence</literal> <literal role="xs_attr">minOccurs</literal>="<literal role="xs_attrval">0</literal>" <literal role="xs_attr">maxOccurs</literal>="<literal role="xs_attrval">unbounded</literal>"&gt;
            &lt;<literal role="xs_elem">any</literal> <literal role="xs_attr">namespace</literal>="<literal role="xs_attrval">##other</literal>" <literal role="xs_attr">processContents</literal>="<literal role="xs_attrval">skip</literal>"/&gt;
          &lt;/<literal role="xs_elem">sequence</literal>&gt;
        &lt;/<literal role="xs_elem">complexType</literal>&gt;
      &lt;/<literal role="xs_elem">element</literal>&gt;
      &lt;<literal role="xs_elem">element</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">contributors</literal>"&gt;
        &lt;<literal role="xs_elem">complexType</literal> <literal role="xs_attr">mixed</literal>="<literal role="xs_attrval">true</literal>"&gt;
          &lt;<literal role="xs_elem">sequence</literal> <literal role="xs_attr">minOccurs</literal>="<literal role="xs_attrval">0</literal>" <literal role="xs_attr">maxOccurs</literal>="<literal role="xs_attrval">unbounded</literal>"&gt;
            &lt;<literal role="xs_elem">any</literal> <literal role="xs_attr">namespace</literal>="<literal role="xs_attrval">##other</literal>" <literal role="xs_attr">processContents</literal>="<literal role="xs_attrval">lax</literal>"/&gt;
          &lt;/<literal role="xs_elem">sequence</literal>&gt;
        &lt;/<literal role="xs_elem">complexType</literal>&gt;
      &lt;/<literal role="xs_elem">element</literal>&gt;
    &lt;/<literal role="xs_elem">choice</literal>&gt;
  &lt;/<literal role="xs_elem">complexType</literal>&gt;

<anchor id="xsidprototype"/>  &lt;<literal role="xs_elem">complexType</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval"><link linkend="typeprototype">prototype</link></literal>"&gt;
    &lt;<literal role="xs_elem">sequence</literal>&gt;
      &lt;<literal role="xs_elem">element</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">annotation</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">annotation</literal>" <literal role="xs_attr">minOccurs</literal>="<literal role="xs_attrval">0</literal>"/&gt;
      &lt;<literal role="xs_elem">element</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">location</literal>" <literal role="xs_attr">minOccurs</literal>="<literal role="xs_attrval">0</literal>"&gt;
        &lt;<literal role="xs_elem">complexType</literal>&gt;
          &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">link</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">xs:anyURI</literal>" <literal role="xs_attr">use</literal>="<literal role="xs_attrval">required</literal>"/&gt;
        &lt;/<literal role="xs_elem">complexType</literal>&gt;
      &lt;/<literal role="xs_elem">element</literal>&gt;
      &lt;<literal role="xs_elem">element</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">filename</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">filename</literal>" <literal role="xs_attr">minOccurs</literal>="<literal role="xs_attrval">0</literal>" <literal role="xs_attr">maxOccurs</literal>="<literal role="xs_attrval">unbounded</literal>"/&gt;
      &lt;<literal role="xs_elem">element</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">firstline</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">firstline</literal>" <literal role="xs_attr">minOccurs</literal>="<literal role="xs_attrval">0</literal>" <literal role="xs_attr">maxOccurs</literal>="<literal role="xs_attrval">unbounded</literal>"/&gt;
      &lt;<literal role="xs_elem">element</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">parameters</literal>" <literal role="xs_attr">minOccurs</literal>="<literal role="xs_attrval">0</literal>"&gt;
        &lt;<literal role="xs_elem">complexType</literal>&gt;
          &lt;<literal role="xs_elem">sequence</literal> <literal role="xs_attr">minOccurs</literal>="<literal role="xs_attrval">0</literal>" <literal role="xs_attr">maxOccurs</literal>="<literal role="xs_attrval">unbounded</literal>"&gt;
            &lt;<literal role="xs_elem">element</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">param</literal>"&gt;
              &lt;<literal role="xs_elem">complexType</literal>&gt;
                &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">name</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">xs:string</literal>" <literal role="xs_attr">use</literal>="<literal role="xs_attrval">required</literal>"/&gt;
                &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">value</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">xs:string</literal>" <literal role="xs_attr">use</literal>="<literal role="xs_attrval">required</literal>"/&gt;
              &lt;/<literal role="xs_elem">complexType</literal>&gt;
            &lt;/<literal role="xs_elem">element</literal>&gt;
          &lt;/<literal role="xs_elem">sequence</literal>&gt;
        &lt;/<literal role="xs_elem">complexType</literal>&gt;
      &lt;/<literal role="xs_elem">element</literal>&gt;
    &lt;/<literal role="xs_elem">sequence</literal>&gt;
    &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">name</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">xs:NCName</literal>" <literal role="xs_attr">use</literal>="<literal role="xs_attrval">required</literal>"&gt;
    &lt;/<literal role="xs_elem">attribute</literal>&gt;
    &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">description</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">xs:string</literal>" <literal role="xs_attr">use</literal>="<literal role="xs_attrval">required</literal>"&gt;
    &lt;/<literal role="xs_elem">attribute</literal>&gt;
    &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">group</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">xs:Name</literal>"&gt;
    &lt;/<literal role="xs_elem">attribute</literal>&gt;
    &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">targetNamespace</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">xs:anyURI</literal>"&gt;
    &lt;/<literal role="xs_elem">attribute</literal>&gt;
  &lt;/<literal role="xs_elem">complexType</literal>&gt;

<anchor id="xsidfilename"/>  &lt;<literal role="xs_elem">complexType</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval"><link linkend="typefilename">filename</link></literal>"&gt;
    &lt;<literal role="xs_elem">simpleContent</literal>&gt;
      &lt;<literal role="xs_elem">extension</literal> <literal role="xs_attr">base</literal>="<literal role="xs_attrval">REstring</literal>"&gt;
        &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">weight</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">xs:decimal</literal>" <literal role="xs_attr">default</literal>="<literal role="xs_attrval">2</literal>"&gt;
        &lt;/<literal role="xs_elem">attribute</literal>&gt;
      &lt;/<literal role="xs_elem">extension</literal>&gt;
    &lt;/<literal role="xs_elem">simpleContent</literal>&gt;
  &lt;/<literal role="xs_elem">complexType</literal>&gt;

<anchor id="xsidfirstline"/>  &lt;<literal role="xs_elem">complexType</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval"><link linkend="typefirstline">firstline</link></literal>"&gt;
    &lt;<literal role="xs_elem">simpleContent</literal>&gt;
      &lt;<literal role="xs_elem">extension</literal> <literal role="xs_attr">base</literal>="<literal role="xs_attrval">REstring</literal>"&gt;
        &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">weight</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">xs:decimal</literal>" <literal role="xs_attr">default</literal>="<literal role="xs_attrval">1</literal>"&gt;
        &lt;/<literal role="xs_elem">attribute</literal>&gt;
      &lt;/<literal role="xs_elem">extension</literal>&gt;
    &lt;/<literal role="xs_elem">simpleContent</literal>&gt;
  &lt;/<literal role="xs_elem">complexType</literal>&gt;

<anchor id="xsidtype"/>  &lt;<literal role="xs_elem">complexType</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval"><link linkend="typetype">type</link></literal>"&gt;
    &lt;<literal role="xs_elem">choice</literal> <literal role="xs_attr">minOccurs</literal>="<literal role="xs_attrval">0</literal>" <literal role="xs_attr">maxOccurs</literal>="<literal role="xs_attrval">unbounded</literal>"&gt;
      &lt;<literal role="xs_elem">element</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">annotation</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">annotation</literal>"/&gt;
      &lt;<literal role="xs_elem">element</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">import</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">import</literal>"/&gt;
      &lt;<literal role="xs_elem">element</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">region</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">region</literal>"/&gt;
      &lt;<literal role="xs_elem">element</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">entity</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">entity</literal>"/&gt;
      &lt;<literal role="xs_elem">element</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">scheme</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">scheme</literal>"/&gt;
    &lt;/<literal role="xs_elem">choice</literal>&gt;
    &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">name</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">xs:NCName</literal>" <literal role="xs_attr">use</literal>="<literal role="xs_attrval">required</literal>"&gt;
    &lt;/<literal role="xs_elem">attribute</literal>&gt;
    &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">access</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">access</literal>" <literal role="xs_attr">default</literal>="<literal role="xs_attrval">private</literal>"/&gt;
  &lt;/<literal role="xs_elem">complexType</literal>&gt;

<anchor id="xsidaccess"/>  &lt;<literal role="xs_elem">simpleType</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">access</literal>"&gt;
    &lt;<literal role="xs_elem">restriction</literal> <literal role="xs_attr">base</literal>="<literal role="xs_attrval">xs:string</literal>"&gt;
      &lt;<literal role="xs_elem">enumeration</literal> <literal role="xs_attr">value</literal>="<literal role="xs_attrval">public</literal>"/&gt;
      &lt;<literal role="xs_elem">enumeration</literal> <literal role="xs_attr">value</literal>="<literal role="xs_attrval">private</literal>"/&gt;
    &lt;/<literal role="xs_elem">restriction</literal>&gt;
  &lt;/<literal role="xs_elem">simpleType</literal>&gt;

<anchor id="xsidscheme"/>  &lt;<literal role="xs_elem">complexType</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval"><link linkend="typescheme">scheme</link></literal>"&gt;
    &lt;<literal role="xs_elem">sequence</literal>&gt;
      &lt;<literal role="xs_elem">element</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">annotation</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">annotation</literal>" <literal role="xs_attr">minOccurs</literal>="<literal role="xs_attrval">0</literal>"/&gt;
      &lt;<literal role="xs_elem">choice</literal> <literal role="xs_attr">minOccurs</literal>="<literal role="xs_attrval">0</literal>" <literal role="xs_attr">maxOccurs</literal>="<literal role="xs_attrval">unbounded</literal>"&gt;
        &lt;<literal role="xs_elem">element</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">regexp</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">regexp</literal>"/&gt;
        &lt;<literal role="xs_elem">element</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">block</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">block</literal>"/&gt;
        &lt;<literal role="xs_elem">element</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">keywords</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">keywords</literal>"/&gt;
        &lt;<literal role="xs_elem">element</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">inherit</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">inherit</literal>"/&gt;
      &lt;/<literal role="xs_elem">choice</literal>&gt;
    &lt;/<literal role="xs_elem">sequence</literal>&gt;
    &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">name</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">xs:NCName</literal>" <literal role="xs_attr">use</literal>="<literal role="xs_attrval">required</literal>"&gt;
    &lt;/<literal role="xs_elem">attribute</literal>&gt;
    &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">access</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">access</literal>" <literal role="xs_attr">default</literal>="<literal role="xs_attrval">private</literal>"/&gt;
  &lt;/<literal role="xs_elem">complexType</literal>&gt;

<anchor id="xsidimport"/>  &lt;<literal role="xs_elem">complexType</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval"><link linkend="typeimport">import</link></literal>"&gt;
    &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">type</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">xs:NCName</literal>" <literal role="xs_attr">use</literal>="<literal role="xs_attrval">required</literal>"/&gt;
  &lt;/<literal role="xs_elem">complexType</literal>&gt;

<anchor id="xsidentity"/>  &lt;<literal role="xs_elem">complexType</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval"><link linkend="typeentity">entity</link></literal>"&gt;
    &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">name</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">xs:NCName</literal>" <literal role="xs_attr">use</literal>="<literal role="xs_attrval">required</literal>"&gt;
    &lt;/<literal role="xs_elem">attribute</literal>&gt;
    &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">value</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">xs:string</literal>" <literal role="xs_attr">use</literal>="<literal role="xs_attrval">required</literal>"&gt;
    &lt;/<literal role="xs_elem">attribute</literal>&gt;
  &lt;/<literal role="xs_elem">complexType</literal>&gt;

<anchor id="xsidregion"/>  &lt;<literal role="xs_elem">complexType</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval"><link linkend="typeregion">region</link></literal>"&gt;
    &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">name</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">xs:NCName</literal>" <literal role="xs_attr">use</literal>="<literal role="xs_attrval">required</literal>"&gt;
    &lt;/<literal role="xs_elem">attribute</literal>&gt;
    &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">parent</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">QName</literal>"&gt;
    &lt;/<literal role="xs_elem">attribute</literal>&gt;
    &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">description</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">xs:string</literal>"&gt;
    &lt;/<literal role="xs_elem">attribute</literal>&gt;
  &lt;/<literal role="xs_elem">complexType</literal>&gt;

<anchor id="xsidregexp"/>  &lt;<literal role="xs_elem">complexType</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval"><link linkend="typeregexp">regexp</link></literal>"&gt;
    &lt;<literal role="xs_elem">simpleContent</literal>&gt;
      &lt;<literal role="xs_elem">extension</literal> <literal role="xs_attr">base</literal>="<literal role="xs_attrval">REstring-or-null</literal>"&gt;
        &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">match</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">REstring</literal>"&gt;
        &lt;/<literal role="xs_elem">attribute</literal>&gt;
        &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">priority</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">priority</literal>" <literal role="xs_attr">default</literal>="<literal role="xs_attrval">normal</literal>"/&gt;
        &lt;<literal role="xs_elem">attributeGroup</literal> <literal role="xs_attr">ref</literal>="<literal role="xs_attrval">regionX</literal>"/&gt;
      &lt;/<literal role="xs_elem">extension</literal>&gt;
    &lt;/<literal role="xs_elem">simpleContent</literal>&gt;
  &lt;/<literal role="xs_elem">complexType</literal>&gt;

<anchor id="xsidpriority"/>  &lt;<literal role="xs_elem">simpleType</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">priority</literal>"&gt;
    &lt;<literal role="xs_elem">restriction</literal> <literal role="xs_attr">base</literal>="<literal role="xs_attrval">xs:string</literal>"&gt;
      &lt;<literal role="xs_elem">enumeration</literal> <literal role="xs_attr">value</literal>="<literal role="xs_attrval">low</literal>"/&gt;
      &lt;<literal role="xs_elem">enumeration</literal> <literal role="xs_attr">value</literal>="<literal role="xs_attrval">normal</literal>"/&gt;
    &lt;/<literal role="xs_elem">restriction</literal>&gt;
  &lt;/<literal role="xs_elem">simpleType</literal>&gt;

<anchor id="xsidblock"/>  &lt;<literal role="xs_elem">complexType</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval"><link linkend="typeblock">block</link></literal>"&gt;
    &lt;<literal role="xs_elem">sequence</literal> <literal role="xs_attr">minOccurs</literal>="<literal role="xs_attrval">0</literal>"&gt;
      &lt;<literal role="xs_elem">element</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">start</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">blockInner</literal>"/&gt;
      &lt;<literal role="xs_elem">element</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">end</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">blockInner</literal>"/&gt;
    &lt;/<literal role="xs_elem">sequence</literal>&gt;
    &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">start</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">REstring</literal>"/&gt;
    &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">end</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">REstring</literal>"/&gt;
    &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">scheme</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">QName</literal>" <literal role="xs_attr">use</literal>="<literal role="xs_attrval">required</literal>"/&gt;
    &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">priority</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">priority</literal>" <literal role="xs_attr">default</literal>="<literal role="xs_attrval">normal</literal>"/&gt;
    &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">content-priority</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">priority</literal>" <literal role="xs_attr">default</literal>="<literal role="xs_attrval">normal</literal>"/&gt;
    &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">region</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">QName</literal>"/&gt;
    &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">region00</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">QName</literal>"/&gt;
    &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">region01</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">QName</literal>"/&gt;
    &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">region02</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">QName</literal>"/&gt;
    &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">region03</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">QName</literal>"/&gt;
    &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">region04</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">QName</literal>"/&gt;
    &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">region05</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">QName</literal>"/&gt;
    &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">region06</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">QName</literal>"/&gt;
    &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">region07</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">QName</literal>"/&gt;
    &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">region08</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">QName</literal>"/&gt;
    &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">region09</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">QName</literal>"/&gt;
    &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">region0a</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">QName</literal>"/&gt;
    &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">region0b</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">QName</literal>"/&gt;
    &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">region0c</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">QName</literal>"/&gt;
    &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">region0d</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">QName</literal>"/&gt;
    &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">region0e</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">QName</literal>"/&gt;
    &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">region0f</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">QName</literal>"/&gt;
    &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">region10</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">QName</literal>"/&gt;
    &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">region11</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">QName</literal>"/&gt;
    &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">region12</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">QName</literal>"/&gt;
    &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">region13</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">QName</literal>"/&gt;
    &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">region14</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">QName</literal>"/&gt;
    &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">region15</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">QName</literal>"/&gt;
    &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">region16</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">QName</literal>"/&gt;
    &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">region17</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">QName</literal>"/&gt;
    &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">region18</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">QName</literal>"/&gt;
    &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">region19</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">QName</literal>"/&gt;
    &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">region1a</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">QName</literal>"/&gt;
    &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">region1b</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">QName</literal>"/&gt;
    &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">region1c</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">QName</literal>"/&gt;
    &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">region1d</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">QName</literal>"/&gt;
    &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">region1e</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">QName</literal>"/&gt;
    &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">region1f</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">QName</literal>"/&gt;
  &lt;/<literal role="xs_elem">complexType</literal>&gt;

<anchor id="xsidblockInner"/>  &lt;<literal role="xs_elem">complexType</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval"><link linkend="typeblockInner">blockInner</link></literal>"&gt;
    &lt;<literal role="xs_elem">simpleContent</literal>&gt;
      &lt;<literal role="xs_elem">extension</literal> <literal role="xs_attr">base</literal>="<literal role="xs_attrval">REstring</literal>"&gt;
        &lt;<literal role="xs_elem">attributeGroup</literal> <literal role="xs_attr">ref</literal>="<literal role="xs_attrval">regionX</literal>"/&gt;
      &lt;/<literal role="xs_elem">extension</literal>&gt;
    &lt;/<literal role="xs_elem">simpleContent</literal>&gt;
  &lt;/<literal role="xs_elem">complexType</literal>&gt;

<anchor id="xsidinherit"/>  &lt;<literal role="xs_elem">complexType</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval"><link linkend="typeinherit">inherit</link></literal>"&gt;
    &lt;<literal role="xs_elem">sequence</literal>&gt;
      &lt;<literal role="xs_elem">element</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">virtual</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">virtual</literal>" <literal role="xs_attr">minOccurs</literal>="<literal role="xs_attrval">0</literal>" <literal role="xs_attr">maxOccurs</literal>="<literal role="xs_attrval">unbounded</literal>"/&gt;
    &lt;/<literal role="xs_elem">sequence</literal>&gt;
    &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">scheme</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">QName</literal>" <literal role="xs_attr">use</literal>="<literal role="xs_attrval">required</literal>"&gt;
    &lt;/<literal role="xs_elem">attribute</literal>&gt;
  &lt;/<literal role="xs_elem">complexType</literal>&gt;

<anchor id="xsidvirtual"/>  &lt;<literal role="xs_elem">complexType</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval"><link linkend="typevirtual">virtual</link></literal>"&gt;
    &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">scheme</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">QName</literal>" <literal role="xs_attr">use</literal>="<literal role="xs_attrval">required</literal>"&gt;
    &lt;/<literal role="xs_elem">attribute</literal>&gt;
    &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">subst-scheme</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">QName</literal>" <literal role="xs_attr">use</literal>="<literal role="xs_attrval">required</literal>"&gt;
    &lt;/<literal role="xs_elem">attribute</literal>&gt;
  &lt;/<literal role="xs_elem">complexType</literal>&gt;

<anchor id="xsidkeywords"/>  &lt;<literal role="xs_elem">complexType</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval"><link linkend="typekeywords">keywords</link></literal>"&gt;
    &lt;<literal role="xs_elem">choice</literal> <literal role="xs_attr">minOccurs</literal>="<literal role="xs_attrval">0</literal>" <literal role="xs_attr">maxOccurs</literal>="<literal role="xs_attrval">unbounded</literal>"&gt;
      &lt;<literal role="xs_elem">element</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">word</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">word</literal>"/&gt;
      &lt;<literal role="xs_elem">element</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">symb</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">symb</literal>"/&gt;
    &lt;/<literal role="xs_elem">choice</literal>&gt;
    &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">ignorecase</literal>" <literal role="xs_attr">default</literal>="<literal role="xs_attrval">yes</literal>"&gt;
      &lt;<literal role="xs_elem">simpleType</literal>&gt;
        &lt;<literal role="xs_elem">restriction</literal> <literal role="xs_attr">base</literal>="<literal role="xs_attrval">xs:string</literal>"&gt;
          &lt;<literal role="xs_elem">enumeration</literal> <literal role="xs_attr">value</literal>="<literal role="xs_attrval">yes</literal>"/&gt;
          &lt;<literal role="xs_elem">enumeration</literal> <literal role="xs_attr">value</literal>="<literal role="xs_attrval">no</literal>"/&gt;
        &lt;/<literal role="xs_elem">restriction</literal>&gt;
      &lt;/<literal role="xs_elem">simpleType</literal>&gt;
    &lt;/<literal role="xs_elem">attribute</literal>&gt;
    &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">region</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">QName</literal>"&gt;
    &lt;/<literal role="xs_elem">attribute</literal>&gt;
    &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">priority</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">priority</literal>" <literal role="xs_attr">default</literal>="<literal role="xs_attrval">low</literal>"/&gt;
    &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">worddiv</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">REworddiv</literal>"&gt;
    &lt;/<literal role="xs_elem">attribute</literal>&gt;
  &lt;/<literal role="xs_elem">complexType</literal>&gt;

<anchor id="xsidsymb"/>  &lt;<literal role="xs_elem">complexType</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval"><link linkend="typesymb">symb</link></literal>"&gt;
    &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">name</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">xs:string</literal>" <literal role="xs_attr">use</literal>="<literal role="xs_attrval">required</literal>"/&gt;
    &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">region</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">QName</literal>"/&gt;
  &lt;/<literal role="xs_elem">complexType</literal>&gt;

<anchor id="xsidword"/>  &lt;<literal role="xs_elem">complexType</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval"><link linkend="typeword">word</link></literal>"&gt;
    &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">name</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">xs:string</literal>" <literal role="xs_attr">use</literal>="<literal role="xs_attrval">required</literal>"/&gt;
    &lt;<literal role="xs_elem">attribute</literal> <literal role="xs_attr">name</literal>="<literal role="xs_attrval">region</literal>" <literal role="xs_attr">type</literal>="<literal role="xs_attrval">QName</literal>"/&gt;
  &lt;/<literal role="xs_elem">complexType</literal>&gt;
&lt;/<literal role="xs_elem">schema</literal>&gt;
</programlisting>

</appendix>

<bibliography id="bibliography"><title>References</title>
 
 <bibliomixed id="xml-rec">
 <abbrev>XML 1.0</abbrev>Tim Bray, Jean Paoli, and C. M. Sperberg-McQueen, Eve Maler, editors.
 <citetitle><ulink url="http://www.w3.org/TR/REC-xml">Extensible Markup Language (XML) 1.0 Second Edition</ulink></citetitle>.
 W3C (World Wide Web Consortium), 2000.
 </bibliomixed>
 
 <bibliomixed id="xslt-rec">
 <abbrev>XSLT 1.0</abbrev>James Clark, editor.
 <citetitle><ulink url="http://www.w3.org/TR/xslt">XSL Transformations (XSLT) 1.0</ulink></citetitle>.
 W3C (World Wide Web Consortium), 1999.
 </bibliomixed>

 <bibliomixed id="xmlschema-1">
 <abbrev>W3C XML Schema Structures</abbrev>
 Henry S. Thompson, David Beech, Murray Maloney, Noah Mendelsohn, editors.
 <citetitle><ulink url="http://www.w3.org/TR/xmlschema-1/">XML Schema Part 1: Structures</ulink></citetitle>.
  W3C (World Wide Web Consortium), 2001.
 </bibliomixed>

 <bibliomixed id="xmlschema-2">
 <abbrev>W3C XML Schema Datatypes</abbrev>Paul V. Biron, Ashok Malhotra, editors.
 <citetitle><ulink url="http://www.w3.org/TR/xmlschema-2/">XML Schema Part 2: Datatypes</ulink></citetitle>.
  W3C (World Wide Web Consortium), 2001.
 </bibliomixed>

</bibliography>

</article>