<?xml version="1.0" encoding="iso-8859-1"?>
<!-- edited with XMLSPY v2004 rel. 4 U (http://www.xmlspy.com) by Gregor Hagedorn (Biologische Bundesanstalt) -->
<xs:schema targetNamespace="http://www.tdwg.org/2004/UBIF" elementFormDefault="qualified" attributeFormDefault="unqualified" blockDefault="#all" version="SDD 1.0 beta 2" xmlns="http://www.tdwg.org/2004/UBIF" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:annotation>
    <xs:documentation xml:lang="en-us">
      <p>XML schema to encode descriptive data in biology and other subjects. The primary goal of the design is to increase the knowledge and availability of knowledge about the diversity of life on earth. However, it may be used in many other areas (including medicine, pathology, archeology, anthropology) wherever objects or classes of objects are described for later reidentification.</p>
      <p>The schema was designed by the Structure of Descriptive Data (SDD, http://160.45.63.11/Projects/TDWG-SDD/index.html) group. SDD was established 1999 as a subgroup of the Taxonomic Databases Working Group (TDWG, www. tdwg.org) of the International Union of Biological Sciences (IUBS). The author of the current schema version and of all annotations is G. Hagedorn, Berlin. The requirements for an SDD schema where elaborated in 6 major meetings of the SDD group and in discussions over the SDD email list. Over 60 people contributed to these discussions. However, the help, criticism and energy of Bob Morris, Kevin Thiele, Bryan Heidorn, Guillaume Rousse, Steve Shattuck, Donald Hobern, Trevor Patterson and Nicolas Bailly is specially acknowledged!</p>
      <p>Copyright © TDWG, 26. June 2004. Licensed under GNU GPL 2 (http://www.gnu.org/licenses/gpl.html) - with the following restriction: This is a preliminary version (0.91!) for testing purposes. Permission to use this schema is granted to all scientific or commercial projects for a testing period of up to 3 years. After this time computer programs using this schema must either be discontinued or converted to the final version of this schema.</p>
      <p>Conventions:<br/>
Element or attribute names starting with underscores (__) are present in the schema for discussion purposes only and should be only experimentally used. Annotations containing @@ indicate unfinished points of discussion.</p>
      <p>Note: blockDefault="#all" in xs:schema prevents substitution and that in instance documents derived types can be used in elements typed to the base type (which otherwise is possible using xsi:type=""). - finalDefault is not set, further type derivation is currently not considered problematic. Please contact us if you believe otherwise. Note that according to the w3c discussion forum, the developers of xml Schema consider to drop the final attribute in the upcoming XML Schema version 1.1. - Nillable: xsi:null is not supported in SDD documents (schema declaration nillable="false" is default, not explicitly stated).</p>
    </xs:documentation>
  </xs:annotation>
  <xs:annotation>
    <xs:documentation xml:lang="en-us">This imports the UBIF schema file (SDD uses the same namespace as UBIF!).</xs:documentation>
  </xs:annotation>
  <xs:include schemaLocation="UBIF.xsd">
    <xs:annotation>
      <xs:documentation xml:lang="en-us">Due to problems with key/keyrefs when using two namespaces (see documentation on the SDD WIKI: http://efgblade.cs.umb.edu/twiki/bin/view/SDD/UBIFDesignRequirements), the SDD schema is based on the UBIF namespace, and thus uses include rather than import!</xs:documentation>
    </xs:annotation>
  </xs:include>
  <xs:include schemaLocation="SDD_RelationIDs.xsd">
    <xs:annotation>
      <xs:documentation xml:lang="en-us">Contains relation IDs derived from the RelationID base type. Used for locally unique identifiers (local to a specific object type). To better communicate the ID scope, for each object type a derived RelationID has been used, although technically this is redundant.</xs:documentation>
    </xs:annotation>
  </xs:include>
  <xs:annotation>
    <xs:documentation xml:lang="en-us">DescriptiveData must be placed inside the UBIF top-level Datasets/Dataset structure as the last element. Because of keyref constraints, this schema depends on the imported UBIF root!</xs:documentation>
  </xs:annotation>
  <xs:element name="DescriptiveData" type="DescriptiveData">
    <xs:annotation>
      <xs:documentation xml:lang="en-us">Descriptive data itself that are specific to SDD, i. e. descriptive terminology, coded and natural language descriptions and stored identification keys.</xs:documentation>
    </xs:annotation>
    <xs:key name="AudienceKey">
      <xs:selector xpath="Terminology/General/Audiences/Audience"/>
      <xs:field xpath="@audiencekey"/>
    </xs:key>
    <xs:unique name="Audience_UniqueLabelText">
      <xs:annotation>
        <xs:documentation xml:lang="en-us">The labels of audience definitions are required and must be unique for a given language.</xs:documentation>
      </xs:annotation>
      <xs:selector xpath="Terminology/General/Audiences/Audience"/>
      <xs:field xpath="Label/Text"/>
      <xs:field xpath="Specification/Language/@Language"/>
    </xs:unique>
    <xs:key name="GlossaryEntryKey">
      <xs:selector xpath="Terminology/Glossary/GlossaryEntry"/>
      <xs:field xpath="@id"/>
    </xs:key>
    <xs:unique name="GlossaryEntry_UniqueTermPlusSensuLabel">
      <xs:annotation>
        <xs:documentation xml:lang="en-us">The labels of glossary definitions are required and must - in combination with the SensuLabel - be unique for a given language/audience combination.</xs:documentation>
      </xs:annotation>
      <xs:selector xpath="Terminology/Glossary/GlossaryEntry/Representation"/>
      <xs:field xpath="Term"/>
      <xs:field xpath="SensuLabel"/>
      <xs:field xpath="@language"/>
      <xs:field xpath="@audience"/>
    </xs:unique>
    <xs:key name="CodingStatusKey">
      <xs:annotation>
        <xs:documentation xml:lang="en-us">The key of coding status values must be unique.</xs:documentation>
      </xs:annotation>
      <xs:selector xpath="Terminology/General/CodingStatusValues/Status"/>
      <xs:field xpath="@id"/>
    </xs:key>
    <xs:unique name="CodingStatus_UniqueLabelText">
      <xs:annotation>
        <xs:documentation xml:lang="en-us">The labels of coding status values are required and must be unique for a given language/audience combination.</xs:documentation>
      </xs:annotation>
      <xs:selector xpath="Terminology/General/CodingStatusValues/Status/Label/Representation"/>
      <xs:field xpath="Text"/>
      <xs:field xpath="@language"/>
      <xs:field xpath="@audience"/>
    </xs:unique>
    <xs:key name="ModifierSetKey">
      <xs:annotation>
        <xs:documentation xml:lang="en-us">Modifier set keys are required and must be unique.</xs:documentation>
      </xs:annotation>
      <xs:selector xpath="Terminology/Modifiers/ModifierSet"/>
      <xs:field xpath="@id"/>
    </xs:key>
    <xs:unique name="ModifierSet_UniqueLabelText">
      <xs:annotation>
        <xs:documentation xml:lang="en-us">The labels of modifier sets are required and must be unique for a given language/audience combination.</xs:documentation>
      </xs:annotation>
      <xs:selector xpath="Terminology/Modifiers/ModifierSet/Label/Representation"/>
      <xs:field xpath="Text"/>
      <xs:field xpath="@language"/>
    </xs:unique>
    <xs:key name="ModifierKey">
      <xs:annotation>
        <xs:documentation xml:lang="en-us">Modifier keys are required and must be unique regardless of modifier type (certainty, frequency, etc.).</xs:documentation>
      </xs:annotation>
      <xs:selector xpath="Terminology/Modifiers/ModifierSet/*/Modifier"/>
      <xs:field xpath="@id"/>
    </xs:key>
    <xs:unique name="Modifier_UniqueLabelText">
      <xs:annotation>
        <xs:documentation xml:lang="en-us">The labels of modifier definitions are required and must be unique for a given language/audience combination.</xs:documentation>
      </xs:annotation>
      <xs:selector xpath="Terminology/Modifiers/ModifierSet/*/Modifier/Label/Representation"/>
      <xs:field xpath="Text"/>
      <xs:field xpath="@language"/>
      <xs:field xpath="@audience"/>
    </xs:unique>
    <xs:key name="CharacterDefKey">
      <xs:selector xpath="Terminology/Characters/*"/>
      <xs:field xpath="@id"/>
    </xs:key>
    <xs:key name="CharacterDefKey_Categorical">
      <xs:annotation>
        <xs:documentation xml:lang="en-us">Additional character-type-specific key.</xs:documentation>
      </xs:annotation>
      <xs:selector xpath="Terminology/Characters/CategoricalCharacter"/>
      <xs:field xpath="@id"/>
    </xs:key>
    <xs:key name="CharacterDefKey_Quantitative">
      <xs:annotation>
        <xs:documentation xml:lang="en-us">Additional character-type-specific key.</xs:documentation>
      </xs:annotation>
      <xs:selector xpath="Terminology/Characters/QuantitativeCharacter"/>
      <xs:field xpath="@id"/>
    </xs:key>
    <xs:key name="CharacterDefKey_ColorRange">
      <xs:annotation>
        <xs:documentation xml:lang="en-us">Additional character-type-specific key.</xs:documentation>
      </xs:annotation>
      <xs:selector xpath="Terminology/Characters/ColorRangeCharacter"/>
      <xs:field xpath="@id"/>
    </xs:key>
    <xs:unique name="Character_UniqueLabelText">
      <xs:annotation>
        <xs:documentation xml:lang="en-us">The labels of character definitions are required and must be unique for a given language/audience combination.</xs:documentation>
      </xs:annotation>
      <xs:selector xpath="Terminology/Characters/Character/Label/Representation"/>
      <xs:field xpath="Text"/>
      <xs:field xpath="@language"/>
      <xs:field xpath="@audience"/>
    </xs:unique>
    <xs:key name="CharacterStateKey">
      <xs:annotation>
        <xs:documentation xml:lang="en-us">This provides a joint key for states either defined locally within a character (= StateDefinition), or referenced from ConceptStates (StateReference; provides a new local key). This is the only key for them; no separate keys for locally defined/concept reference within the character are defined. Note that state keys are unique across all characters, not only within each character.</xs:documentation>
      </xs:annotation>
      <xs:selector xpath="Terminology/Characters/CategoricalCharacter/States/StateDefinition | Terminology/Characters/CategoricalCharacter/States/StateReference"/>
      <xs:field xpath="@id"/>
    </xs:key>
    <xs:key name="ConceptTreeKey">
      <xs:selector xpath="Terminology/ConceptTrees/ConceptTree"/>
      <xs:field xpath="@id"/>
    </xs:key>
    <xs:unique name="ConceptTree_UniqueLabelText">
      <xs:annotation>
        <xs:documentation xml:lang="en-us">The labels of concept tree definitions (= entire trees, not the nodes within the trees) are required and must be unique for a given language/audience combination.</xs:documentation>
      </xs:annotation>
      <xs:selector xpath="Terminology/ConceptTrees/ConceptTree/Label/Representation"/>
      <xs:field xpath="Text"/>
      <xs:field xpath="@language"/>
    </xs:unique>
    <xs:key name="ConceptKey">
      <xs:annotation>
        <xs:documentation xml:lang="en-us">This collects all keys of Concept elements. Note that no UniqueLabelText constraint is defined for concept tree nodes; the labels on tree nodes are optional and not required to be unique. They are expected to be displayed together with their parents and thus obtain their uniqueness from the context (the path from the root should be unique, but this is not expressed in the schema). Also, the xpath selector selects all Concept elements anywhere in the document, which is more general (and therefore computation intensive) than necessary. A better xpath expression would be Terminology/ConceptTrees/ConceptTree//Concept, which includes all nodes regardless of their place in the tree structure. However, combining a defined path with an "all child" path is impossible under the restrictions imposed on xpath expressions in xml-schema identity constraints. Further, since keyed elements in a tree are collected from the document root rather than from the tree root, the node element names must be unique names in the entire schema. A related problem is that we desire to use the same element name (Concept) for node definitions and references to these nodes (from within NaturalLanguageDescriptions). Although the latter has a ref instead of an id, Schema would normally complain that the id is missing, rather than understanding that only elements possessing a id are to be selected for the xs:key constraint. Using a combined xpath ".//Nodes/Concept" is a solution. It does, however, work only if the id of the root node is not included. Since no reason exists to do so (this id is redundant) we accept this.</xs:documentation>
      </xs:annotation>
      <xs:selector xpath=".//Nodes/Concept"/>
      <xs:field xpath="@id"/>
    </xs:key>
    <xs:key name="ConceptStateKey">
      <xs:annotation>
        <xs:documentation xml:lang="en-us">All concept state id values must be unique in an entire project. Compare ConceptKey.</xs:documentation>
      </xs:annotation>
      <xs:selector xpath=".//Concept/ReferableDefinitions/ConceptStates/StateDefinition"/>
      <xs:field xpath="@id"/>
    </xs:key>
    <xs:key name="DescriptionKey">
      <xs:selector xpath="CodedDescriptions/CodedDescription | NaturalLanguageDescriptions/NaturalLanguageDescription">
        <xs:annotation>
          <xs:documentation xml:lang="en-us">A joint key for all CodedDescription or NaturalLanguageDescription elements.</xs:documentation>
        </xs:annotation>
      </xs:selector>
      <xs:field xpath="@id"/>
    </xs:key>
    <xs:key name="StoredKeyKey">
      <xs:annotation>
        <xs:documentation xml:lang="en-us">This identifies an entire stored key (i. e. not the nodes/steps in the key)</xs:documentation>
      </xs:annotation>
      <xs:selector xpath="IdentificationKeys/IdentificationKey"/>
      <xs:field xpath="@id"/>
    </xs:key>
    <xs:unique name="StoredKey_UniqueLabelText">
      <xs:annotation>
        <xs:documentation xml:lang="en-us">The labels of stored key definitions (i. e. for the entire key) are required and must be unique for a given language/audience combination.</xs:documentation>
      </xs:annotation>
      <xs:selector xpath="IdentificationKeys/IdentificationKey/Label/Representation"/>
      <xs:field xpath="Text"/>
      <xs:field xpath="@language"/>
    </xs:unique>
    <xs:key name="StoredKeyNodeKey">
      <xs:annotation>
        <xs:documentation xml:lang="en-us">This collects all ids of nodes in stored keys (Lead elements). Compare the note on Concept about a potentially better xpath.</xs:documentation>
      </xs:annotation>
      <xs:selector xpath=".//Lead"/>
      <xs:field xpath="@id"/>
    </xs:key>
    <!-- The place of key definition defines not only the starting point for the xpath, but also its scope/validity. While ref can be defined with the element, key definitions must be visible by all keyref identity constraints. The document root here is the branching point for terminology and description. -->
  </xs:element>
  <xs:complexType name="DescriptiveData">
    <xs:annotation>
      <xs:documentation xml:lang="en-us">Within UBIF (Unified Biosciences Information Framework), this represents the node where the SDD-specific data start</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="ConfigurationData" minOccurs="0">
        <xs:annotation>
          <xs:documentation xml:lang="en-us">Default settings etc.</xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:annotation>
              <xs:documentation xml:lang="en-us">= SDD-
specific
additions 
to general 
dataset 
metadata</xs:documentation>
            </xs:annotation>
            <xs:element name="PresentationDefaults">
              <xs:annotation>
                <xs:documentation xml:lang="en-us">Default Audience and Concept tree for interactive identification. If configuration data exist at all, at least the default language should be configured!</xs:documentation>
              </xs:annotation>
              <xs:complexType>
                <xs:sequence>
                  <xs:element name="Audience" type="AudienceRef">
                    <xs:annotation>
                      <xs:documentation xml:lang="en-us">The default language and audience is used whenever the consuming application has no other preference specified. The user interface of the application may start with the default audience representations and then allow to choose a different audience.</xs:documentation>
                    </xs:annotation>
                    <xs:keyref name="Default_AudienceKeyref" refer="AudienceKey">
                      <xs:selector xpath="."/>
                      <xs:field xpath="@audience"/>
                    </xs:keyref>
                  </xs:element>
                  <xs:element name="InteractiveKeyConceptTree" type="ConceptTreeRef" minOccurs="0">
                    <xs:annotation>
                      <xs:documentation xml:lang="en-us">The default concept tree used to arrange characters in interactive identification.
[ATTR: ref]</xs:documentation>
                    </xs:annotation>
                    <xs:keyref name="Default_ConceptTreeKeyref" refer="ConceptTreeKey">
                      <xs:selector xpath="."/>
                      <xs:field xpath="@ref"/>
                    </xs:keyref>
                  </xs:element>
                </xs:sequence>
              </xs:complexType>
            </xs:element>
            <xs:element name="DataInheritance" minOccurs="0">
              <xs:annotation>
                <xs:documentation xml:lang="en-us">If a class hierarchy is present, the hierarchy used for inheriting and aggregating descriptive data in the class hierarchy must be defined.</xs:documentation>
              </xs:annotation>
              <xs:complexType>
                <xs:sequence>
                  <xs:element name="ClassHierarchy" type="ClassHierarchyRef">
                    <xs:annotation>
                      <xs:documentation xml:lang="en-us">[ATTR: ref]</xs:documentation>
                    </xs:annotation>
                    <xs:keyref name="Default_ClassHierarchyKeyref" refer="ClassHierarchyKey">
                      <xs:selector xpath="."/>
                      <xs:field xpath="@ref"/>
                    </xs:keyref>
                  </xs:element>
                </xs:sequence>
              </xs:complexType>
            </xs:element>
            <xs:group ref="EnablingGroup" minOccurs="0"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="Terminology" minOccurs="0">
        <xs:annotation>
          <xs:documentation source="http://160.45.63.11/Projects/TDWG-SDD/docs/SDD_S3_Terminology.html" xml:lang="en-us">Defines the operational terminology (parts, characters, states, etc.) in
which descriptions are expressed.</xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:annotation>
              <xs:documentation xml:lang="en-us">The terms are
defined by the
biological specialist(s).
They are used in
the descriptions
through references
to their 'id'
attributes).</xs:documentation>
            </xs:annotation>
            <xs:element name="General" minOccurs="0">
              <xs:annotation>
                <xs:documentation xml:lang="en-us">General vocabulary lists and rules; applicable outside of the domain of descriptive data. In contrast to enumerated types in the schema,
new values and labels for new
languages/audiences can be defined.</xs:documentation>
              </xs:annotation>
              <xs:complexType>
                <xs:sequence>
                  <xs:element name="Audiences" type="AudienceDefs" minOccurs="0">
                    <xs:annotation>
                      <xs:documentation xml:lang="en-us">A list of audiences addressed in the project. An Audience is an extension of language (including dialect), esp. with expertise (pupil, beginner, expert).</xs:documentation>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="__LanguageRules" minOccurs="0">
                    <xs:annotation>
                      <xs:documentation xml:lang="en-us">@@ to be discussed! @@
For natural language reporting some rules can be defined per language rather than per audience. If a rule for a language used in an audience definition is missing, applications may add a default language rule to the project data.</xs:documentation>
                    </xs:annotation>
                    <xs:complexType>
                      <xs:sequence>
                        <xs:element name="LanguageRule" maxOccurs="unbounded">
                          <xs:annotation>
                            <xs:documentation xml:lang="en-us">[ATTR: language, dir]</xs:documentation>
                          </xs:annotation>
                          <xs:complexType>
                            <xs:complexContent>
                              <xs:extension base="LanguageRef">
                                <xs:sequence>
                                  <xs:element name="Wording">
                                    <xs:annotation>
                                      <xs:documentation xml:lang="en-us">@@This whole sequence is not functional, just a bunch of ideas for discussion!</xs:documentation>
                                    </xs:annotation>
                                    <xs:complexType>
                                      <xs:sequence>
                                        <xs:element name="OrDelimiters">
                                          <xs:annotation>
                                            <xs:documentation xml:lang="en-us">@@ Should for each of Or, And, etc. an entire delimiter-group be defined?

@@ Should only 'Or' be defined and 'And' etc. left to the override mechanism available anyways in the concept trees?</xs:documentation>
                                          </xs:annotation>
                                          <xs:complexType>
                                            <xs:group ref="__DelimiterGroup"/>
                                          </xs:complexType>
                                        </xs:element>
                                        <xs:element name="And" type="NatLangOperatorWording">
                                          <xs:annotation>
                                            <xs:documentation xml:lang="en-us">@@ unclear whether used. DeltaAccess defines on the character level whether states are combined with or, and, to, or with. This has not yet been worked out for SDD! Instead originally SDD attempts to succeed just with delimiters. Combining delimiter rules with conditionally different operators is a problem, however!@@</xs:documentation>
                                          </xs:annotation>
                                        </xs:element>
                                        <xs:element name="Or" type="NatLangOperatorWording"/>
                                        <xs:element name="With" type="NatLangOperatorWording">
                                          <xs:annotation>
                                            <xs:documentation xml:lang="en-us">@@ unclear whether this would be used</xs:documentation>
                                          </xs:annotation>
                                        </xs:element>
                                        <xs:element name="To" type="NatLangOperatorWording">
                                          <xs:annotation>
                                            <xs:documentation xml:lang="en-us">For states that intergrade:
'red to orange'</xs:documentation>
                                          </xs:annotation>
                                        </xs:element>
                                      </xs:sequence>
                                    </xs:complexType>
                                  </xs:element>
                                  <xs:element name="FixedCapitalization" minOccurs="0">
                                    <xs:annotation>
                                      <xs:documentation xml:lang="en-us">The words listed in this collection should no be capitalized at the start of a sentence, or decapitalized when sentences are joined.</xs:documentation>
                                    </xs:annotation>
                                    <xs:complexType>
                                      <xs:sequence>
                                        <xs:element name="Word" type="String255" maxOccurs="unbounded"/>
                                      </xs:sequence>
                                    </xs:complexType>
                                  </xs:element>
                                  <xs:group ref="EnablingGroup" minOccurs="0"/>
                                </xs:sequence>
                                <xs:attribute name="dir" type="TextDirectionalityEnum" use="optional" default="ltr"/>
                              </xs:extension>
                            </xs:complexContent>
                          </xs:complexType>
                        </xs:element>
                      </xs:sequence>
                    </xs:complexType>
                    <xs:unique name="LanguageRules_UniqueLanguage">
                      <xs:annotation>
                        <xs:documentation xml:lang="en-us">The labels of audience definitions are required and must be unique for a given language ('language' attribute).</xs:documentation>
                      </xs:annotation>
                      <xs:selector xpath="LanguageRule"/>
                      <xs:field xpath="@Language"/>
                    </xs:unique>
                  </xs:element>
                  <xs:element name="CodingStatusValues" minOccurs="0">
                    <xs:annotation>
                      <xs:documentation xml:lang="en-us">Defines the semantics and labels of coding status values (e. g., unknown, not applicable, not interpretable).</xs:documentation>
                    </xs:annotation>
                    <xs:complexType>
                      <xs:sequence>
                        <xs:element name="Status" type="CodingStatusDef" maxOccurs="unbounded">
                          <xs:annotation>
                            <xs:documentation xml:lang="en-us">Coding status values (= 'missing data indicators', = 'special states') provide standardized reasons why data are missing. Unlike most elements in Terminology, these are constrained by the SDD model and can only be extended by revising the SDD standard (may be changed to user-definable in a later version of SDD). Labels are already user-definable to support multiple audiences. The labels and abbreviations given are only recommendations. They can be freely changed as long as the semantics are preserved.
[ATTR: id]</xs:documentation>
                          </xs:annotation>
                        </xs:element>
                      </xs:sequence>
                    </xs:complexType>
                  </xs:element>
                </xs:sequence>
              </xs:complexType>
            </xs:element>
            <xs:element name="Glossary" minOccurs="0">
              <xs:annotation>
                <xs:documentation xml:lang="en-us">Contains detailed and fundamental terminological definitions (of object/part, object types, property, method, property state, etc.). These are referenced in character, state, etc. definitions, but may also be used independently.</xs:documentation>
              </xs:annotation>
              <xs:complexType>
                <xs:sequence>
                  <xs:element name="GlossaryEntry" type="GlossaryEntry" maxOccurs="unbounded">
                    <xs:annotation>
                      <xs:documentation xml:lang="en-us">The Glossary entry for
a single concept (object,
method, property,
state, etc.), which may
be expressed in multiple
audience-specific
representations.
[ATTR: id]</xs:documentation>
                    </xs:annotation>
                    <xs:unique name="GlossaryEntry_UniqueRepr">
                      <xs:annotation>
                        <xs:documentation xml:lang="en-us">The audience values must uniquely identify the Representations within each GlossaryEntry.</xs:documentation>
                      </xs:annotation>
                      <xs:selector xpath="Representation"/>
                      <xs:field xpath="@language"/>
                      <xs:field xpath="@audience"/>
                    </xs:unique>
                  </xs:element>
                </xs:sequence>
              </xs:complexType>
            </xs:element>
            <xs:element name="Modifiers" minOccurs="0">
              <xs:annotation>
                <xs:documentation source="http://160.45.63.11/Projects/TDWG-SDD/docs/SDD_P_Modifier_Overview.html" xml:lang="en-us">Certainty, frequency, and other modifiers modify categorical states or statistical measures. Modifiers are defined for the entire project, but must be enabled for characters in concept nodes to be available when editing descriptions</xs:documentation>
              </xs:annotation>
              <xs:complexType>
                <xs:sequence>
                  <xs:element name="ModifierSet" type="ModifierSet" maxOccurs="unbounded">
                    <xs:annotation>
                      <xs:documentation source="http://160.45.63.11/Projects/TDWG-SDD/docs/SDD_P_Modifier_Overview.html" xml:lang="en-us">Modifiers within a group may be ranked/ordered; in descriptions, modifiers from the same group are combined with 'or'. All modifiers in a group must be of the same type
(certainty, frequency, etc.).</xs:documentation>
                    </xs:annotation>
                  </xs:element>
                </xs:sequence>
              </xs:complexType>
            </xs:element>
            <xs:element name="Characters" minOccurs="0">
              <xs:annotation>
                <xs:documentation xml:lang="en-us">Characters are the operationalized concepts used in descriptions. They define categorical states and quantitative values or statistical measures. Characters are defined in an unordered flat list. They can be used alone or in combination with modifiers or concept trees.</xs:documentation>
              </xs:annotation>
              <xs:complexType>
                <xs:sequence>
                  <xs:group ref="PolymorphicCharDefs"/>
                </xs:sequence>
              </xs:complexType>
            </xs:element>
            <xs:element name="ConceptTrees" minOccurs="0">
              <xs:annotation>
                <xs:documentation xml:lang="en-us">Hierarchies of property, object part, observation methods or other concepts. Concepts can be operationalized by referring to characters (only these allow scoring of data in the descriptions). Concept states (property or kind-of-part, reusable in multiple characters) and char. dependencies are expressed here as well. Concept trees may also be used to define flat character subsets for filtering purposes.</xs:documentation>
              </xs:annotation>
              <xs:complexType>
                <xs:sequence>
                  <xs:element name="ConceptTree" type="ConceptTreeDef" maxOccurs="unbounded">
                    <xs:annotation>
                      <xs:documentation xml:lang="en-us">@@DISCUSS: should concept tree hierarchies be recursively definable, as long as the resulting tree is acyclical?@@
Importantly, this would allow to define generalization and part-of relations between parts/structures!

[ATTR: id]</xs:documentation>
                    </xs:annotation>
                  </xs:element>
                </xs:sequence>
              </xs:complexType>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="NaturalLanguageDescriptions" minOccurs="0">
        <xs:annotation>
          <xs:documentation xml:lang="en-us">Authored or auto-generated
free-form descriptions, which may be completely or partially marked up with elements similar to those in coded descriptions.</xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:element name="NaturalLanguageDescription" type="NaturalLanguageDescription" maxOccurs="unbounded">
              <xs:annotation>
                <xs:documentation xml:lang="en-us">Note: If all coded markup except the Text content is removed, the original natural language text description can be recovered without changes (lossless).
[ATTR: id]</xs:documentation>
              </xs:annotation>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="CodedDescriptions" minOccurs="0">
        <xs:annotation>
          <xs:documentation xml:lang="en-us">Largely language-independent descriptions entirely controlled by Terminology. Both coded and nat. lang. may describe either abstract class concepts (taxon, disease, etc.) or physical objects (individual specimens).</xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:element name="CodedDescription" type="CodedDescription" maxOccurs="unbounded">
              <xs:annotation>
                <xs:documentation xml:lang="en-us">[ATTR: id]</xs:documentation>
              </xs:annotation>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="IdentificationKeys" minOccurs="0">
        <xs:annotation>
          <xs:documentation source="http://160.45.63.11/Projects/TDWG-SDD/docs/SDD_S7_Keys.html" xml:lang="en-us">Dichotomous or multifurcating
authored keys (incl. legacy data)</xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:element name="IdentificationKey" type="StoredKeyDef" maxOccurs="unbounded">
              <xs:annotation>
                <xs:documentation xml:lang="en-us">(Note: Identification keys may also be created dynamically based on data in terminology and descriptions. These keys are intended to represent only manually authored keys, whether from capturing legacy data or newly designed.)
[ATTR: id]</xs:documentation>
              </xs:annotation>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
  <xs:annotation>
    <xs:documentation xml:lang="en-us">==== TERMINOLOGY START ===</xs:documentation>
  </xs:annotation>
  <xs:annotation>
    <xs:documentation xml:lang="en-us">==== -- TERMINOLOGY/GENERAL START ===</xs:documentation>
  </xs:annotation>
  <xs:annotation>
    <xs:documentation xml:lang="en-us">The following types are used in the Terminology/General section. They define generic concepts not in principle restricted to the use in descriptive data.</xs:documentation>
  </xs:annotation>
  <xs:annotation>
    <xs:documentation xml:lang="en-us">--- Audiences are an extension of language/culture codes, to capture expertise and other factors (= registers within a language). </xs:documentation>
  </xs:annotation>
  <xs:complexType name="AudienceDef">
    <xs:annotation>
      <xs:documentation xml:lang="en-us">An Audience is a combination of an enumerated expertise category (pupil, beginner, expert) and a free-form scope definition. As a result, multiple audiences can be defined for the same expertise, distinguished only by their label.</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="Label" type="LabelWithDetails">
        <xs:annotation>
          <xs:documentation xml:lang="en-us">A concise label for the audience; plus optional details clarifying the role / definition of the audience.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:group ref="EnablingGroup" minOccurs="0"/>
      <xs:element name="Specification">
        <xs:annotation>
          <xs:documentation xml:lang="en-us">Properties describing
machine-readable
partial semantics for
an audience definition.</xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:element name="ExpertiseLevel" type="ExpertiseLevelEnum">
              <xs:annotation>
                <xs:documentation xml:lang="en-us">ExpertiseLevel is restricted to values from 0-5. These categories allow to communicate expected expertise between different applications using UBIF. Recommended interpretations:
0 = expertise level undefined
1 = elementary school (year 1 to 6);
2 = middle school (year 7 to 10);
3 = high school (year 11 above) and general public (trying to avoid any specialized terminology or jargon);
4 = university students or (partly) trained personnel (using terminology, but avoiding or explaining problematic terminology);
5 = experts (using the full range of terminology).</xs:documentation>
              </xs:annotation>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
    </xs:sequence>
    <xs:attribute name="audiencekey" type="AudienceRelationID" use="required">
      <xs:annotation>
        <xs:documentation xml:lang="en-us">The value that is referenced whenever an audience="..." attribute is used in audience-specific elements.</xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:anyAttribute namespace="##other" processContents="lax"/>
  </xs:complexType>
  <xs:complexType name="AudienceDefs">
    <xs:annotation>
      <xs:documentation xml:lang="en-us">Collection of AudienceDef-type elements</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="Audience" type="AudienceDef" maxOccurs="unbounded">
        <xs:annotation>
          <xs:documentation xml:lang="en-us">[ATTR: audiencekey]
The audiencekey string is referenced in all audience specific elements (labels, definitions). Recommendation: audience keys should consist of the expertise level from 0-5 (followed by period-number if a second audience for the same language and expertise level is defined). Examples: '0', '3.12'</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="AudienceRef">
    <xs:annotation>
      <xs:documentation xml:lang="en-us">Audience references are always an optional addition to a language reference!</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="LanguageRef">
        <xs:attribute name="audience" type="AudienceRelationID" use="optional"/>
        <xs:anyAttribute namespace="##other" processContents="lax"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:annotation>
    <xs:documentation xml:lang="en-us">(Note: If audience definitions are present, the audience attribute of AudienceRef should be treated as having a default value pointing to the first audience with expertiselevel=0 (undefined). Setting audience "default=0" in schema (together with the keyref identity constraint on audience) would require all documents to have audience definitions, which was considered undesirable.)</xs:documentation>
  </xs:annotation>
  <xs:annotation>
    <xs:documentation xml:lang="en-us">--- Coding status allows to express reasons why data are missing (not coded)</xs:documentation>
  </xs:annotation>
  <xs:complexType name="CodingStatusDef">
    <xs:annotation>
      <xs:documentation xml:lang="en-us">Project-wide definition of CodingStatus values</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="VocabularyW1Base">
        <xs:sequence>
          <xs:element name="Specification">
            <xs:annotation>
              <xs:documentation xml:lang="en-us">Properties describing machine-readable partial semantics for a coding status value. Provided to support generic application code that continues to function if additional codes are defined.</xs:documentation>
            </xs:annotation>
            <xs:complexType>
              <xs:sequence>
                <xs:annotation>
                  <xs:documentation xml:lang="en-us">@@ Both proposals
need elaboration
and discussion!</xs:documentation>
                </xs:annotation>
                <xs:element name="BasicCodingStatus" type="BasicCodingStatusEnum">
                  <xs:annotation>
                    <xs:documentation xml:lang="en-us">To be coded / Not to be coded / Cannot be coded / coded successfully</xs:documentation>
                  </xs:annotation>
                </xs:element>
                <xs:element name="PresenceOfInformation" type="PresenceOfInformationEnum">
                  <xs:annotation>
                    <xs:documentation xml:lang="en-us">NotEvaluated / CannotExist / DoesNotExist / Exists</xs:documentation>
                  </xs:annotation>
                </xs:element>
              </xs:sequence>
            </xs:complexType>
          </xs:element>
        </xs:sequence>
        <xs:attribute name="id" type="CodingStatusRelationID" use="required"/>
        <xs:attributeGroup ref="debugkeyAttribute"/>
        <xs:anyAttribute namespace="##other" processContents="lax"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="BasicCodingStatusEnum">
    <xs:annotation>
      <xs:documentation xml:lang="en-us">Enumeration used in CodingStatus/Specification. These required values enable applications to interprete user-defined coding status values.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:Name">
      <xs:enumeration value="ToBeCoded">
        <xs:annotation>
          <xs:documentation xml:lang="en-us">To Be Coded -- Information has not yet been entered, but is is planned to do so.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="NotToBeCoded">
        <xs:annotation>
          <xs:documentation xml:lang="en-us">Not To Be Coded -- Information has not yet been entered, and is is not planned to do so (esp. because resources are lacking and other characters should have priority).</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CannotBeCoded">
        <xs:annotation>
          <xs:documentation xml:lang="en-us">Cannot Be Coded -- Information cannot be entered due to objective (inapplicable character) or subjective (cannot interpret available data) reasons.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CodedSuccessfully">
        <xs:annotation>
          <xs:documentation xml:lang="en-us">Coded Successfully -- Information has been entered successfully.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="PresenceOfInformationEnum">
    <xs:annotation>
      <xs:documentation xml:lang="en-us">Enumeration used in CodingStatus/Specification. These required values enable applications to interprete user-defined coding status values.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:Name">
      <xs:enumeration value="NotEvaluated">
        <xs:annotation>
          <xs:documentation xml:lang="en-us">Not Evaluated -- The presence of information has not yet been evaluated.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CannotExist">
        <xs:annotation>
          <xs:documentation xml:lang="en-us">Cannot Exist -- Information cannot exist for logical reasons (i. e. a character with a coding status having this value is inapplicable).</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DoesNotExist">
        <xs:annotation>
          <xs:documentation xml:lang="en-us">Does Not Exist -- Information should exist, but extensive research has failed to find it.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Exists">
        <xs:annotation>
          <xs:documentation xml:lang="en-us">Exists -- Information has already been found, but may not yet have been entered.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="CodingStatusRef">
    <xs:annotation>
      <xs:documentation xml:lang="en-us">Refers to CodingStatus values (e. g., from within descriptions)</xs:documentation>
    </xs:annotation>
    <xs:attribute name="ref" type="CodingStatusRelationID" use="required">
      <xs:annotation>
        <xs:documentation xml:lang="en-us">Refers to a CodingStatus value (Terminology/General/CodingStatusValues/Status/@id)</xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attributeGroup ref="debugrefAttribute"/>
    <xs:anyAttribute namespace="##other" processContents="lax"/>
  </xs:complexType>
  <xs:annotation>
    <xs:documentation xml:lang="en-us">==== -- TERMINOLOGY/GENERAL END ===</xs:documentation>
  </xs:annotation>
  <xs:annotation>
    <xs:documentation xml:lang="en-us">-------------------------------- START  Modifiers (uses polymorphism!) ---------------------------</xs:documentation>
  </xs:annotation>
  <xs:annotation>
    <xs:documentation xml:lang="en-us">The modifier type system covers expressions of certainty, frequency, manner, degree, etc. that can be added to existing character value or state expressions. The modifier system is complex and uses abstract base and derived types both for modifier definitions and for references applying these modifiers to statements in descriptions. Quick overview over the primary entry types: Modifiers are defined in ModifierSet elements. Recommended applicability of sets to characters is defined in the concept trees. Single modifiers are applied to descriptive statements using the PolymorphicModification/PolymorphicModificationMarkup groups.</xs:documentation>
  </xs:annotation>
  <xs:annotation>
    <xs:documentation xml:lang="en-us">1. --- Modifier definitions</xs:documentation>
  </xs:annotation>
  <xs:annotation>
    <xs:documentation xml:lang="en-us">a)  Modifiers are grouped into sets because of ranking (ordering) within a set (and for management purposes). All modifiers in a set must be of the same modifier type (e. g., all are frequencies), else ranking would not be meaningful.</xs:documentation>
  </xs:annotation>
  <xs:complexType name="ModifierSet">
    <xs:annotation>
      <xs:documentation xml:lang="en-us">A set of modifiers of a single type that has a label and may define order/rank.for the contained modifiers</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="Label" type="LabelWithDetails">
        <xs:annotation>
          <xs:documentation xml:lang="en-us">Label expressing the concept or scope
of each modifier set.</xs:documentation>
        </xs:annotation>
        <xs:unique name="ModSet_UniqueLabelRepresentation">
          <xs:annotation>
            <xs:documentation xml:lang="en-us">All Representations within a Label must have different language values.</xs:documentation>
          </xs:annotation>
          <xs:selector xpath="Representation"/>
          <xs:field xpath="@language"/>
        </xs:unique>
      </xs:element>
      <xs:element name="ModifiersAreOrdered" type="xs:boolean" default="false" minOccurs="0">
        <xs:annotation>
          <xs:documentation xml:lang="en-us">= 'Modifiers are ranked'. If true, the sequence of modifier elements in instance documents is semantically meaningful (as in 'weakly' - 'moderately' - 'strongly'). If false the sequence is intended for display purposes only. </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:group ref="PolymorphicModifierDefs"/>
    </xs:sequence>
    <xs:attribute name="id" type="ModifierSetRelationID" use="required"/>
    <xs:attributeGroup ref="debugkeyAttribute"/>
  </xs:complexType>
  <xs:complexType name="ModifierSetRef">
    <xs:annotation>
      <xs:documentation xml:lang="en-us">Refers to a ModifierSet, used in ConceptTree//Concept to define recommended modifier sets</xs:documentation>
    </xs:annotation>
    <xs:attribute name="ref" type="ModifierSetRelationID" use="required">
      <xs:annotation>
        <xs:documentation xml:lang="en-us">The ref attribute refers to a modifier set (Terminology/Modifiers/ModifierSet)</xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attributeGroup ref="debugrefAttribute"/>
    <xs:anyAttribute namespace="##other" processContents="lax"/>
  </xs:complexType>
  <xs:annotation>
    <xs:documentation xml:lang="en-us">b) Single modifier definitions. Abstract base type and derived types to be used in instance documents. Note that 'Frequency'Modifier, 'CertaintyModifier', etc. may have been named 'FrequencyModifierDef', etc.; they have been abbreviated to improve the readability of instance documents in case xsi:type would have been used.</xs:documentation>
  </xs:annotation>
  <xs:complexType name="ModifierDef" abstract="true">
    <xs:annotation>
      <xs:documentation xml:lang="en-us">Abstract base type for state or character modifier definitions (certainty, frequency, etc.)</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="VocabularyW2Base">
        <xs:attribute name="id" type="ModifierRelationID" use="required"/>
        <xs:attributeGroup ref="debugkeyAttribute"/>
        <xs:anyAttribute namespace="##other" processContents="lax"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:annotation>
    <xs:documentation xml:lang="en-us">-- Character modifiers:</xs:documentation>
  </xs:annotation>
  <xs:complexType name="CharacterModifierDef" abstract="true">
    <xs:annotation>
      <xs:documentation xml:lang="en-us">Abstract base type for modifiers applicable to character types in principal</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="ModifierDef"/>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="CertaintyModifier">
    <xs:annotation>
      <xs:documentation source="http://160.45.63.11/Projects/TDWG-SDD/docs/SDD_P_ModifierCertainty.html" xml:lang="en-us">Definition of certainty modifiers (perhaps, probably, etc.)</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="CharacterModifierDef">
        <xs:sequence>
          <xs:element name="Specification">
            <xs:complexType>
              <xs:sequence>
                <xs:element name="CertaintyRange" type="ProbabilityEstimateRange">
                  <xs:annotation>
                    <xs:documentation xml:lang="en-us">An estimate of a probability range for verbal modifiers, defined through two attributes. The upper/lower limits of probability modifiers may overlap.
The default values are 0-1, indicating that no estimate was possible.</xs:documentation>
                  </xs:annotation>
                </xs:element>
                <xs:element name="IsTrueByMisinterpretation" type="xs:boolean" default="false" minOccurs="0">
                  <xs:annotation>
                    <xs:documentation source="http://160.45.63.11/Projects/TDWG-SDD/docs/SDD_P_ModifierMisinterpretation.html" xml:lang="en-us">If present and true the current modifier indicates that the state to which it refers is present or true only due to a misinterpretation. The probability range should be 0 to 0 = certainly false.</xs:documentation>
                  </xs:annotation>
                </xs:element>
              </xs:sequence>
            </xs:complexType>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="SpatialModifier">
    <xs:annotation>
      <xs:documentation xml:lang="en-us">Definition of spatial modifiers (proximal, distal, at base, at tip, etc.)</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="CharacterModifierDef">
        <xs:sequence>
          <xs:element name="Specification" minOccurs="0">
            <xs:annotation>
              <xs:documentation xml:lang="en-us">In version SDD 1.0 this element is defined only to support forward compatibility; no specification details are defined for this modifier type yet.</xs:documentation>
            </xs:annotation>
            <xs:complexType>
              <xs:sequence>
                <xs:any namespace="##targetNamespace" processContents="lax" maxOccurs="unbounded"/>
              </xs:sequence>
            </xs:complexType>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="TemporalModifier">
    <xs:annotation>
      <xs:documentation xml:lang="en-us">Definition of temporal modifiers (earlier, later, in summer, in spring, etc.)</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="CharacterModifierDef">
        <xs:sequence>
          <xs:element name="Specification" minOccurs="0">
            <xs:annotation>
              <xs:documentation xml:lang="en-us">In version SDD 1.0 this element is defined only to support forward compatibility; no specification details are defined for this modifier type yet.</xs:documentation>
            </xs:annotation>
            <xs:complexType>
              <xs:sequence>
                <xs:any namespace="##targetNamespace" processContents="lax" maxOccurs="unbounded"/>
              </xs:sequence>
            </xs:complexType>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="OtherModifier">
    <xs:annotation>
      <xs:documentation xml:lang="en-us">Definition of character modifiers not yet covered by the categories above (open extension!)</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="CharacterModifierDef"/>
    </xs:complexContent>
  </xs:complexType>
  <xs:annotation>
    <xs:documentation xml:lang="en-us">-- Categorical state modifiers:</xs:documentation>
  </xs:annotation>
  <xs:complexType name="StateModifierDef" abstract="true">
    <xs:annotation>
      <xs:documentation xml:lang="en-us">Abstract base type for modifiers applicable only to categorical states</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="ModifierDef"/>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="FrequencyModifier">
    <xs:annotation>
      <xs:documentation xml:lang="en-us">Definition of frequency modifiers (rarely, usually, etc.)</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="StateModifierDef">
        <xs:sequence>
          <xs:element name="Specification">
            <xs:complexType>
              <xs:sequence>
                <xs:element name="FrequencyRange" type="ProbabilityEstimateRange">
                  <xs:annotation>
                    <xs:documentation xml:lang="en-us">An estimate of a frequency range for verbal modifiers, defined through two attributes. The upper and lower limits of several frequency modifiers may overlap. The default values are 0-1, indicating that no estimate was possible.</xs:documentation>
                  </xs:annotation>
                </xs:element>
              </xs:sequence>
            </xs:complexType>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="StateModifier">
    <xs:annotation>
      <xs:documentation xml:lang="en-us">Definition of modifiers restricted to single categorical statmenents, esp. modifiers/adverbs of degree and manner (strongly, very, darkly, etc.). (Note: the grammatical concept of adverbs of manner often includes the certainty modifiers, which should not be included here!)</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="StateModifierDef"/>
    </xs:complexContent>
  </xs:complexType>
  <xs:annotation>
    <xs:documentation xml:lang="en-us">- (It is expected that this list may have to be extended in future SDD versions, creating additional specific modifier types for those lumped in OtherModifiers)</xs:documentation>
  </xs:annotation>
  <xs:annotation>
    <xs:documentation xml:lang="en-us">- (Open questions: a) can approximations ('ca.', 'roughly') be handled as CertaintyModifiers or is a separate type desirable? b) should manner, degree, intensity become separate types? c) Specification of spatial and temporal modifiers must be elaborated!)</xs:documentation>
  </xs:annotation>
  <xs:annotation>
    <xs:documentation xml:lang="en-us">c) Collections of modifier definitions. Abstract base type and derived types to be used in instance documents. The ModifierSet type refers to these collections in a polymorphic way. This allows to define a collection of ModifierSet elements, each set containing multiple modifiers of a single modifier type.</xs:documentation>
  </xs:annotation>
  <xs:complexType name="ModifierDefs" abstract="true">
    <xs:annotation>
      <xs:documentation xml:lang="en-us">Abstract base type of a collection of modifiers of a single type. In instance documents one of the following non-abstract types must be used.</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="Modifier" type="ModifierDef" maxOccurs="unbounded">
        <xs:annotation>
          <xs:documentation xml:lang="en-us">(This is an abstract type, 
specific derived types will 
be used in instance documents!)
[ATTR: id]</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
  <xs:annotation>
    <xs:documentation xml:lang="en-us">-- Character modifiers:</xs:documentation>
  </xs:annotation>
  <xs:complexType name="CertaintyModifiers">
    <xs:annotation>
      <xs:documentation xml:lang="en-us">(Collection; derived from ModifierDefs abstract base type, restricted to specific modifier type)</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:restriction base="ModifierDefs">
        <xs:sequence>
          <xs:element name="Modifier" type="CertaintyModifier" maxOccurs="unbounded"/>
        </xs:sequence>
      </xs:restriction>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="SpatialModifiers">
    <xs:annotation>
      <xs:documentation xml:lang="en-us">(Collection; derived from ModifierDefs abstract base type, restricted to specific modifier type)</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:restriction base="ModifierDefs">
        <xs:sequence>
          <xs:element name="Modifier" type="SpatialModifier" maxOccurs="unbounded"/>
        </xs:sequence>
      </xs:restriction>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="TemporalModifiers">
    <xs:annotation>
      <xs:documentation xml:lang="en-us">(Collection; derived from ModifierDefs abstract base type, restricted to specific modifier type)</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:restriction base="ModifierDefs">
        <xs:sequence>
          <xs:element name="Modifier" type="TemporalModifier" maxOccurs="unbounded"/>
        </xs:sequence>
      </xs:restriction>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="OtherModifiers">
    <xs:annotation>
      <xs:documentation xml:lang="en-us">(Collection; derived from ModifierDefs abstract base type, restricted to specific modifier type)</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:restriction base="ModifierDefs">
        <xs:sequence>
          <xs:element name="Modifier" type="OtherModifier" maxOccurs="unbounded"/>
        </xs:sequence>
      </xs:restriction>
    </xs:complexContent>
  </xs:complexType>
  <xs:annotation>
    <xs:documentation xml:lang="en-us">-- Categorical state modifiers:</xs:documentation>
  </xs:annotation>
  <xs:complexType name="FrequencyModifiers">
    <xs:annotation>
      <xs:documentation xml:lang="en-us">(Collection; derived from ModifierDefs abstract base type, restricted to specific modifier type)</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:restriction base="ModifierDefs">
        <xs:sequence>
          <xs:element name="Modifier" type="FrequencyModifier" maxOccurs="unbounded"/>
        </xs:sequence>
      </xs:restriction>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="StateModifiers">
    <xs:annotation>
      <xs:documentation xml:lang="en-us">(Collection; derived from ModifierDefs abstract base type, restricted to specific modifier type)</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:restriction base="ModifierDefs">
        <xs:sequence>
          <xs:element name="Modifier" type="StateModifier" maxOccurs="unbounded"/>
        </xs:sequence>
      </xs:restriction>
    </xs:complexContent>
  </xs:complexType>
  <xs:annotation>
    <xs:documentation xml:lang="en-us">d) Group combining the various derived collection types into a polymorphic structure (options are an explicit choice or the use of base type plus xsi:type).</xs:documentation>
  </xs:annotation>
  <xs:annotation>
    <xs:documentation xml:lang="en-us">(General note: Places in the schema where a polymorphic design is intended (different derived types in place of an abstract base type) are highlighted using model groups the name of which starts with 'Polymorphic'. @@If two similar groups names are present in the schema, only the first will be used, the one starting with '__' shows an alternative design!)</xs:documentation>
  </xs:annotation>
  <xs:group name="__OOP_PolymorphicModifierDefs">
    <xs:annotation>
      <xs:documentation xml:lang="en-us">Collection of modifier definitions of a single type: Point for type polymorphism (multiple derived types in place of an abstract base type)</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="Modifiers" type="ModifierDefs">
        <xs:annotation>
          <xs:documentation xml:lang="en-us">Collection of modifier definitions of a single modifier type. Requires an xsi:type specification in instance documents:
