<?xml version="1.0" encoding="utf-8"?>
<!-- ====================================================================== -->
<!-- Copyright © 2026 Typefi Systems. All rights reserved.                  -->
<!--                                                                        -->
<!-- Schema Version: 3.5                                                    -->
<!-- Schema Location: https://www.typefi.com/TPS/content/3_5/ContentXML.xsd -->
<!--                                                                        -->
<!-- ====================================================================== -->
<xsd:schema xmlns="http://www.typefi.com/ContentXML"
            xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            targetNamespace="http://www.typefi.com/ContentXML"
            elementFormDefault="qualified"
            attributeFormDefault="unqualified"
            xml:lang="en"
            xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning"
            vc:minVersion="1.1">

  <xsd:annotation>
    <xsd:documentation>
      Typefi ContentXML (CXML) schema, version 3.5.

      CXML 3.5 changes versus 3.4:

      1. OrderedListStyleEnumeration extended with 44 new ST_NumberFormat-aligned
         kebab-case tokens covering every value Word's `&lt;w:numFmt val="..."/&gt;`
         can emit. New tokens include (non-exhaustive): arabic-abjad, arabic-alpha,
         hebrew-biblical, hebrew-non-standard, ideograph-digital,
         ideograph-traditional, ideograph-legal-traditional, ideograph-zodiac,
         ideograph-zodiac-traditional, ideograph-enclosed-circle, chinese-counting,
         chinese-legal-simplified, chinese-counting-thousand, aiueo, aiueo-full-width,
         iroha, iroha-full-width, japanese-counting, japanese-legal,
         japanese-digital-ten-thousand, ganada, chosung, korean-counting,
         korean-legal, korean-digital, taiwanese-counting,
         taiwanese-counting-thousand, taiwanese-digital, hindi-vowels,
         hindi-consonants, hindi-numbers, hindi-counting, russian-lower,
         russian-upper, thai-letters, thai-numbers, thai-counting,
         vietnamese-counting, decimal-enclosed-circle, decimal-half-width,
         decimal-full-width, decimal-full-width-2, decimal-enclosed-fullstop,
         decimal-enclosed-paren, decimal-enclosed-circle-chinese, number-in-dash,
         ordinal, cardinal-text, ordinal-text, hex, chicago.

      2. Pre-existing legacy values (abjad, alif ba tah, kanji, katakana modern,
         katakana traditional, hebrew biblical, hebrew non-standard) are retained
         as valid but deprecated; per-value annotations identify the canonical
         replacement(s).

      3. The visual-format tokens 01, 001 and 0001 are retained as-is with their
         original meaning (zero-padded decimal, N digits). They have no
         kebab-case alias. See the per-value annotations on those three tokens.
    </xsd:documentation>
  </xsd:annotation>

  <!-- Import for xml:lang and xml:space -->
  <xsd:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd"/>

  <xsd:group name="ContentGroup">
    <xsd:annotation>
      <xsd:documentation>Content is composed of paras, contexts, conditions, images and lists.</xsd:documentation>
    </xsd:annotation>
    <xsd:choice>
      <xsd:group ref="Headings"/>
      <xsd:element name="p" type="InlineType"/>
      <xsd:element name="context" type="ContextType"/>
      <xsd:element name="condition" type="ConditionType"/>
      <xsd:element name="image" type="ImageType"/>
      <xsd:element name="video" type="VideoType"/>
      <xsd:element name="audio" type="AudioType"/>
      <xsd:element name="ol" type="OrderedListType"/>
      <xsd:element name="ul" type="UnorderedListType"/>
      <xsd:element name="table" type="TableType"/>
      <xsd:element name="break" type="BreakType"/>
      <xsd:element name="toc" type="TocType"/>
      <xsd:element name="meta" type="MetadataType"/>
      <xsd:any namespace="http://www.typefi.com/ContentXML/Extensions"
               minOccurs="0" maxOccurs="unbounded" processContents="skip"/>
    </xsd:choice>
  </xsd:group>

  <xsd:simpleType name="TableValignEnumeration">
    <xsd:annotation>
      <xsd:documentation>Valid values for the table valign attribute.</xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="xsd:string">
      <xsd:enumeration value="top"/>
      <xsd:enumeration value="middle"/>
      <xsd:enumeration value="bottom"/>
      <xsd:enumeration value="justify"/>
    </xsd:restriction>
  </xsd:simpleType>

  <xsd:simpleType name="TableHalignEnumeration">
    <xsd:annotation>
      <xsd:documentation>Valid values for the table halign attribute.</xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="xsd:string">
      <xsd:enumeration value="left"/>
      <xsd:enumeration value="center"/>
      <xsd:enumeration value="right"/>
      <xsd:enumeration value="justify"/>
      <xsd:enumeration value="justifyLeft"/>
      <xsd:enumeration value="justifyCenter"/>
      <xsd:enumeration value="justifyRight"/>
      <xsd:enumeration value="justifyFull"/>
    </xsd:restriction>
  </xsd:simpleType>

  <xsd:simpleType name="TableRotateEnumeration">
    <xsd:annotation>
      <xsd:documentation>Valid values for the table rotate attribute.</xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="xsd:integer">
      <xsd:enumeration value="0"/>
      <xsd:enumeration value="90"/>
      <xsd:enumeration value="180"/>
      <xsd:enumeration value="270"/>
    </xsd:restriction>
  </xsd:simpleType>

  <xsd:simpleType name="StyleType">
    <xsd:annotation>
      <xsd:documentation>
        Valid values for the @type attribute of a soft-style (tps:style).
        These values can be combined using '|' as delimiter.

        Valid tokens: 
        bold, italic, underline, strikethrough, superscript, subscript, 
        allCaps, smallCaps, nobreak,
        
        highlightBlack, highlightBlue, highlightCyan, highlightGreen, 
        highlightMagenta, highlightRed, highlightYellow, highlightWhite, 
        highlightDarkBlue, highlightDarkCyan, highlightDarkGreen, 
        highlightDarkMagenta, highlightDarkRed, highlightDarkYellow, 
        highlightDarkGray, highlightLightGray.

        Constraints (enforced by XSD 1.1 assertions): tokens are unique within
        a value; subscript and superscript are mutually exclusive; allCaps and
        smallCaps are mutually exclusive.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="xsd:string">
      <xsd:assertion test="every $token in tokenize($value, '\|') satisfies
                            $token = (
                              'bold',
                              'italic',
                              'underline',
                              'strikethrough',
                              'superscript',
                              'subscript',
                              'allCaps',
                              'smallCaps',
                              'nobreak',
                              'highlightBlack',
                              'highlightBlue',
                              'highlightCyan',
                              'highlightGreen',
                              'highlightMagenta',
                              'highlightRed',
                              'highlightYellow',
                              'highlightWhite',
                              'highlightDarkBlue',
                              'highlightDarkCyan',
                              'highlightDarkGreen',
                              'highlightDarkMagenta',
                              'highlightDarkRed',
                              'highlightDarkYellow',
                              'highlightDarkGray',
                              'highlightLightGray'
                            )
                          "/>
      <xsd:assertion test="count(tokenize($value, '\|')) = count(distinct-values(tokenize($value, '\|')))"/>
      <xsd:assertion test="not(contains($value, 'subscript') and contains($value, 'superscript'))"/>
      <xsd:assertion test="not(matches($value, '(^|\|)allCaps') and contains($value, 'smallCaps'))"/>
    </xsd:restriction>
  </xsd:simpleType>

  <xsd:simpleType name="OrderedListStyleEnumeration">
    <xsd:annotation>
      <xsd:documentation>
        Valid values for the @style attribute of &lt;ol&gt; (ordered list).

        The token set covers script-named formats (Arabic, CJK, Hebrew, Hindi,
        Korean, Russian, Taiwanese, Thai, Vietnamese, etc.) and visual decimal
        variants. Most tokens are kebab-case and align with OOXML's
        ST_NumberFormat values. A small set of legacy spaced/mixed-case tokens
        is retained as valid-but-deprecated; each is individually annotated
        with its canonical kebab-case replacement.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="xsd:string">
      <xsd:enumeration value="none"/>
      <xsd:enumeration value="1"/>
      <xsd:enumeration value="I"/>
      <xsd:enumeration value="i"/>
      <xsd:enumeration value="A"/>
      <xsd:enumeration value="a"/>
      <xsd:enumeration value="01">
        <xsd:annotation>
          <xsd:documentation>
            Zero-padded decimal, 2 digits (01, 02, 03, ...). Produced by
            `&lt;w:numFmt val="decimal"/&gt;` combined with a `&lt;w:lvlText&gt;`
            value such as "0%1" that supplies the leading zero. Not aliased to
            any script-named token.
          </xsd:documentation>
        </xsd:annotation>
      </xsd:enumeration>
      <xsd:enumeration value="001">
        <xsd:annotation>
          <xsd:documentation>
            Zero-padded decimal, 3 digits (001, 002, 003, ...). Produced by
            `&lt;w:numFmt val="decimal"/&gt;` combined with a `&lt;w:lvlText&gt;`
            value such as "00%1". Distinct from `japanese-legal`, which is a
            separate ST_NumberFormat-aligned token added in CXML 3.5.
          </xsd:documentation>
        </xsd:annotation>
      </xsd:enumeration>
      <xsd:enumeration value="0001">
        <xsd:annotation>
          <xsd:documentation>
            Zero-padded decimal, 4 digits (0001, 0002, 0003, ...). Produced by
            `&lt;w:numFmt val="decimal"/&gt;` combined with a `&lt;w:lvlText&gt;`
            value such as "000%1". Distinct from `japanese-digital-ten-thousand`,
            which is a separate ST_NumberFormat-aligned token added in CXML 3.5.
          </xsd:documentation>
        </xsd:annotation>
      </xsd:enumeration>
      <!-- Arabic letters -->
      <xsd:enumeration value="abjad">
        <xsd:annotation>
          <xsd:documentation>Deprecated; prefer `arabic-abjad`. Retained for backward compatibility.</xsd:documentation>
        </xsd:annotation>
      </xsd:enumeration>
      <xsd:enumeration value="arabic-abjad"/>
      <xsd:enumeration value="alif ba tah">
        <xsd:annotation>
          <xsd:documentation>Deprecated; prefer `arabic-alpha`. Retained for backward compatibility.</xsd:documentation>
        </xsd:annotation>
      </xsd:enumeration>
      <xsd:enumeration value="arabic-alpha"/>
      <!-- CJK letters -->
      <xsd:enumeration value="kanji">
        <xsd:annotation>
          <xsd:documentation>
            Deprecated; retained for backward compatibility. The canonical
            replacement depends on the document's source intent:

            - From InDesign (idml-to-cxml canonicalization): use
              `ideograph-digital`.
            - From Word emitting `&lt;w:numFmt w:val="japaneseCounting"/&gt;`:
              use `japanese-counting`.
            - From Word emitting `&lt;w:numFmt w:val="chineseCounting"/&gt;`:
              use `chinese-counting`.

            Authors writing CXML by hand or programmatically should choose the
            canonical token that matches the intended numbering format rather
            than emitting `kanji`.
          </xsd:documentation>
        </xsd:annotation>
      </xsd:enumeration>
      <xsd:enumeration value="katakana modern">
        <xsd:annotation>
          <xsd:documentation>Deprecated; prefer `aiueo-full-width`. Retained for backward compatibility.</xsd:documentation>
        </xsd:annotation>
      </xsd:enumeration>
      <xsd:enumeration value="katakana traditional">
        <xsd:annotation>
          <xsd:documentation>Deprecated; prefer `iroha-full-width`. Retained for backward compatibility.</xsd:documentation>
        </xsd:annotation>
      </xsd:enumeration>
      <!-- Hebrew letters -->
      <xsd:enumeration value="hebrew biblical">
        <xsd:annotation>
          <xsd:documentation>Deprecated; prefer `hebrew-biblical`. Retained for backward compatibility.</xsd:documentation>
        </xsd:annotation>
      </xsd:enumeration>
      <xsd:enumeration value="hebrew-biblical"/>
      <xsd:enumeration value="hebrew non-standard">
        <xsd:annotation>
          <xsd:documentation>Deprecated; prefer `hebrew-non-standard`. Retained for backward compatibility.</xsd:documentation>
        </xsd:annotation>
      </xsd:enumeration>
      <xsd:enumeration value="hebrew-non-standard"/>
      <!-- Decimal variants -->
      <xsd:enumeration value="decimal-enclosed-circle"/>
      <xsd:enumeration value="decimal-half-width"/>
      <xsd:enumeration value="decimal-full-width"/>
      <xsd:enumeration value="decimal-full-width-2"/>
      <xsd:enumeration value="decimal-enclosed-fullstop"/>
      <xsd:enumeration value="decimal-enclosed-paren"/>
      <xsd:enumeration value="decimal-enclosed-circle-chinese"/>
      <xsd:enumeration value="number-in-dash"/>
      <!-- Western letters and words -->
      <xsd:enumeration value="ordinal"/>
      <xsd:enumeration value="cardinal-text"/>
      <xsd:enumeration value="ordinal-text"/>
      <xsd:enumeration value="hex"/>
      <xsd:enumeration value="chicago"/>
      <!-- CJK ideograph -->
      <xsd:enumeration value="ideograph-digital"/>
      <xsd:enumeration value="ideograph-traditional"/>
      <xsd:enumeration value="ideograph-legal-traditional"/>
      <xsd:enumeration value="ideograph-zodiac"/>
      <xsd:enumeration value="ideograph-zodiac-traditional"/>
      <xsd:enumeration value="ideograph-enclosed-circle"/>
      <!-- Chinese -->
      <xsd:enumeration value="chinese-counting"/>
      <xsd:enumeration value="chinese-legal-simplified"/>
      <xsd:enumeration value="chinese-counting-thousand"/>
      <!-- Japanese letters -->
      <xsd:enumeration value="aiueo"/>
      <xsd:enumeration value="aiueo-full-width"/>
      <xsd:enumeration value="iroha"/>
      <xsd:enumeration value="iroha-full-width"/>
      <!-- Japanese counting -->
      <xsd:enumeration value="japanese-counting"/>
      <xsd:enumeration value="japanese-legal"/>
      <xsd:enumeration value="japanese-digital-ten-thousand"/>
      <!-- Korean -->
      <xsd:enumeration value="ganada"/>
      <xsd:enumeration value="chosung"/>
      <xsd:enumeration value="korean-counting"/>
      <xsd:enumeration value="korean-legal"/>
      <xsd:enumeration value="korean-digital"/>
      <!-- Taiwanese -->
      <xsd:enumeration value="taiwanese-counting"/>
      <xsd:enumeration value="taiwanese-counting-thousand"/>
      <xsd:enumeration value="taiwanese-digital"/>
      <!-- Hindi -->
      <xsd:enumeration value="hindi-vowels"/>
      <xsd:enumeration value="hindi-consonants"/>
      <xsd:enumeration value="hindi-numbers"/>
      <xsd:enumeration value="hindi-counting"/>
      <!-- Russian -->
      <xsd:enumeration value="russian-lower"/>
      <xsd:enumeration value="russian-upper"/>
      <!-- Thai -->
      <xsd:enumeration value="thai-letters"/>
      <xsd:enumeration value="thai-numbers"/>
      <xsd:enumeration value="thai-counting"/>
      <!-- Vietnamese -->
      <xsd:enumeration value="vietnamese-counting"/>
    </xsd:restriction>
  </xsd:simpleType>

  <xsd:simpleType name="WhiteSpaceModeEnumeration">
    <xsd:annotation>
      <xsd:documentation>
        Valid values for the `whiteSpaceMode` attribute on &lt;content&gt; and
        &lt;section&gt;.

        `whiteSpaceMode` is optional (to maintain backwards compatibility). If
        both `whiteSpaceMode` and the (deprecated) `strictSpace` attribute are
        present, `whiteSpaceMode` overrides `strictSpace`. From Typefi Publish 6
        onwards, documentation should reference `whiteSpaceMode` only;
        `strictSpace` is retained for legacy documents.

        Like `strictSpace`:

        1. `whiteSpaceMode` applies to all content within the relevant
           &lt;content&gt; or &lt;section&gt;.
        2. A single job can mix `whiteSpaceMode` values on a section-by-section
           basis.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="xsd:string">
      <xsd:enumeration value="classic">
        <xsd:annotation>
          <xsd:documentation>
            Behaviour of early versions of Typefi Publish:
            a. All occurrences of #x9 (tab), #xA (line feed) and #xD (carriage
               return) are replaced with #x20 (space).
            b. Contiguous sequences of #x20s are collapsed to a single #x20.
            c. Leading #x20s are trimmed from the beginning of &lt;p&gt; elements.
          </xsd:documentation>
        </xsd:annotation>
      </xsd:enumeration>
      <xsd:enumeration value="strict">
        <xsd:annotation>
          <xsd:documentation>
            The only mode that guarantees immunity from pretty printing (as long
            as all &lt;s/&gt; tags are set up correctly):
            a. All occurrences of #x9 (tab), #xA (line feed) and #xD (carriage
               return) are replaced with #x20 (space).
            b. Contiguous sequences of #x20s are collapsed to a single #x20.
            c. Leading and trailing #x20s are removed from all text nodes.
          </xsd:documentation>
        </xsd:annotation>
      </xsd:enumeration>
      <xsd:enumeration value="preserve">
        <xsd:annotation>
          <xsd:documentation>No normalization is done; the value is not changed.</xsd:documentation>
        </xsd:annotation>
      </xsd:enumeration>
    </xsd:restriction>
  </xsd:simpleType>

  <xsd:complexType name="TableCellType">
    <xsd:annotation>
      <xsd:documentation>Table cells are composed of the normal content group.</xsd:documentation>
    </xsd:annotation>
    <xsd:choice minOccurs="0" maxOccurs="unbounded">
      <xsd:group ref="Headings"/>
      <xsd:element name="p" type="ParaType"/>
      <xsd:element name="context" type="ContextType"/>
      <xsd:element name="condition" type="ConditionType"/>
      <xsd:element name="image" type="ImageType"/>
      <xsd:element name="video" type="VideoType"/>
      <xsd:element name="audio" type="AudioType"/>
      <xsd:element name="ol" type="OrderedListType"/>
      <xsd:element name="ul" type="UnorderedListType"/>
      <xsd:element name="break" type="BreakType"/>
      <xsd:element name="toc" type="TocType"/>
      <xsd:element name="meta" type="MetadataType"/>
    </xsd:choice>
    <xsd:attribute name="namest" type="xsd:string" use="optional"/>
    <xsd:attribute name="nameend" type="xsd:string" use="optional"/>
    <xsd:attribute name="valign" type="TableValignEnumeration" use="optional"/>
    <xsd:attribute name="align" type="TableHalignEnumeration" use="optional"/>
    <xsd:attribute name="rotate" type="TableRotateEnumeration" use="optional"/>
    <xsd:attribute name="morerows" type="xsd:integer" use="optional"/>
    <xsd:attribute name="type" type="xsd:string" use="optional"/>
    <xsd:attribute name="style" type="xsd:string" use="optional"/>
  </xsd:complexType>

  <xsd:complexType name="TableRowType">
    <xsd:annotation>
      <xsd:documentation>Table rows are composed of table cells.</xsd:documentation>
    </xsd:annotation>
    <xsd:sequence minOccurs="0" maxOccurs="unbounded">
      <xsd:element name="entry" type="TableCellType"/>
    </xsd:sequence>
  </xsd:complexType>

  <xsd:complexType name="TableBodySectionType">
    <xsd:annotation>
      <xsd:documentation>Table body sections are composed of table rows.</xsd:documentation>
    </xsd:annotation>
    <xsd:sequence minOccurs="1" maxOccurs="unbounded">
      <xsd:element name="row" type="TableRowType"/>
    </xsd:sequence>
  </xsd:complexType>

  <xsd:complexType name="TableSectionType">
    <xsd:annotation>
      <xsd:documentation>Table sections are composed of table rows.</xsd:documentation>
    </xsd:annotation>
    <xsd:sequence minOccurs="0" maxOccurs="unbounded">
      <xsd:element name="row" type="TableRowType"/>
    </xsd:sequence>
  </xsd:complexType>

  <xsd:complexType name="TableColSpecType">
    <xsd:annotation>
      <xsd:documentation>A table col spec defines column information for a table.</xsd:documentation>
    </xsd:annotation>
    <xsd:attribute name="colname" type="xsd:string" use="required"/>
    <xsd:attribute name="align" type="TableHalignEnumeration" use="optional"/>
    <xsd:attribute name="rotate" type="TableRotateEnumeration" use="optional"/>
    <xsd:attribute name="colwidth" type="FixedOrRelativeWidthType" use="optional"/>
  </xsd:complexType>

  <xsd:simpleType name="FixedOrRelativeWidthType">
    <xsd:annotation>
      <xsd:documentation>
        Reference: http://www.oasis-open.org/specs/tm9901.html#AEN530

        Either a proportional measure of the form `number*`, e.g. "5*" for 5
        times the proportion, or "*" (equivalent to "1*"); or a fixed measure,
        e.g. "2pt" for 2 points, "3pi" for 3 picas. (Mixed measure such as
        "2*+3pt", allowed in the full CALS table model, is not supported in
        this Exchange model.) Coefficients are positive integers or fixed-point
        numbers; for fixed-point numbers a leading (possibly 0) integer part is
        required, and implementations should support at least 2 decimal places.
        A value of "" [the null string] is treated as a proportional measure of
        "1*".

        Fixed unit values are case-insensitive. The standard list of allowed
        unit values is "pt" (points), "cm" (centimeters), "mm" (millimeters),
        "pi" (picas) and "in" (inches). The default fixed unit should be
        interpreted as "pt" if neither a proportion nor a fixed unit is
        specified.

        NOTE: Typefi Publish also allows % as a valid unit.

        XML-15 (CXML 3.1): Added support for ".9862%" (no leading 0).
      </xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="xsd:string">
      <xsd:pattern
        value="(\d+|\d+\.\d+|\.\d+)\s*([Pp][Tt]|[Cc][Mm]|[Mm][Mm]|[Pp][Ii]|[Ii][Nn]|%|\*)?"/>
    </xsd:restriction>
  </xsd:simpleType>

  <xsd:complexType name="TableGroupType">
    <xsd:annotation>
      <xsd:documentation>
        A table group is a sequence of header, body and footer regions.
        Each column in the table must have a colspec.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:sequence>
      <xsd:element name="colspec" minOccurs="1" maxOccurs="unbounded" type="TableColSpecType"/>
      <xsd:element name="thead" minOccurs="0" maxOccurs="1" type="TableSectionType"/>
      <xsd:element name="tbody" minOccurs="1" maxOccurs="1" type="TableBodySectionType"/>
      <xsd:element name="tfoot" minOccurs="0" maxOccurs="1" type="TableSectionType"/>
    </xsd:sequence>
    <xsd:attribute name="cols" type="xsd:integer" use="required"/>
  </xsd:complexType>

  <xsd:complexType name="TableType">
    <xsd:annotation>
      <xsd:documentation>Tables are composed of table groups.</xsd:documentation>
    </xsd:annotation>
    <xsd:sequence minOccurs="0" maxOccurs="1">
      <xsd:element name="tgroup" type="TableGroupType"/>
    </xsd:sequence>
    <xsd:attribute name="id" type="xsd:string" use="optional"/>
    <xsd:attribute name="type" type="xsd:string" use="optional"/>
    <xsd:attribute name="width" type="FixedOrRelativeWidthType" use="optional"/>
    <xsd:attribute name="condition" type="xsd:string" use="optional"/>
    <xsd:attribute name="style" type="xsd:string" use="optional"/>
    <xsd:attributeGroup ref="TrackChangeAttributes"/>
    <xsd:attributeGroup ref="ExtendedAttributes"/>
  </xsd:complexType>

  <xsd:complexType name="OrderedListType">
    <xsd:annotation>
      <xsd:documentation>Ordered list type.</xsd:documentation>
    </xsd:annotation>
    <xsd:sequence>
      <xsd:element name="liFormat" minOccurs="0" maxOccurs="1" type="ListItemFormatType"/>
      <xsd:choice minOccurs="0" maxOccurs="unbounded">
        <xsd:element name="li" type="ListItemType"/>
        <xsd:element name="condition" type="ConditionalListItems"/>
        <xsd:element name="meta" type="MetadataType"/>
      </xsd:choice>
    </xsd:sequence>
    <xsd:attribute name="type" type="xsd:string" use="optional"/>
    <xsd:attribute name="id" type="xsd:string" use="optional"/>
    <xsd:attribute name="style" type="OrderedListStyleEnumeration" use="optional"/>
    <xsd:attribute name="start" type="xsd:integer" use="optional"/>
    <xsd:attributeGroup ref="TrackChangeAttributes"/>
    <xsd:attributeGroup ref="ExtendedAttributes"/>
  </xsd:complexType>

  <xsd:complexType name="UnorderedListType">
    <xsd:annotation>
      <xsd:documentation>Unordered list type.</xsd:documentation>
    </xsd:annotation>
    <xsd:sequence>
      <xsd:element name="liFormat" minOccurs="0" maxOccurs="1" type="ListItemFormatType"/>
      <xsd:choice minOccurs="0" maxOccurs="unbounded">
        <xsd:element name="li" type="ListItemType"/>
        <xsd:element name="condition" type="ConditionalListItems"/>
        <xsd:element name="meta" type="MetadataType"/>
      </xsd:choice>
    </xsd:sequence>
    <xsd:attribute name="type" type="xsd:string" use="optional"/>
    <xsd:attribute name="id" type="xsd:string" use="optional"/>
    <xsd:attribute name="style" type="xsd:string" use="optional"/>
    <xsd:attributeGroup ref="TrackChangeAttributes"/>
    <xsd:attributeGroup ref="ExtendedAttributes"/>
  </xsd:complexType>

  <xsd:complexType name="ConditionalListItems">
    <xsd:annotation>
      <xsd:documentation>Conditional list items type.</xsd:documentation>
    </xsd:annotation>
    <xsd:sequence>
      <xsd:element name="li" minOccurs="0" maxOccurs="unbounded" type="ListItemType"/>
    </xsd:sequence>
    <xsd:attribute name="type" type="xsd:string" use="required"/>
    <xsd:attribute name="id" type="xsd:string" use="optional"/>
    <xsd:attributeGroup ref="TrackChangeAttributes"/>
    <xsd:attributeGroup ref="ExtendedAttributes"/>
  </xsd:complexType>

  <xsd:complexType name="ListItemFormatType" mixed="true">
    <xsd:annotation>
      <xsd:documentation>List item format type.</xsd:documentation>
    </xsd:annotation>
    <xsd:choice minOccurs="0" maxOccurs="unbounded">
      <xsd:element name="t" type="WhitespaceType"/>
      <xsd:element name="s" type="WhitespaceType"/>
      <xsd:element name="l" type="WhitespaceType"/>
      <xsd:element name="liRef" type="ListItemReferenceType"/>
      <xsd:element name="style" type="SoftStyleListItemType"/>
    </xsd:choice>
    <xsd:attribute name="align" type="TableHalignEnumeration" use="optional"/>
  </xsd:complexType>

  <xsd:complexType name="SoftStyleListItemType" mixed="true">
    <xsd:annotation>
      <xsd:documentation>Soft-style wrapper allowed inside list-item format content.</xsd:documentation>
    </xsd:annotation>
    <xsd:choice minOccurs="0" maxOccurs="unbounded">
      <xsd:element name="t" type="WhitespaceType"/>
      <xsd:element name="s" type="WhitespaceType"/>
      <xsd:element name="l" type="WhitespaceType"/>
      <xsd:element name="liRef" type="ListItemReferenceType"/>
      <xsd:element name="style" type="SoftStyleListItemType"/>
    </xsd:choice>
    <xsd:attributeGroup ref="SoftStyleAttributes"/>
  </xsd:complexType>

  <xsd:complexType name="ListItemReferenceType">
    <xsd:annotation>
      <xsd:documentation>List item reference type.</xsd:documentation>
    </xsd:annotation>
    <xsd:attribute name="level" type="xsd:integer" use="optional" default="0"/>
    <xsd:attribute name="style" type="xsd:string" use="optional"/>
    <xsd:attributeGroup ref="TrackChangeAttributes"/>
    <xsd:attributeGroup ref="ExtendedAttributes"/>
  </xsd:complexType>

  <xsd:complexType name="ListItemType">
    <xsd:annotation>
      <xsd:documentation>List item type.</xsd:documentation>
    </xsd:annotation>
    <xsd:choice minOccurs="0" maxOccurs="unbounded">
      <xsd:group ref="ContentGroup"/>
    </xsd:choice>
  </xsd:complexType>

  <xsd:complexType name="ImageType">
    <xsd:annotation>
      <xsd:documentation>Images contain ref and comment attributes.</xsd:documentation>
    </xsd:annotation>
    <xsd:attribute name="id" type="xsd:string" use="optional"/>
    <xsd:attribute name="ref" type="xsd:string" use="optional"/>
    <xsd:attribute name="comment" type="xsd:string" use="optional"/>
    <xsd:attributeGroup ref="TrackChangeAttributes"/>
    <xsd:attributeGroup ref="ExtendedAttributes"/>
  </xsd:complexType>

  <xsd:complexType name="VideoType">
    <xsd:annotation>
      <xsd:documentation>Video. Added in CXML 3.0 / Typefi 8.2.0.</xsd:documentation>
    </xsd:annotation>
    <xsd:choice minOccurs="0" maxOccurs="unbounded">
      <xsd:element name="poster" type="VideoPosterType"/>
      <xsd:element name="altRef" type="AltRefType"/>
    </xsd:choice>
    <xsd:attribute name="ref" type="xsd:string" use="required"/>
    <xsd:attribute name="comment" type="xsd:string" use="optional"/>
    <xsd:attribute name="autoplay" type="xsd:boolean" use="optional"/>
    <xsd:attribute name="controls" type="xsd:boolean" use="optional"/>
    <xsd:attribute name="loop" type="xsd:boolean" use="optional"/>
    <xsd:attribute name="id" type="xsd:string" use="optional"/>
    <xsd:attributeGroup ref="TrackChangeAttributes"/>
    <xsd:attributeGroup ref="ExtendedAttributes"/>
  </xsd:complexType>

  <xsd:complexType name="AudioType">
    <xsd:annotation>
      <xsd:documentation>Audio. Added in CXML 3.0 / Typefi 8.2.0.</xsd:documentation>
    </xsd:annotation>
    <xsd:choice minOccurs="0" maxOccurs="unbounded">
      <xsd:element name="poster" type="AudioPosterType"/>
      <xsd:element name="altRef" type="AltRefType"/>
    </xsd:choice>
    <xsd:attribute name="ref" type="xsd:string" use="required"/>
    <xsd:attribute name="comment" type="xsd:string" use="optional"/>
    <xsd:attribute name="autoplay" type="xsd:boolean" use="optional"/>
    <xsd:attribute name="controls" type="xsd:boolean" use="optional"/>
    <xsd:attribute name="loop" type="xsd:boolean" use="optional"/>
    <xsd:attribute name="id" type="xsd:string" use="optional"/>
    <xsd:attributeGroup ref="TrackChangeAttributes"/>
    <xsd:attributeGroup ref="ExtendedAttributes"/>
  </xsd:complexType>

  <xsd:complexType name="VideoPosterType">
    <xsd:annotation>
      <xsd:documentation>Video poster image. Added in CXML 3.0 / Typefi 8.2.0.</xsd:documentation>
    </xsd:annotation>
    <xsd:attribute name="type" type="VideoPosterTypeEnumeration" use="required"/>
    <xsd:attribute name="ref" type="xsd:string" use="optional"/>
  </xsd:complexType>

  <xsd:complexType name="AudioPosterType">
    <xsd:annotation>
      <xsd:documentation>Audio poster image. Added in CXML 3.0 / Typefi 8.2.0.</xsd:documentation>
    </xsd:annotation>
    <xsd:attribute name="type" type="AudioPosterTypeEnumeration" use="required"/>
    <xsd:attribute name="ref" type="xsd:string" use="optional"/>
  </xsd:complexType>

  <xsd:complexType name="AltRefType">
    <xsd:annotation>
      <xsd:documentation>Alt Ref (alternative media file for video or audio). Added in CXML 3.0 / Typefi 8.2.0.</xsd:documentation>
    </xsd:annotation>
    <xsd:attribute name="ref" type="xsd:string" use="required"/>
    <xsd:attribute name="target" type="xsd:string" use="optional"/>
  </xsd:complexType>

  <xsd:simpleType name="VideoPosterTypeEnumeration">
    <xsd:annotation>
      <xsd:documentation>Valid values for the video poster type attribute. Added in CXML 3.0 / Typefi 8.2.0.</xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="xsd:string">
      <xsd:enumeration value="none"/>
      <xsd:enumeration value="default"/>
      <xsd:enumeration value="image"/>
    </xsd:restriction>
  </xsd:simpleType>

  <xsd:simpleType name="AudioPosterTypeEnumeration">
    <xsd:annotation>
      <xsd:documentation>Valid values for the audio poster type attribute. Added in CXML 3.0 / Typefi 8.2.0.</xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="xsd:string">
      <xsd:enumeration value="none"/>
      <xsd:enumeration value="default"/>
      <xsd:enumeration value="image"/>
    </xsd:restriction>
  </xsd:simpleType>

  <xsd:simpleType name="StatusTypeEnumeration">
    <xsd:annotation>
      <xsd:documentation>Valid values for the status attribute. Added in CXML 3.3.</xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="xsd:string">
      <xsd:enumeration value="changed"/>
      <xsd:enumeration value="added"/>
      <xsd:enumeration value="deleted"/>
    </xsd:restriction>
  </xsd:simpleType>

  <xsd:complexType name="ConditionType">
    <xsd:annotation>
      <xsd:documentation>Conditions are composed of sections or standard content.</xsd:documentation>
    </xsd:annotation>
    <xsd:choice minOccurs="0" maxOccurs="unbounded">
      <xsd:group ref="ContentGroup"/>
    </xsd:choice>
    <xsd:attribute name="id" type="xsd:string" use="optional"/>
    <xsd:attribute name="type" type="xsd:string" use="required"/>
    <xsd:attributeGroup ref="TrackChangeAttributes"/>
    <xsd:attributeGroup ref="ExtendedAttributes"/>
  </xsd:complexType>

  <xsd:complexType name="ContextType">
    <xsd:annotation>
      <xsd:documentation>Contexts are composed of standard content.</xsd:documentation>
    </xsd:annotation>
    <xsd:sequence>
      <xsd:element name="fieldSet" minOccurs="0" maxOccurs="unbounded" type="FieldSetType"/>
      <xsd:choice minOccurs="0" maxOccurs="unbounded">
        <xsd:group ref="ContentGroup"/>
      </xsd:choice>
    </xsd:sequence>
    <xsd:attribute name="type" type="xsd:string" use="required"/>
    <xsd:attribute name="id" type="xsd:string" use="optional"/>
    <xsd:attribute name="variant" type="xsd:string" use="optional"/>
    <xsd:attribute name="condition" type="xsd:string" use="optional"/>
    <xsd:attribute ref="xml:lang" use="optional"/>
    <xsd:attributeGroup ref="TrackChangeAttributes"/>
    <xsd:attributeGroup ref="ExtendedAttributes"/>
  </xsd:complexType>

  <xsd:complexType name="FootnoteType">
    <xsd:annotation>
      <xsd:documentation>Footnotes and endnotes are composed of standard content.</xsd:documentation>
    </xsd:annotation>
    <xsd:sequence>
      <xsd:choice minOccurs="0" maxOccurs="unbounded">
        <xsd:group ref="ContentGroup"/>
      </xsd:choice>
    </xsd:sequence>
    <xsd:attribute name="id" type="xsd:string" use="optional"/>
    <xsd:attribute name="value" type="xsd:string" use="optional"/>
    <xsd:attributeGroup ref="TrackChangeAttributes"/>
    <xsd:attributeGroup ref="ExtendedAttributes"/>
  </xsd:complexType>

  <xsd:complexType name="AnchorType">
    <xsd:annotation>
      <xsd:documentation>Anchors are InlineTypes with a couple of extra attributes.</xsd:documentation>
    </xsd:annotation>
    <xsd:attribute name="id" type="xsd:string" use="required"/>
    <xsd:attribute name="name" type="xsd:string" use="optional"/>
    <xsd:attributeGroup ref="TrackChangeAttributes"/>
    <xsd:attributeGroup ref="ExtendedAttributes"/>
  </xsd:complexType>

  <xsd:complexType name="RefType">
    <xsd:annotation>
      <xsd:documentation>A cross-reference. New in Typefi Publish 6.</xsd:documentation>
    </xsd:annotation>
    <xsd:attribute name="refType" type="RefTypeEnumeration" use="required"/>
    <xsd:attribute name="refId" type="xsd:string" use="required"/>
    <xsd:attribute name="format" type="xsd:string" use="required"/>
    <xsd:attributeGroup ref="TrackChangeAttributes"/>
    <xsd:attributeGroup ref="ExtendedAttributes"/>
  </xsd:complexType>

  <xsd:simpleType name="RefTypeEnumeration">
    <xsd:annotation>
      <xsd:documentation>Valid values for the &lt;ref&gt; refType attribute. New in Typefi Publish 6.</xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="xsd:string">
      <xsd:enumeration value="anchor"/>
      <xsd:enumeration value="paragraph"/>
    </xsd:restriction>
  </xsd:simpleType>

  <xsd:complexType name="WhitespaceType">
    <xsd:annotation>
      <xsd:documentation>Whitespace is an empty element with a single attribute.</xsd:documentation>
    </xsd:annotation>
    <xsd:attribute name="c" type="xsd:integer" use="optional"/>
    <xsd:attributeGroup ref="TrackChangeAttributes"/>
    <xsd:attributeGroup ref="ExtendedAttributes"/>
  </xsd:complexType>

  <xsd:complexType name="CommentType">
    <xsd:annotation>
      <xsd:documentation>Comments are used to store word comments.</xsd:documentation>
    </xsd:annotation>
    <xsd:sequence>
      <xsd:choice minOccurs="1" maxOccurs="unbounded">
        <xsd:group ref="ContentGroup"/>
      </xsd:choice>
    </xsd:sequence>
    <xsd:attribute name="id" type="xsd:string" use="optional"/>
    <xsd:attribute name="initials" type="xsd:string" use="optional"/>
    <xsd:attributeGroup ref="TrackChangeAttributes"/>
    <xsd:attributeGroup ref="ExtendedAttributes"/>
  </xsd:complexType>

  <xsd:group name="Headings">
    <xsd:annotation>
      <xsd:documentation>The common group of heading elements.</xsd:documentation>
    </xsd:annotation>
    <xsd:choice>
      <xsd:element name="h1" type="InlineType"/>
      <xsd:element name="h2" type="InlineType"/>
      <xsd:element name="h3" type="InlineType"/>
      <xsd:element name="h4" type="InlineType"/>
      <xsd:element name="h5" type="InlineType"/>
      <xsd:element name="h6" type="InlineType"/>
    </xsd:choice>
  </xsd:group>

  <xsd:group name="CommonInlineElements">
    <xsd:annotation>
      <xsd:documentation>The common group of inline elements available anywhere inline.</xsd:documentation>
    </xsd:annotation>
    <xsd:choice>
      <xsd:element name="context" type="ContextType"/>
      <xsd:element name="image" type="ImageType"/>
      <xsd:element name="video" type="VideoType"/>
      <xsd:element name="audio" type="AudioType"/>
      <xsd:element name="footnote" type="FootnoteType"/>
      <xsd:element name="endnote" type="FootnoteType"/>
      <xsd:element name="comment" type="CommentType"/>
      <xsd:element name="anchor" type="AnchorType"/>
      <xsd:element name="ref" type="RefType"/>
      <xsd:element name="t" type="WhitespaceType"/>
      <xsd:element name="s" type="WhitespaceType"/>
      <xsd:element name="l" type="WhitespaceType"/>
      <xsd:element name="liRef" type="ListItemReferenceType"/>
      <xsd:element name="indexterm" type="IndexTermType"/>
      <xsd:element name="char" type="CharType"/>
      <xsd:element name="meta" type="MetadataType"/>
      <xsd:element name="fieldRef" type="FieldRefType"/>
      <xsd:any namespace="##other" minOccurs="0" maxOccurs="unbounded" processContents="skip"/>
    </xsd:choice>
  </xsd:group>

  <xsd:group name="InlineElements">
    <xsd:annotation>
      <xsd:documentation>Reusable group of inline elements.</xsd:documentation>
    </xsd:annotation>
    <xsd:choice>
      <xsd:group ref="CommonInlineElements"/>
      <xsd:element name="c" type="InlineType"/>
      <xsd:element name="condition" type="ConditionInlineType"/>
      <xsd:element name="link" type="LinkType"/>
      <xsd:element name="doclink" type="DocLinkType"/>
      <xsd:element name="style" type="SoftStyleInlineType"/>
      <xsd:element name="table" type="TableType"/>
    </xsd:choice>
  </xsd:group>

  <xsd:group name="LinkInlineElements">
    <xsd:annotation>
      <xsd:documentation>Reusable group of inline elements allowed within links.</xsd:documentation>
    </xsd:annotation>
    <xsd:choice>
      <xsd:group ref="CommonInlineElements"/>
      <xsd:element name="c" type="SubLinkType"/>
      <xsd:element name="condition" type="SubLinkType"/>
      <xsd:element name="style" type="SoftStyleSubLinkType"/>
    </xsd:choice>
  </xsd:group>

  <xsd:complexType name="InlineType" mixed="true">
    <xsd:annotation>
      <xsd:documentation>Paras are composed of inline elements.</xsd:documentation>
    </xsd:annotation>
    <xsd:choice minOccurs="0" maxOccurs="unbounded">
      <xsd:group ref="InlineElements"/>
    </xsd:choice>
    <xsd:attribute name="type" type="xsd:string" use="optional"/>
    <xsd:attribute name="id" type="xsd:string" use="optional"/>
    <xsd:attribute name="style" type="xsd:string" use="optional"/>
    <xsd:attribute ref="xml:lang" use="optional"/>
    <xsd:attributeGroup ref="TrackChangeAttributes"/>
    <xsd:attributeGroup ref="ExtendedAttributes"/>
  </xsd:complexType>

  <xsd:attributeGroup name="SoftStyleAttributes">
    <xsd:attribute name="type" type="StyleType" use="optional"/>
    <xsd:attribute name="id" type="xsd:string" use="optional"/>
    <xsd:attribute ref="xml:lang" use="optional"/>
    <xsd:attributeGroup ref="TrackChangeAttributes"/>
    <xsd:attributeGroup ref="ExtendedAttributes"/>
  </xsd:attributeGroup>

  <xsd:attributeGroup name="TrackChangeAttributes">
    <xsd:attribute name="status" type="StatusTypeEnumeration" use="optional"/>
    <xsd:attribute name="author" type="xsd:string" use="optional"/>
    <xsd:attribute name="dateTime" type="xsd:dateTime" use="optional"/>
  </xsd:attributeGroup>

  <xsd:attributeGroup name="ExtendedAttributes">
    <xsd:anyAttribute namespace="http://www.typefi.com/ContentXML/Extensions" processContents="skip"/>
  </xsd:attributeGroup>

  <xsd:complexType name="SoftStyleInlineType" mixed="true">
    <xsd:choice minOccurs="0" maxOccurs="unbounded">
      <xsd:group ref="InlineElements"/>
    </xsd:choice>
    <xsd:attributeGroup ref="SoftStyleAttributes"/>
  </xsd:complexType>

  <xsd:complexType name="ParaType" mixed="true">
    <xsd:annotation>
      <xsd:documentation>Derived from InlineType; excluded tables.</xsd:documentation>
    </xsd:annotation>
    <xsd:choice minOccurs="0" maxOccurs="unbounded">
      <xsd:group ref="CommonInlineElements"/>
      <xsd:element name="c" type="InlineType"/>
      <xsd:element name="condition" type="ConditionInlineType"/>
      <xsd:element name="link" type="LinkType"/>
      <xsd:element name="doclink" type="DocLinkType"/>
      <xsd:element name="style" type="SoftStyleInlineType"/>
    </xsd:choice>
    <xsd:attribute name="type" type="xsd:string" use="optional"/>
    <xsd:attribute name="id" type="xsd:string" use="optional"/>
    <xsd:attribute name="style" type="xsd:string" use="optional"/>
    <xsd:attribute ref="xml:lang" use="optional"/>
  </xsd:complexType>

  <xsd:complexType name="ConditionInlineType" mixed="true">
    <xsd:annotation>
      <xsd:documentation>Conditions are composed of inline elements without style attribute.</xsd:documentation>
    </xsd:annotation>
    <xsd:choice minOccurs="0" maxOccurs="unbounded">
      <xsd:group ref="InlineElements"/>
    </xsd:choice>
    <xsd:attribute name="type" type="xsd:string" use="optional"/>
    <xsd:attribute name="id" type="xsd:string" use="optional"/>
    <xsd:attribute ref="xml:lang" use="optional"/>
    <xsd:attributeGroup ref="TrackChangeAttributes"/>
    <xsd:attributeGroup ref="ExtendedAttributes"/>
  </xsd:complexType>

  <xsd:complexType name="LinkType" mixed="true">
    <xsd:annotation>
      <xsd:documentation>A link contains the reference and an optional label.</xsd:documentation>
    </xsd:annotation>
    <xsd:choice minOccurs="0" maxOccurs="unbounded">
      <xsd:group ref="LinkInlineElements"/>
    </xsd:choice>
    <xsd:attribute name="ref" type="xsd:string" use="required"/>
    <xsd:attribute name="label" type="xsd:string" use="optional"/>
    <xsd:attributeGroup ref="TrackChangeAttributes"/>
    <xsd:attributeGroup ref="ExtendedAttributes"/>
  </xsd:complexType>

  <xsd:complexType name="DocLinkType" mixed="true">
    <xsd:annotation>
      <xsd:documentation>A doclink contains the reference and an optional label.</xsd:documentation>
    </xsd:annotation>
    <xsd:choice minOccurs="0" maxOccurs="unbounded">
      <xsd:group ref="LinkInlineElements"/>
    </xsd:choice>
    <xsd:attribute name="refType" type="RefTypeEnumeration" use="required"/>
    <xsd:attribute name="refId" type="xsd:string" use="required"/>
    <xsd:attributeGroup ref="TrackChangeAttributes"/>
    <xsd:attributeGroup ref="ExtendedAttributes"/>
  </xsd:complexType>

  <xsd:complexType name="SubLinkType" mixed="true">
    <xsd:annotation>
      <xsd:documentation>
        The sub link type is a helper construction to avoid the use of tps:link
        inside tps:c and tps:condition if this occur in the context of a
        tps:link. The attribute id is needed for conditions.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:choice minOccurs="0" maxOccurs="unbounded">
      <xsd:group ref="LinkInlineElements"/>
    </xsd:choice>
    <xsd:attribute name="type" type="xsd:string" use="optional"/>
    <xsd:attribute name="id" type="xsd:string" use="optional"/>
  </xsd:complexType>

  <xsd:complexType name="SoftStyleSubLinkType" mixed="true">
    <xsd:choice minOccurs="0" maxOccurs="unbounded">
      <xsd:group ref="LinkInlineElements"/>
    </xsd:choice>
    <xsd:attributeGroup ref="SoftStyleAttributes"/>
  </xsd:complexType>

  <xsd:complexType name="BreakType">
    <xsd:annotation>
      <xsd:documentation>Break type.</xsd:documentation>
    </xsd:annotation>
    <xsd:attribute name="type" type="BreakTypeEnumeration" use="required"/>
  </xsd:complexType>

  <xsd:simpleType name="BreakTypeEnumeration">
    <xsd:annotation>
      <xsd:documentation>Valid values for the type attribute of &lt;break&gt; tags.</xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="xsd:string">
      <xsd:enumeration value="column"/>
      <xsd:enumeration value="frame"/>
      <xsd:enumeration value="evenPage"/>
      <xsd:enumeration value="oddPage"/>
      <xsd:enumeration value="page"/>
    </xsd:restriction>
  </xsd:simpleType>

  <xsd:complexType name="CharType">
    <xsd:annotation>
      <xsd:documentation>Char type.</xsd:documentation>
    </xsd:annotation>
    <xsd:attribute name="type" type="CharTypeEnumeration" use="required"/>
    <xsd:attributeGroup ref="TrackChangeAttributes"/>
    <xsd:attributeGroup ref="ExtendedAttributes"/>
  </xsd:complexType>

  <xsd:simpleType name="CharTypeEnumeration">
    <xsd:annotation>
      <xsd:documentation>Valid values for the type attribute of &lt;char&gt; tags.</xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="xsd:string">
      <xsd:enumeration value="currentPageNumber"/>
      <xsd:enumeration value="nextPageNumber"/>
      <xsd:enumeration value="previousPageNumber"/>
      <xsd:enumeration value="sectionMarker"/>
      <xsd:enumeration value="rightIndentTab"/>
      <xsd:enumeration value="indentToHere"/>
      <xsd:enumeration value="endNestedStyleHere"/>
    </xsd:restriction>
  </xsd:simpleType>

  <xsd:complexType name="StyledTextType" mixed="true">
    <xsd:annotation>
      <xsd:documentation>Styled text is mixed with character styles and whitespace.</xsd:documentation>
    </xsd:annotation>
    <xsd:choice minOccurs="0" maxOccurs="unbounded">
      <xsd:element name="c" type="StyledTextType"/>
      <xsd:element name="t" type="WhitespaceType"/>
      <xsd:element name="s" type="WhitespaceType"/>
      <xsd:element name="l" type="WhitespaceType"/>
      <xsd:element name="liRef" type="ListItemReferenceType"/>
      <xsd:element name="condition" type="StyledTextType"/>
      <xsd:element name="style" type="SoftStyleTextType"/>
      <xsd:element name="meta" type="MetadataType"/>
    </xsd:choice>
    <xsd:attribute name="type" type="xsd:string" use="optional"/>
    <xsd:attribute name="id" type="xsd:string" use="optional"/>
  </xsd:complexType>

  <xsd:complexType name="SoftStyleTextType" mixed="true">
    <xsd:choice minOccurs="0" maxOccurs="unbounded">
      <xsd:element name="c" type="StyledTextType"/>
      <xsd:element name="t" type="WhitespaceType"/>
      <xsd:element name="s" type="WhitespaceType"/>
      <xsd:element name="l" type="WhitespaceType"/>
      <xsd:element name="liRef" type="ListItemReferenceType"/>
      <xsd:element name="condition" type="StyledTextType"/>
      <xsd:element name="style" type="SoftStyleTextType"/>
      <xsd:element name="meta" type="MetadataType"/>
    </xsd:choice>
    <xsd:attribute name="type" type="StyleType" use="required"/>
    <xsd:attribute name="id" type="xsd:string" use="optional"/>
  </xsd:complexType>

  <xsd:complexType name="FieldSetType">
    <xsd:annotation>
      <xsd:documentation>A field set contains the field's 'name' and 'value'.</xsd:documentation>
    </xsd:annotation>
    <xsd:attribute name="id" type="xsd:string" use="optional"/>
    <xsd:attribute name="name" type="xsd:string" use="required"/>
    <xsd:attribute name="value" type="xsd:string" use="optional"/>
  </xsd:complexType>

  <xsd:complexType name="FieldRefType" mixed="true">
    <xsd:annotation>
      <xsd:documentation>A field ref allows a field value to be substituted anywhere in content.</xsd:documentation>
    </xsd:annotation>
    <xsd:attribute name="name" type="xsd:string" use="required"/>
    <xsd:attribute name="refId" type="xsd:string" use="optional"/>
    <xsd:attributeGroup ref="TrackChangeAttributes"/>
    <xsd:attributeGroup ref="ExtendedAttributes"/>
  </xsd:complexType>

  <xsd:complexType name="SimpleTextType" mixed="true">
    <xsd:choice minOccurs="0" maxOccurs="unbounded">
      <xsd:element name="t" type="WhitespaceType"/>
      <xsd:element name="s" type="WhitespaceType"/>
      <xsd:element name="l" type="WhitespaceType"/>
    </xsd:choice>
  </xsd:complexType>

  <xsd:complexType name="IndexTermType">
    <xsd:annotation>
      <xsd:documentation>
        An index term. Similar to http://www.docbook.org/tdg/en/html/indexterm.html
      </xsd:documentation>
    </xsd:annotation>
    <xsd:sequence>
      <xsd:element name="primary" minOccurs="0" maxOccurs="1" type="IndexTopicType"/>
      <xsd:element name="secondary" minOccurs="0" maxOccurs="1" type="IndexTopicType"/>
      <xsd:element name="tertiary" minOccurs="0" maxOccurs="1" type="IndexTopicType"/>
      <xsd:element name="quaternary" minOccurs="0" maxOccurs="1" type="IndexTopicType"/>
      <xsd:choice minOccurs="0" maxOccurs="1">
        <xsd:element name="see" type="IndexReferenceType"/>
        <xsd:element name="seealso" type="IndexReferenceType"/>
      </xsd:choice>
    </xsd:sequence>
    <xsd:attribute name="class" type="IndexTermClassEnumeration" use="optional"/>
    <xsd:attribute name="id" type="xsd:string" use="optional"/>
    <xsd:attribute name="startref" type="xsd:string" use="optional"/>
    <xsd:attribute name="pageNumberStyle" type="xsd:string" use="optional"/>
    <xsd:attributeGroup ref="TrackChangeAttributes"/>
    <xsd:attributeGroup ref="ExtendedAttributes"/>
  </xsd:complexType>

  <xsd:complexType name="IndexTopicType" mixed="true">
    <xsd:annotation>
      <xsd:documentation>An index topic.</xsd:documentation>
    </xsd:annotation>
    <xsd:choice minOccurs="0" maxOccurs="unbounded">
      <xsd:element name="c" type="IndexTopicCharStyleType"/>
      <xsd:element name="s" type="WhitespaceType"/>
      <xsd:element name="meta" type="MetadataType"/>
    </xsd:choice>
    <xsd:attribute name="sortas" type="xsd:string" use="optional"/>
  </xsd:complexType>

  <xsd:complexType name="IndexTopicCharStyleType" mixed="true">
    <xsd:annotation>
      <xsd:documentation>A char style within an index topic.</xsd:documentation>
    </xsd:annotation>
    <xsd:choice minOccurs="0" maxOccurs="unbounded">
      <xsd:element name="s" type="WhitespaceType"/>
    </xsd:choice>
    <xsd:attribute name="type" type="xsd:string" use="required"/>
  </xsd:complexType>

  <xsd:complexType name="IndexReferenceType" mixed="true">
    <xsd:annotation>
      <xsd:documentation>An index reference.</xsd:documentation>
    </xsd:annotation>
  </xsd:complexType>

  <xsd:simpleType name="IndexTermClassEnumeration">
    <xsd:annotation>
      <xsd:documentation>
        Valid values for the @class attribute of &lt;indexterm&gt; entries.
        Used to denote that the indexterm marks a range of content. There are
        two supported ways to mark a range.

        Example usage for the Microsoft Word style range:

          &lt;indexterm class="bookmark" id="Arizona"&gt;
            &lt;primary&gt;Arizona&lt;/primary&gt;
          &lt;/indexterm&gt;
          ...
          &lt;anchor name="Arizona"/&gt;

        Example usage for the DocBook style range:

          &lt;indexterm class="startofrange" id="Arizona"&gt;
            &lt;primary&gt;Arizona&lt;/primary&gt;
          &lt;/indexterm&gt;
          ...
          &lt;indexterm class="endofrange" startref="Arizona"/&gt;
      </xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="xsd:string">
      <xsd:enumeration value="bookmark"/>
      <xsd:enumeration value="startofrange"/>
      <xsd:enumeration value="endofrange"/>
    </xsd:restriction>
  </xsd:simpleType>

  <xsd:complexType name="TocType">
    <xsd:annotation>
      <xsd:documentation>A Table Of Contents (TOC) tag. New in CXML 3.1 for Typefi 8.4.0.</xsd:documentation>
    </xsd:annotation>
    <xsd:sequence>
      <xsd:choice minOccurs="0" maxOccurs="unbounded">
        <xsd:group ref="ContentGroup"/>
      </xsd:choice>
    </xsd:sequence>
    <xsd:attribute name="type" type="xsd:string" use="optional"/>
  </xsd:complexType>

  <xsd:complexType name="MetadataType">
    <xsd:annotation>
      <xsd:documentation>
        A Metadata tag. New in CXML 3.1 for Typefi 8.4.0.
        Updated in CXML 3.2 to no longer allow nested tags within.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:simpleContent>
      <xsd:extension base="xsd:string">
        <xsd:attribute name="type" type="xsd:string" use="optional"/>
        <xsd:attributeGroup ref="TrackChangeAttributes"/>
        <xsd:attributeGroup ref="ExtendedAttributes"/>
      </xsd:extension>
    </xsd:simpleContent>
  </xsd:complexType>

  <xsd:complexType name="SectionType">
    <xsd:annotation>
      <xsd:documentation>
        A section consists of (optional) section fields followed by a possibly
        large amount of mixed section content.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:sequence>
      <xsd:element name="fieldSet" minOccurs="0" maxOccurs="unbounded" type="FieldSetType">
        <xsd:annotation>
          <xsd:documentation>Section fields.</xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:choice minOccurs="0" maxOccurs="unbounded">
        <xsd:group ref="ContentGroup"/>
      </xsd:choice>
    </xsd:sequence>
    <xsd:attribute name="type" type="xsd:string" use="required"/>
    <xsd:attribute name="id" type="xsd:string" use="optional"/>
    <xsd:attribute name="condition" type="xsd:string" use="optional"/>
    <xsd:attribute name="strictSpace" type="xsd:boolean" use="optional">
      <xsd:annotation>
        <xsd:documentation>Deprecated from Typefi Publish 6. Prefer `whiteSpaceMode`.</xsd:documentation>
      </xsd:annotation>
    </xsd:attribute>
    <xsd:attribute name="whiteSpaceMode" type="WhiteSpaceModeEnumeration" use="optional"/>
    <xsd:attribute ref="xml:lang" use="optional"/>
    <xsd:attribute name="startPageNumber" type="xsd:integer" use="optional"/>
    <xsd:attribute name="continuePageNumbering" type="xsd:boolean" use="optional"/>
    <xsd:attributeGroup ref="TrackChangeAttributes"/>
    <xsd:attributeGroup ref="ExtendedAttributes"/>
  </xsd:complexType>

  <xsd:element name="content">
    <xsd:annotation>
      <xsd:documentation>
        A CXML document essentially consists of a top-level &lt;content&gt;
        element wrapped around a sequence of &lt;section&gt; elements.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element name="fieldSet" minOccurs="0" maxOccurs="unbounded" type="FieldSetType">
          <xsd:annotation>
            <xsd:documentation>Project fields.</xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:choice minOccurs="0" maxOccurs="unbounded">
          <xsd:element name="section" type="SectionType"/>
          <xsd:element name="meta" type="MetadataType"/>
        </xsd:choice>
      </xsd:sequence>
      <xsd:attribute name="type" type="xsd:string" use="optional">
        <xsd:annotation>
          <xsd:documentation>Deprecated.</xsd:documentation>
        </xsd:annotation>
      </xsd:attribute>
      <xsd:attribute name="schemaVersion" use="optional" type="xsd:string"/>
      <xsd:attribute name="strictSpace" type="xsd:boolean" use="optional">
        <xsd:annotation>
          <xsd:documentation>Deprecated from Typefi Publish 6. Prefer `whiteSpaceMode`.</xsd:documentation>
        </xsd:annotation>
      </xsd:attribute>
      <xsd:attribute name="whiteSpaceMode" type="WhiteSpaceModeEnumeration" use="optional"/>
      <xsd:attribute ref="xml:lang" use="optional"/>
    </xsd:complexType>
  </xsd:element>

</xsd:schema>