"CertaintyModifiers": express the certainty of categorical or statistical statements ('perhaps', 'probably', 'almost certainly'). 'True-by-misinterpretation'- modifiers are included as a special case of 'certainly false'.
"FrequencyModifiers": used to describe state frequency (usually, rarely, etc.). In descriptions frequency range estimates can also be stated numerically!
"Spatial-/TemporalModifiers": only predefined, no specifications yet! It is believed that specifications may be desirable here in the future. Defining them requires significant work, however.
"OtherModifiers": (manner, degree, intensity; e. g., 'strongly', 'weakly'). These convey their specific semantics only to human consumers (or processors parsing and interpreting label text).</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:group>
  <xs:group name="PolymorphicModifierDefs">
    <xs:annotation>
      <xs:documentation xml:lang="en-us">Collection of modifier definitions of a single type: Point for type polymorphism (multiple derived types in place of an abstract base type)</xs:documentation>
    </xs:annotation>
    <xs:choice>
      <xs:annotation>
        <xs:documentation xml:lang="en-us">(Unlike most
similar poly-
morphisms,
this is not 
a collection; 
each set
may occur
only once.)</xs:documentation>
      </xs:annotation>
      <xs:element name="CertaintyModifiers" type="CertaintyModifiers">
        <xs:annotation>
          <xs:documentation xml:lang="en-us">Express the certainty of categorical or statistical statements ('perhaps', 'probably', 'almost certainly'). 'True-by-misinterpretation'- modifiers are included as a special case of 'certainly false'.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="SpatialModifiers" type="SpatialModifiers">
        <xs:annotation>
          <xs:documentation xml:lang="en-us">Only predefined, no specifications yet! It is believed that specifications may be desirable here in the future. Defining them requires significant work, however.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="TemporalModifiers" type="TemporalModifiers">
        <xs:annotation>
          <xs:documentation xml:lang="en-us">Only predefined, no specifications yet! It is believed that specifications may be desirable here in the future. Defining them requires significant work, however.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="OtherModifiers" type="OtherModifiers">
        <xs:annotation>
          <xs:documentation xml:lang="en-us">Other, so far untyped modifiers of manner, degree, intensity (e. g., 'strongly', 'weakly'). These convey their specific semantics only to human consumers (or processors parsing and interpreting label text).</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="FrequencyModifiers" type="FrequencyModifiers">
        <xs:annotation>
          <xs:documentation xml:lang="en-us">Used to describe state frequency (usually, rarely, etc.). In descriptions frequency range estimates can also be stated numerically!</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="StateModifiers" type="StateModifiers">
        <xs:annotation>
          <xs:documentation xml:lang="en-us">Modifiers of degree or manner, specific to categorical states (very, strongly, etc.).</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:choice>
  </xs:group>
  <xs:annotation>
    <xs:documentation xml:lang="en-us">2. --- Simple Modifier references (used in coded descriptions). </xs:documentation>
  </xs:annotation>
  <xs:annotation>
    <xs:documentation xml:lang="en-us">a) Abstract base types</xs:documentation>
  </xs:annotation>
  <xs:complexType name="StatementModification" abstract="true">
    <xs:annotation>
      <xs:documentation xml:lang="en-us">Abstract base type for an actual modification of a statement. In instance documents the following derived types will be used, either referring to a defined modifier category, or giving explicit numerical ranges/values.</xs:documentation>
    </xs:annotation>
    <xs:attribute name="ref" type="ModifierRelationID" use="required">
      <xs:annotation>
        <xs:documentation xml:lang="en-us">Refers to a any kind of modifier definition type (Terminology/Modifiers/ModifierSet/*/Modifier/@id)</xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attributeGroup ref="debugrefAttribute"/>
    <xs:anyAttribute namespace="##other" processContents="lax"/>
  </xs:complexType>
  <xs:complexType name="CharacterModification" abstract="true">
    <xs:annotation>
      <xs:documentation xml:lang="en-us">Abstract base type including all references to CharacterModifierDef</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="StatementModification"/>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="StateModification" abstract="true">
    <xs:annotation>
      <xs:documentation xml:lang="en-us">Abstract base type including all references to StateModifierDef</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="StatementModification"/>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="StateModificationPlusProbabilities" abstract="true">
    <xs:annotation>
      <xs:documentation xml:lang="en-us">Abstract base type, adding ProbRangeAttributeGroup. Currently used only for Frequency modifiers, where exact frequency values may optionally be given in descriptions.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="StatementModification">
        <xs:attributeGroup ref="ProbRangeAttributeGroup"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:attributeGroup name="ProbRangeAttributeGroup">
    <xs:annotation>
      <xs:documentation xml:lang="en-us">(Attribute modeling group used in StateModificationPlusProbabilities/Markup. In theory the attributes could be inherited from UBIF complex type ProbabilityRange, but this would require multiple inheritance!)</xs:documentation>
    </xs:annotation>
    <xs:attribute name="lower" type="Probability" use="optional" default="0">
      <xs:annotation>
        <xs:documentation xml:lang="en-us">Lower value of a probability range (values 0 to 1 inclusive). Note: to specify a single, exact value set both lower and upper attributes to this value!</xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="upper" type="Probability" use="optional" default="1">
      <xs:annotation>
        <xs:documentation xml:lang="en-us">Upper value of a probability range (values 0 to 1 inclusive). Note: to specify a single, exact value set both lower and upper attributes to this value!</xs:documentation>
      </xs:annotation>
    </xs:attribute>
  </xs:attributeGroup>
  <xs:annotation>
    <xs:documentation xml:lang="en-us">b)  Derived types to be used in instance documents. Note that 'Frequency', 'Certainty', etc. may have been named 'FrequencyModifierRef', 'CertaintyModifierRef', etc.; they have been abbreviated to improve the readability of instance documents in case xsi:type would have been used.</xs:documentation>
  </xs:annotation>
  <xs:annotation>
    <xs:documentation xml:lang="en-us">-- Reference to character modifiers:</xs:documentation>
  </xs:annotation>
  <xs:complexType name="Certainty">
    <xs:annotation>
      <xs:documentation xml:lang="en-us">Refers to a certainty character modifier</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:restriction base="CharacterModification">
        <xs:attribute name="ref" type="ModifierRelationID">
          <xs:annotation>
            <xs:documentation xml:lang="en-us">Refers to a certainty modifier (Terminology/Modifiers/ModifierSet/CertaintyModifiers/Modifier/@id)</xs:documentation>
          </xs:annotation>
        </xs:attribute>
      </xs:restriction>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Spatial">
    <xs:annotation>
      <xs:documentation xml:lang="en-us">Refers to a spatial character modifier</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:restriction base="CharacterModification">
        <xs:attribute name="ref" type="ModifierRelationID">
          <xs:annotation>
            <xs:documentation xml:lang="en-us">Refers to a spatial modifier (Terminology/Modifiers/ModifierSet/SpatialModifiers/Modifier/@id)</xs:documentation>
          </xs:annotation>
        </xs:attribute>
      </xs:restriction>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Temporal">
    <xs:annotation>
      <xs:documentation xml:lang="en-us">Refers to a temporal character modifier</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:restriction base="CharacterModification">
        <xs:attribute name="ref" type="ModifierRelationID">
          <xs:annotation>
            <xs:documentation xml:lang="en-us">Refers to a "Temporal" modifier (Terminology/Modifiers/ModifierSet/TemporalModifiers/Modifier/@id)</xs:documentation>
          </xs:annotation>
        </xs:attribute>
      </xs:restriction>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="OtherMod">
    <xs:annotation>
      <xs:documentation xml:lang="en-us">Refers to a character modifier not covered by the types above</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:restriction base="CharacterModification">
        <xs:attribute name="ref" type="ModifierRelationID">
          <xs:annotation>
            <xs:documentation xml:lang="en-us">Refers to an "OtherModifer" modifier (Terminology/Modifiers/ModifierSet/OtherModifers/Modifier/@id)</xs:documentation>
          </xs:annotation>
        </xs:attribute>
      </xs:restriction>
    </xs:complexContent>
  </xs:complexType>
  <xs:annotation>
    <xs:documentation xml:lang="en-us">-- Reference to categorical state modifiers:</xs:documentation>
  </xs:annotation>
  <xs:complexType name="Frequency">
    <xs:annotation>
      <xs:documentation xml:lang="en-us">Refers to a frequency modifier (e. g., from within categorical character data)</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:restriction base="StateModificationPlusProbabilities">
        <xs:attribute name="ref" type="ModifierRelationID">
          <xs:annotation>
            <xs:documentation xml:lang="en-us">Refers to a Frequency modifier (Terminology/Modifiers/ModifierSet/FrequencyModifiers/Modifier/@id)</xs:documentation>
          </xs:annotation>
        </xs:attribute>
      </xs:restriction>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="StateMod">
    <xs:annotation>
      <xs:documentation xml:lang="en-us">Refers to a state modifier (e. g., from within categorical character data)</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:restriction base="StateModification">
        <xs:attribute name="ref" type="ModifierRelationID">
          <xs:annotation>
            <xs:documentation xml:lang="en-us">Refers to an "StateModifer" modifier (Terminology/Modifiers/ModifierSet/StateModifiers/Modifier/@id)</xs:documentation>
          </xs:annotation>
        </xs:attribute>
      </xs:restriction>
    </xs:complexContent>
  </xs:complexType>
  <xs:annotation>
    <xs:documentation xml:lang="en-us">c) Groups combining the various derived types into a polymorphic structure (options are an explicit choice or the use of base type plus xsi:type).</xs:documentation>
  </xs:annotation>
  <xs:group name="__OOP_PolymorphicCharModification">
    <xs:annotation>
      <xs:documentation xml:lang="en-us">Modifier reference in CodedDescr.: Point for type polymorphism (multiple derived types in place of an abstract base type)</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:annotation>
        <xs:documentation xml:lang="en-us">(The element 
sequence in 
instance 
documents 
is informative!)</xs:documentation>
      </xs:annotation>
      <xs:element name="Modifier" type="CharacterModification" minOccurs="0" maxOccurs="unbounded">
        <xs:annotation>
          <xs:documentation xml:lang="en-us">Abstract modifier reference, applying a modifier to a descriptive statement. In instance documents a specific derived type must be used.
[ATTR: ref]</xs:documentation>
        </xs:annotation>
        <xs:keyref name="CharMod_ModifierKeyref_" refer="ModifierKey">
          <xs:selector xpath="."/>
          <xs:field xpath="@ref"/>
        </xs:keyref>
      </xs:element>
    </xs:sequence>
  </xs:group>
  <xs:group name="PolymorphicCharModification">
    <xs:annotation>
      <xs:documentation xml:lang="en-us">Modifier reference in CodedDescr.: Point for type polymorphism (multiple derived types in place of an abstract base type).
In object-oriented programming the following choice should be replaced with a polymorphic design, using a collection of the common base type!</xs:documentation>
    </xs:annotation>
    <xs:choice maxOccurs="unbounded">
      <xs:annotation>
        <xs:documentation xml:lang="en-us">(The element 
sequence in 
instance 
documents 
is informative!)</xs:documentation>
      </xs:annotation>
      <xs:element name="Certainty" type="Certainty">
        <xs:keyref name="Certainty_ModifierKeyref" refer="ModifierKey">
          <xs:selector xpath="."/>
          <xs:field xpath="@ref"/>
        </xs:keyref>
      </xs:element>
      <xs:element name="Spatial" type="Spatial">
        <xs:keyref name="Spatial_ModifierKeyref" refer="ModifierKey">
          <xs:selector xpath="."/>
          <xs:field xpath="@ref"/>
        </xs:keyref>
      </xs:element>
      <xs:element name="Temporal" type="Temporal">
        <xs:keyref name="Temporal_ModifierKeyref" refer="ModifierKey">
          <xs:selector xpath="."/>
          <xs:field xpath="@ref"/>
        </xs:keyref>
      </xs:element>
      <xs:element name="OtherModifier" type="OtherMod">
        <xs:annotation>
          <xs:documentation xml:lang="en-us">[ATTR: ref (= for all elements above)]</xs:documentation>
        </xs:annotation>
        <xs:keyref name="OtherMod_ModifierKeyref" refer="ModifierKey">
          <xs:selector xpath="."/>
          <xs:field xpath="@ref"/>
        </xs:keyref>
      </xs:element>
    </xs:choice>
  </xs:group>
  <xs:group name="__OOP_PolymorphicStateModification">
    <xs:annotation>
      <xs:documentation xml:lang="en-us">Modifier reference or value in CodedDescr.: Point for type polymorphism (multiple derived types in place of an abstract base type)</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:annotation>
        <xs:documentation xml:lang="en-us">(The element 
sequence in 
instance 
documents 
is not
informative!)</xs:documentation>
      </xs:annotation>
      <xs:element name="Modifier" type="StateModification" minOccurs="0" maxOccurs="2">
        <xs:annotation>
          <xs:documentation xml:lang="en-us">Abstract modifier reference, applying a modifier to a single categorical state. In instance documents a specific derived type must be given (e. g., xsi:type = 'Frequency').
[ATTR: ref, and depending on derived type: lower/upper]</xs:documentation>
        </xs:annotation>
        <xs:keyref name="StateModAbstract_ModifierKeyref" refer="ModifierKey">
          <xs:selector xpath="."/>
          <xs:field xpath="@ref"/>
        </xs:keyref>
      </xs:element>
    </xs:sequence>
  </xs:group>
  <xs:group name="PolymorphicStateModification">
    <xs:annotation>
      <xs:documentation xml:lang="en-us">Modifier reference or value in CodedDescr.: Point for type polymorphism (multiple derived types in place of an abstract base type)</xs:documentation>
    </xs:annotation>
    <xs:sequence minOccurs="0">
      <xs:annotation>
        <xs:documentation xml:lang="en-us">Currently limited to a single frequency and modifier per state, in an explicit attempt to simplify the SDD data model! </xs:documentation>
      </xs:annotation>
      <xs:element name="Frequency" type="Frequency" minOccurs="0">
        <xs:keyref name="Frequency_ModifierKeyref" refer="ModifierKey">
          <xs:selector xpath="."/>
          <xs:field xpath="@ref"/>
        </xs:keyref>
      </xs:element>
      <xs:element name="Modifier" type="StateMod" minOccurs="0">
        <xs:annotation>
          <xs:documentation xml:lang="en-us">[ATTR: ref (= for all elements above)]</xs:documentation>
        </xs:annotation>
        <xs:keyref name="StateMod_ModifierKeyref" refer="ModifierKey">
          <xs:selector xpath="."/>
          <xs:field xpath="@ref"/>
        </xs:keyref>
      </xs:element>
      <xs:element name="Note" type="ReportedNote" minOccurs="0">
        <xs:annotation>
          <xs:documentation xml:lang="en-us">Public notes or comments,
for multiple languages.
Applications may, e. g.,
report the text in brackets
after the character state.</xs:documentation>
        </xs:annotation>
        <xs:unique name="StateData_UniqueNoteRepresentation">
          <xs:annotation>
            <xs:documentation xml:lang="en-us">The audience values must uniquely identify the Representations within each Note element (no duplicate audience allowed).</xs:documentation>
          </xs:annotation>
          <xs:selector xpath="Representation"/>
          <xs:field xpath="@language"/>
          <xs:field xpath="@audience"/>
        </xs:unique>
      </xs:element>
      <xs:element name="__IsTemplate" type="xs:boolean" default="false" minOccurs="0">
        <xs:annotation>
          <xs:documentation xml:lang="en-us">Flag states, which applications may use as a template for new descriptions. Templates may be categorical states or coding status values (but currently not measures). Rules for finding templates: a) For class description (i. e. using Header/ClassName) find all higher classes (according to ClassHierarchy) and copy the template states from there. b) For unit/object description (Header/Unit) find the Class assigned to the Unit and copy template states directly from this class (@ and higher classes?).
It is expected that the scoring is revised by an expert; thus template states may be defined in cases where they apply only to the majority of subclasses. 
@@Can this perhaps be handled by new kind of CodingStatus instead?@@</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:group>
  <xs:annotation>
    <xs:documentation xml:lang="en-us">3. --- Modifier references extended with Text element (used in natural language markup). </xs:documentation>
  </xs:annotation>
  <xs:annotation>
    <xs:documentation xml:lang="en-us">a) Abstract base types</xs:documentation>
  </xs:annotation>
  <xs:complexType name="StatementModificationMarkup" abstract="true">
    <xs:annotation>
      <xs:documentation xml:lang="en-us">Abstract base type adding a Text element for markup</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="StatementModification">
        <xs:sequence>
          <xs:element name="Text" type="MarkupText"/>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="CharacterModificationMarkup" abstract="true">
    <xs:annotation>
      <xs:documentation xml:lang="en-us">Abstract base type including all references to CharacterModifierDef</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="StatementModificationMarkup"/>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="StateModificationMarkup" abstract="true">
    <xs:annotation>
      <xs:documentation xml:lang="en-us">Abstract base type including all references to StateModifierDef</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="StatementModificationMarkup"/>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="StateModificationPlusProbabilitiesMarkup" abstract="true">
    <xs:annotation>
      <xs:documentation xml:lang="en-us">Abstract base type, adding ProbRangeAttributeGroup. Currently used only for Frequency modifiers, where exact frequency values may optionally be given in descriptions.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="StateModificationMarkup">
        <xs:attributeGroup ref="ProbRangeAttributeGroup"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:annotation>
    <xs:documentation xml:lang="en-us">b) Derived types to be used in instance documents. Note: each of the derived types could alternatively be derived from the simple reference (CertaintyMarkup from Certainty, etc.). To allow a polymorphic collection of any markup modifier type, all are derived from the abstract StatementModificationMarkup type, however.</xs:documentation>
  </xs:annotation>
  <xs:annotation>
    <xs:documentation xml:lang="en-us">The derivation by restriction currently changes only the annotation of the ref attribute! To make it more specific, a future schema version could use modifier-specific simple types derived from ModifierRelationID as types of the ref attribute.</xs:documentation>
  </xs:annotation>
  <xs:annotation>
    <xs:documentation xml:lang="en-us">-- Reference to character modifiers:</xs:documentation>
  </xs:annotation>
  <xs:complexType name="CertaintyMarkup">
    <xs:annotation>
      <xs:documentation xml:lang="en-us">Variant of Certainty (modifier reference), with Text inside.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:restriction base="CharacterModificationMarkup">
        <xs:sequence>
          <xs:element name="Text" type="MarkupText"/>
        </xs:sequence>
        <xs:attribute name="ref" type="ModifierRelationID">
          <xs:annotation>
            <xs:documentation xml:lang="en-us">Refers to a Certainty modifier (Terminology/Modifiers/ModifierSet/CertaintyModifiers/Modifier/@id)</xs:documentation>
          </xs:annotation>
        </xs:attribute>
      </xs:restriction>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="SpatialMarkup">
    <xs:annotation>
      <xs:documentation xml:lang="en-us">Variant of Spatial (modifier reference), with Text inside.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:restriction base="CharacterModificationMarkup">
        <xs:sequence>
          <xs:element name="Text" type="MarkupText"/>
        </xs:sequence>
        <xs:attribute name="ref" type="ModifierRelationID">
          <xs:annotation>
            <xs:documentation xml:lang="en-us">Refers to a Spatial modifier (Terminology/Modifiers/ModifierSet/SpatialModifiers/Modifier/@id)</xs:documentation>
          </xs:annotation>
        </xs:attribute>
      </xs:restriction>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="TemporalMarkup">
    <xs:annotation>
      <xs:documentation xml:lang="en-us">Variant of Temporal (modifier reference), with Text inside.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:restriction base="CharacterModificationMarkup">
        <xs:sequence>
          <xs:element name="Text" type="MarkupText"/>
        </xs:sequence>
        <xs:attribute name="ref" type="ModifierRelationID">
          <xs:annotation>
            <xs:documentation xml:lang="en-us">Refers to a "Temporal" modifier (Terminology/Modifiers/ModifierSet/TemporalModifiers/Modifier/@id)</xs:documentation>
          </xs:annotation>
        </xs:attribute>
      </xs:restriction>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="OtherModMarkup">
    <xs:annotation>
      <xs:documentation xml:lang="en-us">Variant of OtherMod (modifier reference), with Text inside.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:restriction base="CharacterModificationMarkup">
        <xs:sequence>
          <xs:element name="Text" type="MarkupText"/>
        </xs:sequence>
        <xs:attribute name="ref" type="ModifierRelationID">
          <xs:annotation>
            <xs:documentation xml:lang="en-us">Refers to an "OtherModifer" modifier (Terminology/Modifiers/ModifierSet/OtherModifers/Modifier/@id)</xs:documentation>
          </xs:annotation>
        </xs:attribute>
      </xs:restriction>
    </xs:complexContent>
  </xs:complexType>
  <xs:annotation>
    <xs:documentation xml:lang="en-us">-- Reference to categorical state modifiers:</xs:documentation>
  </xs:annotation>
  <xs:complexType name="FrequencyMarkup">
    <xs:annotation>
      <xs:documentation xml:lang="en-us">Variant of Frequency (modifier reference), with Text inside.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:restriction base="StateModificationPlusProbabilitiesMarkup">
        <xs:sequence>
          <xs:element name="Text" type="MarkupText"/>
        </xs:sequence>
        <xs:attribute name="ref" type="ModifierRelationID">
          <xs:annotation>
            <xs:documentation xml:lang="en-us">Refers to a Frequency modifier (Terminology/Modifiers/ModifierSet/FrequencyModifiers/Modifier/@id)</xs:documentation>
          </xs:annotation>
        </xs:attribute>
      </xs:restriction>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="StateModMarkup">
    <xs:annotation>
      <xs:documentation xml:lang="en-us">Variant of StateMod (modifier reference), with Text inside.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:restriction base="StateModificationMarkup">
        <xs:sequence>
          <xs:element name="Text" type="MarkupText"/>
        </xs:sequence>
        <xs:attribute name="ref" type="ModifierRelationID">
          <xs:annotation>
            <xs:documentation xml:lang="en-us">Refers to an "OtherModifer" modifier (Terminology/Modifiers/ModifierSet/StateModifers/Modifier/@id)</xs:documentation>
          </xs:annotation>
        </xs:attribute>
      </xs:restriction>
    </xs:complexContent>
  </xs:complexType>
  <xs:annotation>
    <xs:documentation xml:lang="en-us">c) Groups combining the various derived types into a polymorphic structure (options are an explicit choice or the use of base type plus xsi:type).</xs:documentation>
  </xs:annotation>
  <xs:group name="__OOP_PolymorphicCharModificationMarkup">
    <xs:annotation>
      <xs:documentation xml:lang="en-us">Modifier reference in NLD: Point for type polymorphism (multiple derived types in place of an abstract base type)</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:annotation>
        <xs:documentation xml:lang="en-us">(The element 
sequence in 
instance 
documents 
is informative!)</xs:documentation>
      </xs:annotation>
      <xs:element name="Mod" type="CharacterModificationMarkup" minOccurs="0" maxOccurs="unbounded">
        <xs:annotation>
          <xs:documentation xml:lang="en-us">Abstract modifier reference, applying a modifier to a descriptive statement. In instance documents, a specific derived type must be specified (e. g., xsi:type = 'FrequencyMarkup').
[ATTR: ref, and depending on derived type: lower/upper]</xs:documentation>
        </xs:annotation>
        <xs:keyref name="CharModMarkup_ModifierKeyref" refer="ModifierKey">
          <xs:selector xpath="."/>
          <xs:field xpath="@ref"/>
        </xs:keyref>
      </xs:element>
    </xs:sequence>
  </xs:group>
  <xs:group name="PolymorphicCharModificationMarkup">
    <xs:annotation>
      <xs:documentation xml:lang="en-us">Modifier reference in NLD: Point for type polymorphism (multiple derived types in place of an abstract base type)</xs:documentation>
    </xs:annotation>
    <xs:choice maxOccurs="unbounded">
      <xs:annotation>
        <xs:documentation xml:lang="en-us">(The element 
sequence in 
instance 
documents 
is informative!)</xs:documentation>
      </xs:annotation>
      <xs:element name="Certainty" type="CertaintyMarkup">
        <xs:keyref name="CertaintyMarkup_ModifierKeyref" refer="ModifierKey">
          <xs:selector xpath="."/>
          <xs:field xpath="@ref"/>
        </xs:keyref>
      </xs:element>
      <xs:element name="Spatial" type="SpatialMarkup">
        <xs:keyref name="SpatialMarkup_ModifierKeyref" refer="ModifierKey">
          <xs:selector xpath="."/>
          <xs:field xpath="@ref"/>
        </xs:keyref>
      </xs:element>
      <xs:element name="Temporal" type="TemporalMarkup">
        <xs:keyref name="TemporalMarkup_ModifierKeyref" refer="ModifierKey">
          <xs:selector xpath="."/>
          <xs:field xpath="@ref"/>
        </xs:keyref>
      </xs:element>
      <xs:element name="Other" type="OtherModMarkup">
        <xs:annotation>
          <xs:documentation xml:lang="en-us">[ATTR: ref (= for all elements above)]</xs:documentation>
        </xs:annotation>
        <xs:keyref name="OtherModMarkup_ModifierKeyref" refer="ModifierKey">
          <xs:selector xpath="."/>
          <xs:field xpath="@ref"/>
        </xs:keyref>
      </xs:element>
    </xs:choice>
  </xs:group>
  <xs:group name="__OOP_PolymorphicStateModificationMarkup">
    <xs:annotation>
      <xs:documentation xml:lang="en-us">Modifier reference or value in NLD: Point for type polymorphism (multiple derived types in place of an abstract base type)</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:annotation>
        <xs:documentation xml:lang="en-us">(The element 
sequence in 
instance 
documents 
is informative!)</xs:documentation>
      </xs:annotation>
      <xs:element name="Mod" type="StateModificationMarkup" minOccurs="0" maxOccurs="unbounded">
        <xs:annotation>
          <xs:documentation xml:lang="en-us">Abstract modifier reference, applying a modifier to a descriptive statement.In instance documents, a specific derived type must be specified (e. g., xsi:type = 'FrequencyMarkup').
[ATTR: ref, and depending on derived type: lower/upper]</xs:documentation>
        </xs:annotation>
        <xs:keyref name="AbstractStateMarkup_ModifierKeyref" refer="ModifierKey">
          <xs:selector xpath="."/>
          <xs:field xpath="@ref"/>
        </xs:keyref>
      </xs:element>
    </xs:sequence>
  </xs:group>
  <xs:group name="PolymorphicStateModificationMarkup">
    <xs:annotation>
      <xs:documentation xml:lang="en-us">Modifier reference or value in NLD: Point for type polymorphism (multiple derived types in place of an abstract base type)</xs:documentation>
    </xs:annotation>
    <xs:choice maxOccurs="unbounded">
      <xs:annotation>
        <xs:documentation xml:lang="en-us">(The element 
sequence in 
instance 
documents 
is informative!)</xs:documentation>
      </xs:annotation>
      <xs:element name="Frequency" type="FrequencyMarkup">
        <xs:keyref name="FrequencyMarkup_ModifierKeyref" refer="ModifierKey">
          <xs:selector xpath="."/>
          <xs:field xpath="@ref"/>
        </xs:keyref>
      </xs:element>
      <xs:element name="Modifier" type="StateModMarkup">
        <xs:annotation>
          <xs:documentation xml:lang="en-us">[ATTR: ref (= for all elements above)]</xs:documentation>
        </xs:annotation>
        <xs:keyref name="StateMarkup_ModifierKeyref" refer="ModifierKey">
          <xs:selector xpath="."/>
          <xs:field xpath="@ref"/>
        </xs:keyref>
      </xs:element>
    </xs:choice>
  </xs:group>
  <xs:annotation>
    <xs:documentation xml:lang="en-us">-------------------------------- END  Modifiers ---------------------------</xs:documentation>
  </xs:annotation>
  <xs:annotation>
    <xs:documentation xml:lang="en-us">==== GLOSSARY START ===</xs:documentation>
  </xs:annotation>
  <xs:annotation>
    <xs:documentation xml:lang="en-us">Glossary entries are largely (but not exclusively) defined by audience-specific representations</xs:documentation>
  </xs:annotation>
  <xs:complexType name="GlossaryEntry">
    <xs:annotation>
      <xs:documentation xml:lang="en-us">An entry in the terminological
glossary, providing an attribute
"id" by which the entry can
be referred to.</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="Label">
        <xs:annotation>
          <xs:documentation xml:lang="en-us">Audience-specific
representations of
a glossary entry.</xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:element name="Representation" type="GlossaryEntryRepr" maxOccurs="unbounded">
              <xs:annotation>
                <xs:documentation xml:lang="en-us">All audience-specific versions must define the same concept. If, for example, a fructification would be considered a 'berry' in French but not in Chinese (i. e. the definitions have different widths) and both concepts are used in different descriptions in a project, these concepts must be placed in different GlossaryEntry elements (not in different Representations).The different concepts could still be translated the to other languages (term allows phrases as well as words).
[ATTR: audience]</xs:documentation>
              </xs:annotation>
              <xs:keyref name="GlossEntry_AudienceKeyref" refer="AudienceKey">
                <xs:selector xpath="."/>
                <xs:field xpath="@audience"/>
              </xs:keyref>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="Citations" type="Citations" minOccurs="0">
        <xs:annotation>
          <xs:documentation xml:lang="en-us">Multiple citations
(publication +
page number)</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="RevisionData" type="RevisionData" minOccurs="0">
        <xs:annotation>
          <xs:documentation xml:lang="en-us">Creators, Revision
status, and dates of
this audience-specific
glossary definition.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="__KindOfTerm" type="GlossaryKindOfTermEnum" minOccurs="0">
        <xs:annotation>
          <xs:documentation xml:lang="en-us">Constrained vocabulary (Structure, PropertyTerm, FunctionalConcept, MethodOrProcedure, ChemicalCompound, Modifier, NomenclatureTerm, OtherTerm)
@@ Please comment on necessity of this! @@</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="__Ontology" minOccurs="0">
        <xs:annotation>
          <xs:documentation xml:lang="en-us">Ontological relations</xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:element name="General" minOccurs="0">
              <xs:annotation>
                <xs:documentation xml:lang="en-us">General relations
between terms</xs:documentation>
              </xs:annotation>
              <xs:complexType>
                <xs:sequence>
                  <xs:element name="KindOf" type="GlossaryEntryRefs" minOccurs="0">
                    <xs:annotation>
                      <xs:documentation xml:lang="en-us">Kind-of or is-a relationship
(class inheritance hierarchy). This may inform about structures (a sepal is a kind of leaf), properties (metallic color is a kind of color, 2-dimensional shape is a kind of shape), property states (ochre is a kind of brown, subglobose is a kind globose), functional terms (anther is kind-of sexual organ) etc. {directional!}</xs:documentation>
                    </xs:annotation>
                    <xs:unique name="GlossaryEntry_UniqueKindOfTerms">
                      <xs:annotation>
                        <xs:documentation xml:lang="en-us">Each concept term may occur only once in the collection.</xs:documentation>
                      </xs:annotation>
                      <xs:selector xpath="Term"/>
                      <xs:field xpath="@id"/>
                    </xs:unique>
                  </xs:element>
                  <xs:element name="SynonymousTo" type="GlossaryEntryRefs" minOccurs="0">
                    <xs:annotation>
                      <xs:documentation xml:lang="en-us">Terms that have identical or nearly identical definition (e. g., technical terminology and plain English equivalent). {bidirectional}</xs:documentation>
                    </xs:annotation>
                    <xs:unique name="GlossaryEntry_UniqueSynonymTerms">
                      <xs:annotation>
                        <xs:documentation xml:lang="en-us">Each concept term may occur only once in the collection.</xs:documentation>
                      </xs:annotation>
                      <xs:selector xpath="Term"/>
                      <xs:field xpath="@id"/>
                    </xs:unique>
                  </xs:element>
                  <xs:element name="AntonymousTo" type="GlossaryEntryRefs" minOccurs="0">
                    <xs:annotation>
                      <xs:documentation xml:lang="en-us">A term of opposite meaning. Usually a single term, but may refer to two synonymous terms. {bidirectional}</xs:documentation>
                    </xs:annotation>
                    <xs:unique name="GlossaryEntry_UniqueAntonymTerms">
                      <xs:annotation>
                        <xs:documentation xml:lang="en-us">Each concept term may occur only once in the collection.</xs:documentation>
                      </xs:annotation>
                      <xs:selector xpath="Term"/>
                      <xs:field xpath="@id"/>
                    </xs:unique>
                  </xs:element>
                  <xs:element name="RelatedTo" type="GlossaryEntryRefs" minOccurs="0">
                    <xs:annotation>
                      <xs:documentation xml:lang="en-us">Related concepts and terms. Used to express unspecific relations not yet expressed in the previous relationships. The list of related terms may also be viewed as a keywords list! {bidirectional}</xs:documentation>
                    </xs:annotation>
                    <xs:unique name="GlossaryEntry_UniqueRelatedTerms">
                      <xs:annotation>
                        <xs:documentation xml:lang="en-us">Each concept term may occur only once in the collection.</xs:documentation>
                      </xs:annotation>
                      <xs:selector xpath="Term"/>
                      <xs:field xpath="@id"/>
                    </xs:unique>
                  </xs:element>
                  <xs:element name="MisinterpretableAs" type="GlossaryEntryRefs" minOccurs="0">
                    <xs:annotation>
                      <xs:documentation xml:lang="en-us">Misinterpretations are especially interesting to improve error tolerance in identifications. May refer to structure and property terms. Example: Cyathium is misinterpretable-as flower.
@@?? necessary in addition to structural kind-of relations?
{directional}</xs:documentation>
                    </xs:annotation>
                    <xs:unique name="GlossaryEntry_UniqueMisinterprTerms">
                      <xs:annotation>
                        <xs:documentation xml:lang="en-us">Each concept term may occur only once in the collection.</xs:documentation>
                      </xs:annotation>
                      <xs:selector xpath="Term"/>
                      <xs:field xpath="@id"/>
                    </xs:unique>
                  </xs:element>
                </xs:sequence>
              </xs:complexType>
            </xs:element>
            <xs:element name="Topological" minOccurs="0">
              <xs:annotation>
                <xs:documentation xml:lang="en-us">(applicable
only to parts/structures)</xs:documentation>
              </xs:annotation>
              <xs:complexType>
                <xs:sequence>
                  <xs:element name="PartOf" type="GlossaryEntryRefs" minOccurs="0">
                    <xs:annotation>
                      <xs:documentation xml:lang="en-us">Part-of (= aggregation) relationship
(class composition hierarchy). Notes: Both KindOf and PartOf relationships define 'broader terms'. Multiple part-of parents are possible if different composition concepts exist. {directional!}</xs:documentation>
                    </xs:annotation>
                    <xs:unique name="GlossaryEntry_UniquePartOfTerms">
                      <xs:annotation>
                        <xs:documentation xml:lang="en-us">Each concept term may occur only once in the collection.</xs:documentation>
                      </xs:annotation>
                      <xs:selector xpath="Term"/>
                      <xs:field xpath="@id"/>
                    </xs:unique>
                  </xs:element>
                  <xs:element name="__AdjacentTo" type="GlossaryEntryRefs" minOccurs="0">
                    <xs:annotation>
                      <xs:documentation xml:lang="en-us">Only for structures. Example: The thumb is adjacent to the index finger, connected to the palm of the hand, and part of the hand. {bidirectional}
{@@This term seems to be particularly problematic and will not be included in the first release of SDD}</xs:documentation>
                    </xs:annotation>
                    <xs:unique name="GlossaryEntry_UniqueAdjToTerms">
                      <xs:annotation>
                        <xs:documentation xml:lang="en-us">Each concept term may occur only once in the collection.</xs:documentation>
                      </xs:annotation>
                      <xs:selector xpath="Term"/>
                      <xs:field xpath="@id"/>
                    </xs:unique>
                  </xs:element>
                  <xs:element name="ConnectedTo" type="GlossaryEntryRefs" minOccurs="0">
                    <xs:annotation>
                      <xs:documentation xml:lang="en-us">Only for structures. Example: The thumb is adjacent to the index finger, connected to the palm of the hand, and part of the hand. {bidirectional}</xs:documentation>
                    </xs:annotation>
                    <xs:unique name="GlossaryEntry_UniqueConnectedToTerms">
                      <xs:annotation>
                        <xs:documentation xml:lang="en-us">Each concept term may occur only once in the collection.</xs:documentation>
                      </xs:annotation>
                      <xs:selector xpath="Term"/>
                      <xs:field xpath="@id"/>
                    </xs:unique>
                  </xs:element>
                </xs:sequence>
              </xs:complexType>
            </xs:element>
            <xs:element name="Temporal" minOccurs="0">
              <xs:annotation>
                <xs:documentation xml:lang="en-us">Developmental and
evolutionary relations</xs:documentation>
              </xs:annotation>
              <xs:complexType>
                <xs:sequence>
                  <xs:element name="OntogeneticallyDerivedFrom" type="GlossaryEntryRefs" minOccurs="0">
                    <xs:annotation>
                      <xs:documentation xml:lang="en-us">To express developmental (temporal, = "develops from") processes that change one structure into another. Examples: seedling develops-from seed; zygote develops-from male and female gametes (i. e. multiple parent terms).{directional!}</xs:documentation>
                    </xs:annotation>
                    <xs:unique name="GlossaryEntry_UniqueDevelopsFromTerms">
                      <xs:annotation>
                        <xs:documentation xml:lang="en-us">Each concept term may occur only once in the collection.</xs:documentation>
                      </xs:annotation>
                      <xs:selector xpath="Term"/>
                      <xs:field xpath="@id"/>
                    </xs:unique>
                  </xs:element>
                  <xs:element name="PhylogeneticallyDerivedFrom" type="GlossaryEntryRefs" minOccurs="0">
                    <xs:annotation>
                      <xs:documentation xml:lang="en-us">All children and the parent are homologous. Usually applied to structure terms. {directional}</xs:documentation>
                    </xs:annotation>
                    <xs:unique name="GlossaryEntry_UniquePhylDerivedTerms">
                      <xs:annotation>
                        <xs:documentation xml:lang="en-us">Each concept term may occur only once in the collection.</xs:documentation>
                      </xs:annotation>
                      <xs:selector xpath="Term"/>
                      <xs:field xpath="@id"/>
                    </xs:unique>
                  </xs:element>
                  <xs:element name="HomologousTo" type="GlossaryEntryRefs" minOccurs="0">
                    <xs:annotation>
                      <xs:documentation xml:lang="en-us">Used as an alternative to Phyl.- DerivedFrom if no ancestral term is available. {bidirectional}</xs:documentation>
                    </xs:annotation>
                    <xs:unique name="GlossaryEntry_UniqueHomologousTerms">
                      <xs:annotation>
                        <xs:documentation xml:lang="en-us">Each concept term may occur only once in the collection.</xs:documentation>
                      </xs:annotation>
                      <xs:selector xpath="Term"/>
                      <xs:field xpath="@id"/>
                    </xs:unique>
                  </xs:element>
                </xs:sequence>
              </xs:complexType>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:group ref="EnablingGroup" minOccurs="0"/>
    </xs:sequence>
    <xs:attribute name="id" type="GlossaryRelationID" use="required"/>
    <xs:attributeGroup ref="debugkeyAttribute"/>
    <xs:anyAttribute namespace="##other" processContents="lax"/>
  </xs:complexType>
  <xs:complexType name="GlossaryEntryRepr">
    <xs:annotation>
      <xs:documentation xml:lang="en-us">Audience-specific definitions primarily aimed at human consumption, but with the intent to be useful to computer linguistic ontological agents as well.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="AudienceRef">
        <xs:sequence>
          <xs:element name="Term" type="String255">
            <xs:annotation>
              <xs:documentation xml:lang="en-us">The head term (phrase of one to several words) representing the concept (structure, property, method, modifier, character, state, etc.) that is being defined.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="SensuLabel" type="String255" minOccurs="0">
            <xs:annotation>
              <xs:documentation xml:lang="en-us">If different definitions exist for a term (e. g., following different scientific schools), a distinguishing label (to be added after Term + "sensu") should be provided.
@@ alternative names for element: ConceptLabel, ConceptQualifier?@@

@@ConceptLabel has been added to the UNIQUE definition, but needs testing what happens when missing. Will terms still be required unique?</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="Definition" type="String" minOccurs="0">
            <xs:annotation>
              <xs:documentation xml:lang="en-us">Definition text, explaining the concept (meaning, semantics) of a structure, character, state, etc. A single paragraph long; but new line (<br/>) may be used.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="ExternalDefinitionURI" type="xs:anyURI" minOccurs="0">
            <xs:annotation>
              <xs:documentation xml:lang="en-us">Optional URI of an external definition, in addition to the internal Definition above.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:group ref="EnablingGroup" minOccurs="0"/>
          <xs:element name="MediaResources" type="MediaResourceRefs" minOccurs="0">
            <xs:annotation>
              <xs:documentation xml:lang="en-us">Audience-dependent resources used in the definition (e. g., images with text, videos with speech, or images intended for audiences of different expertise).</xs:documentation>
            </xs:annotation>
            <xs:unique name="GlossaryEntry_UniqueMediaResources">
              <xs:annotation>
                <xs:documentation xml:lang="en-us">Each media resource may occur only once in the collection.</xs:documentation>
              </xs:annotation>
              <xs:selector xpath="MediaResource"/>
              <xs:field xpath="@ref"/>
            </xs:unique>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="GlossaryEntryRef">
    <xs:annotation>
      <xs:documentation xml:lang="en-us">Refers to a Glossary entry (e. g., from tree nodes or character states)</xs:documentation>
    </xs:annotation>
    <xs:attribute name="ref" type="GlossaryRelationID" use="required">
      <xs:annotation>
        <xs:documentation xml:lang="en-us">Refers to a glossary entry (Terminology/Glossary/GlossaryEntry)</xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attributeGroup ref="debugrefAttribute"/>
  </xs:complexType>
  <xs:group name="GlossaryRefGroup">
    <xs:annotation>
      <xs:documentation xml:lang="en-us">GlossaryEntry reference.</xs:documentation>
      <xs:documentation xml:lang="en-us">Note: a model group is used so that the keyref identity constraint may be defined only once in a central place. Schema 1.0 does not allow to define keyrefs on types, only elements!</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="Definition" type="GlossaryEntryRef" minOccurs="0">
        <xs:annotation>
          <xs:documentation xml:lang="en-us">Reference to the definition of term
or concept in the glossary. This
glossary entry may provide definitions
for multiple audiences and may include
media resources like images.
[ATTR: ref]</xs:documentation>
        </xs:annotation>
        <xs:keyref name="GlossaryEntryKeyref" refer="GlossaryEntryKey">
          <xs:annotation>
            <xs:documentation xml:lang="en-us">(This identity constraint is placed on a global element!)</xs:documentation>
          </xs:annotation>
          <xs:selector xpath="."/>
          <xs:field xpath="@ref"/>
        </xs:keyref>
      </xs:element>
    </xs:sequence>
  </xs:group>
  <xs:complexType name="GlossaryEntryRefs">
    <xs:annotation>
      <xs:documentation xml:lang="en-us">Collection of glossary
entries (identified
by their id)</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="Term" type="GlossaryEntryRef" maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:complexType>
  <xs:simpleType name="GlossaryKindOfTermEnum">
    <xs:annotation>
      <xs:documentation xml:lang="en-us">Defines the type of a concept tree (list of enumerated values to support application interoperability).</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:Name">
      <xs:enumeration value="PartOrStructure"/>
      <xs:enumeration value="PropertyTerm"/>
      <xs:enumeration value="FunctionalConcept"/>
      <xs:enumeration value="MethodOrProcedure"/>
      <xs:enumeration value="ChemicalCompound"/>
      <xs:enumeration value="Modifier"/>
      <xs:enumeration value="NomenclatureTerm"/>
      <xs:enumeration value="OtherTerm"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:annotation>
    <xs:documentation xml:lang="en-us">==== GLOSSARY END ===</xs:documentation>
  </xs:annotation>
  <xs:annotation>
    <xs:documentation xml:lang="en-us">-------------------------------- START  Characters and dependent objects (states, statistical measures) ---------------------------</xs:documentation>
  </xs:annotation>
  <xs:annotation>
    <xs:documentation xml:lang="en-us">1. --- Character definitions (characters = data recording and analysis variables, depending on observed part, property, and observation or measurement methodology)</xs:documentation>
  </xs:annotation>
  <xs:annotation>
    <xs:documentation xml:lang="en-us">a) Abstract base type and derived types to be used in instance documents.</xs:documentation>
  </xs:annotation>
  <xs:complexType name="AbstractCharacter" abstract="true">
    <xs:annotation>
      <xs:documentation xml:lang="en-us">Defines a character in the terminology. Abstract base type, one of the extensions below must be used in instance documents</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="Label" type="SimpleLabel">
        <xs:annotation>
          <xs:documentation xml:lang="en-us">Only a simple label for presenting characters in a flat list is defined here. (Abbreviated char. labels for tabular reports, natural language wordings, etc. can be defined in concept trees!)</xs:documentation>
        </xs:annotation>
        <xs:unique name="AbstractCharacter_UniqueLabelRepresentation">
          <xs:annotation>
            <xs:documentation xml:lang="en-us">All Representations within a Label must have different language/audience values.</xs:documentation>
          </xs:annotation>
          <xs:selector xpath="Representation"/>
          <xs:field xpath="@language"/>
          <xs:field xpath="@audience"/>
        </xs:unique>
      </xs:element>
      <xs:group ref="GlossaryRefGroup" minOccurs="0"/>
      <xs:group ref="EnablingGroup" minOccurs="0"/>
      <xs:element name="RevisionData" type="RevisionData" minOccurs="0"/>
      <xs:element name="Ratings" type="Ratings" minOccurs="0">
        <xs:annotation>
          <xs:documentation source="http://160.45.63.11/Projects/TDWG-SDD/docs/SDD_P_ID_Ratings.html" xml:lang="en-us">Meta information,
rating characters
under various
aspects. Intended
to guide a best-
next character
algorithm.</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
    <xs:attribute name="id" type="CharacterRelationID" use="required"/>
    <xs:attributeGroup ref="debugkeyAttribute"/>
    <xs:anyAttribute namespace="##other" processContents="lax"/>
  </xs:complexType>
  <xs:complexType name="CategoricalCharacter" abstract="false">
    <xs:annotation>
      <xs:documentation xml:lang="en-us"># Derived from AbstractCharacter to be used in instance documents (non-abstract type).

Categorical data include nominal and ordinal data (DELTA types UM/OM and NEXUS types). Other terms for categorical data in statistics are 'qualitative data' or 'attributes'. The term 'attribute' has been avoided in SDD because it has different definitions in statistics, programming, databases, DELTA, etc. Both 'qualitative' and 'attribute' are ambiguos as to whether ordinal/ ranked variables are in- or excluded.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="AbstractCharacter">
        <xs:sequence>
          <xs:annotation>
            <xs:documentation xml:lang="en-us">Extension of the 
common character 
properties with those
specific to categorical 
data (= 'states').</xs:documentation>
          </xs:annotation>
          <xs:element name="Assumptions" minOccurs="0">
            <xs:complexType>
              <xs:sequence>
                <xs:element name="MeasurementScale" type="CategoricalMeasurementScaleEnum" minOccurs="0">
                  <xs:annotation>
                    <xs:documentation xml:lang="en-us">An optional specification of the kind of categorical character variable. The available measurement scales are 'nominal', and 'ordinal'. The distinction between linear ordering and other kinds of ordering is made separately!</xs:documentation>
                  </xs:annotation>
                </xs:element>
                <xs:element name="NaturallyContinuous" type="xs:boolean" minOccurs="0">
                  <xs:annotation>
                    <xs:documentation xml:lang="en-us">Any categorical variable can assume only a limited number of discrete values. Thus data recorded in a CategoricalCharacter are always discrete (= discontinous or meristic). However, the measured property may either be naturally discrete ('male/ female', 'aseptate/ uniseptate/ biseptate/muriform'), or it may be continuously varying and partioned into into discrete categories ('no/few/many hairs', 'orange to red'). Only in the latter case the between-operator can be used on neighboring states.</xs:documentation>
                  </xs:annotation>
                </xs:element>
                <xs:element name="__AnalyzeStatesAsPresentAbsent" type="xs:boolean" minOccurs="0">
                  <xs:annotation>
                    <xs:documentation xml:lang="en-us">Some characters may have complex states relations (trees) or the homology of multiple state may be unknown. A conservative phylogenetic analysis may want to treat each state as a separate column with a binary coding of presence/absence of a specific state value.
What would be a good term for this?
AnalyzeStatesSeparately
AnalyzeStatesAsPresentAbsent
TreatStatesAsIndependentVariablesInAnalysis</xs:documentation>
                  </xs:annotation>
                </xs:element>
              </xs:sequence>
            </xs:complexType>
          </xs:element>
          <xs:element name="Mappings" minOccurs="0">
            <xs:annotation>
              <xs:documentation xml:lang="en-us">Mappings between categorical states (e. g., subovate may be mapped to ovate to simplify identification choices).</xs:documentation>
            </xs:annotation>
            <xs:complexType>
              <xs:sequence>
                <xs:element name="Mapping" maxOccurs="unbounded">
                  <xs:annotation>
                    <xs:documentation xml:lang="en-us">Each mapping defines a source and a destination state. Both From and To may point multiple times to the same state, but the combination From + To must be unique. Both state must be defined in the current character (validated through identity constraint!)</xs:documentation>
                  </xs:annotation>
                  <xs:complexType>
                    <xs:sequence>
                      <xs:element name="From" type="CharacterStateRef">
                        <xs:annotation>
                          <xs:documentation xml:lang="en-us">[ATTR: ref]</xs:documentation>
                        </xs:annotation>
                        <xs:keyref name="CatMapping1_CharacterStateKeyref" refer="CharacterStateKey">
                          <xs:selector xpath="."/>
                          <xs:field xpath="@ref"/>
                        </xs:keyref>
                      </xs:element>
                      <xs:element name="To" type="CharacterStateRef">
                        <xs:annotation>
                          <xs:documentation xml:lang="en-us">Both To and From should point to a different character than the current (not validated). No explicit character reference is required, since state references are unique within a dataset.
[ATTR: ref]</xs:documentation>
                        </xs:annotation>
                        <xs:keyref name="CatMapping2_CharacterStateKeyref" refer="CharacterStateKey">
                          <xs:selector xpath="."/>
                          <xs:field xpath="@ref"/>
                        </xs:keyref>
                      </xs:element>
                    </xs:sequence>
                  </xs:complexType>
                </xs:element>
              </xs:sequence>
            </xs:complexType>
            <xs:unique name="CatMapping_UniqueMappingCombination">
              <xs:annotation>
                <xs:documentation xml:lang="en-us">A state may be mapped to multiple other states in the same character, or multiple states may be mapped to a single state, but the combination of From and To may only occur a single time.</xs:documentation>
              </xs:annotation>
              <xs:selector xpath="Mapping"/>
              <xs:field xpath="From/@ref"/>
              <xs:field xpath="To/@ref"/>
            </xs:unique>
          </xs:element>
          <xs:element name="States">
            <xs:annotation>
              <xs:documentation xml:lang="en-us">(States are defined outside the type specific tree, since categorical states may be present in addition to numerical data)</xs:documentation>
            </xs:annotation>
            <xs:complexType>
              <xs:choice maxOccurs="unbounded">
                <xs:annotation>
                  <xs:documentation xml:lang="en-us">(The element 
sequence in 
instance 
documents 
is informative!)</xs:documentation>
                </xs:annotation>
                <xs:element name="StateDefinition" type="CharacterLocalStateDef">
                  <xs:annotation>
                    <xs:documentation xml:lang="en-us">Local definition of a state
[ATTR: id]</xs:documentation>
                  </xs:annotation>
                </xs:element>
                <xs:element name="StateReference">
                  <xs:annotation>
                    <xs:documentation xml:lang="en-us">Reference to a single concept
state (as defined project-wide
at a concept tree node); extended
with an id definition so that the
state in the context of the current character can be referred to from descriptions.
[ATTR: id, ref]</xs:documentation>
                  </xs:annotation>
                  <xs:complexType>
                    <xs:complexContent>
                      <xs:extension base="ConceptStateRef">
                        <xs:attribute name="id" type="CharacterStateRelationID" use="required"/>
                        <xs:attributeGroup ref="debugkeyAttribute"/>
                      </xs:extension>
                    </xs:complexContent>
                  </xs:complexType>
                  <xs:keyref name="ConceptStateKeyref" refer="ConceptStateKey">
                    <xs:selector xpath="."/>
                    <xs:field xpath="@ref"/>
                  </xs:keyref>
                </xs:element>
              </xs:choice>
            </xs:complexType>
            <xs:unique name="CategoricalCharacter_UniqueConceptStateRefs">
              <xs:annotation>
                <xs:documentation xml:lang="en-us">References to project-wide defined ConceptStates (defined at the nodes of concept trees) must be unique within each character. This is achieved by a uniqueness constraint (local to each character) on the ref attribute of StateReference. The id attribute is already unique through the general CharacterStateKey.</xs:documentation>
              </xs:annotation>
              <xs:selector xpath="StateReference"/>
              <xs:field xpath="@ref"/>
            </xs:unique>
            <xs:unique name="CategoricalCharacter_UniqueStateLabelText">
              <xs:annotation>
                <xs:documentation xml:lang="en-us">The labels of character state definitions are required to be unique within each character and audience definition. Note that this includes both the locally defined states and the referenced concept states.</xs:documentation>
              </xs:annotation>
              <xs:selector xpath="StateDefinition/Label/Representation"/>
              <xs:field xpath="Text"/>
              <xs:field xpath="@language"/>
              <xs:field xpath="@audience"/>
            </xs:unique>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="QuantitativeCharacter" abstract="false">
    <xs:annotation>
      <xs:documentation xml:lang="en-us"># Derived from AbstractCharacter to be used in instance documents (non-abstract type)

Quantitative data include data like the DELTA types IN/RN. They are not supported by NEXUS.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="AbstractCharacter">
        <xs:sequence>
          <xs:annotation>
            <xs:documentation xml:lang="en-us">Extension of the 
common character 
properties with those
specific to numerical
measurements</xs:documentation>
          </xs:annotation>
          <xs:element name="Assumptions" minOccurs="0">
            <xs:annotation>
              <xs:documentation xml:lang="en-us">Especially including a more detailed measurement scale.
---
Note: Unlike the states in categorical characters, the applicability of statistical measures to a character is not defined in the character. Any measure used in a description constitutes valid information. However, a list of recommended measures for sets of characters may be defined in concept nodes.</xs:documentation>
            </xs:annotation>
            <xs:complexType>
              <xs:sequence>
                <xs:element name="MeasurementScale" type="QuantitativeMeasurementScaleEnum" minOccurs="0">
                  <xs:annotation>
                    <xs:documentation xml:lang="en-us">An optional specification of the kind of numerical character variable. The numeric scales are 'interval', and 'ratio'. Interval differs from Ratio that the 0-value is an arbitrary point (e.g. in °C/°F) so that ratios should not be calculated.</xs:documentation>
                  </xs:annotation>
                </xs:element>
                <xs:element name="ValuesAreInteger" type="xs:boolean" minOccurs="0">
                  <xs:annotation>
                    <xs:documentation xml:lang="en-us">If true, an application may issue a warning if sample measurements are not integer. Note that most statistical measures are real values for integer data (min/max/TotalRange being exceptions).</xs:documentation>
                  </xs:annotation>
                </xs:element>
                <xs:element name="Continuous" type="xs:boolean" minOccurs="0">
                  <xs:annota