<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
           targetNamespace="http://www.w3.org/1999/xhtml"
           xmlns="http://www.w3.org/1999/xhtml"
           xmlns:myml="http://www.example.com/xmlns/myml">

  <xs:annotation>
    <xs:documentation>
      This is the XML Schema module of common content models for MyML
      $Id: myml-model-1.xsd,v 1.1 2018/03/20 04:18:45 plehegar Exp $
    </xs:documentation>
    <xs:documentation source="http://www.w3.org/MarkUp/SCHEMA/xhtml-copyright-1.xsd"/>
  </xs:annotation>

  <xs:annotation>
    <xs:documentation>
      XHTML + MyML Document Model

      This module describes the groupings of elements/attributes that make up
      common content models for XHTML elements.

      XHTML has following basic content models:

          Inline.mix;          character-level elements
          Block.mix;           block-like elements, eg., paragraphs and lists
          Flow.mix;            any block or inline elements
          HeadOpts.mix;        Head Elements
          InlinePre.mix;     Special class for pre content model
          InlineNoAnchor.mix;  Content model for Anchor

      Any groups declared in this module may be used
      to create element content models, but the above are
      considered 'global' (insofar as that term applies here).

      XHTML has the following Attribute Groups
           Core.extra.attrib
           I18n.extra.attrib
           Common.extra

      The above attribute Groups are considered Global

    </xs:documentation>
  </xs:annotation>

   <xs:import namespace="http://www.example.com/xmlns/myml"/>

   <xs:attributeGroup name="xhtml.I18n.extra.attrib">
      <xs:annotation>
        <xs:documentation>
          Extended I18n attribute
        </xs:documentation>
      </xs:annotation>
   </xs:attributeGroup>

   <xs:attributeGroup name="xhtml.Core.extra.attrib">
      <xs:annotation>
        <xs:documentation>
           Extended Core Attributes
        </xs:documentation>
      </xs:annotation>
   </xs:attributeGroup>

   <xs:attributeGroup name="xhtml.Common.extra">
      <xs:annotation>
        <xs:documentation>
           Extended Common Attributes
        </xs:documentation>
      </xs:annotation>
   </xs:attributeGroup>

  <xs:attributeGroup name="xhtml.Global.core.extra.attrib">
      <xs:annotation>
        <xs:documentation>
           Extended Global Core Attributes
        </xs:documentation>
      </xs:annotation>
  </xs:attributeGroup>

  <xs:attributeGroup name="xhtml.Global.I18n.extra.attrib">
      <xs:annotation>
        <xs:documentation>
           Extended Global I18n attributes
        </xs:documentation>
      </xs:annotation>
  </xs:attributeGroup>

   <xs:attributeGroup name="xhtml.Global.Common.extra">
      <xs:annotation>
        <xs:documentation>
           Extended Global Common Attributes
        </xs:documentation>
      </xs:annotation>
   </xs:attributeGroup>

  <xs:group name="xhtml.HeadOpts.mix">
    <xs:choice>
      <xs:element ref="meta"/>
      <xs:element ref="link"/>
      <xs:element ref="object"/>
    </xs:choice>
  </xs:group>

  <!--
    These elements are neither block nor inline, and can
    essentially be used anywhere in the document body.
  -->
  <xs:group name="xhtml.Misc.class">
    <xs:choice>
      <xs:element ref="myml:myelement"/>
    </xs:choice>
  </xs:group>

  <!-- Inline Elements -->
  <xs:group name="xhtml.InlStruct.class">
    <xs:choice>
      <xs:element ref="br"/>
      <xs:element ref="span"/>
    </xs:choice>
  </xs:group>

  <xs:group name="xhtml.InlPhras.class">
    <xs:choice>
      <xs:element ref="em"/>
      <xs:element ref="strong"/>
      <xs:element ref="dfn"/>
      <xs:element ref="code"/>
      <xs:element ref="samp"/>
      <xs:element ref="kbd"/>
      <xs:element ref="var"/>
      <xs:element ref="cite"/>
      <xs:element ref="abbr"/>
      <xs:element ref="acronym"/>
      <xs:element ref="q"/>
    </xs:choice>
  </xs:group>

  <xs:group name="xhtml.InlPres.class">
    <xs:choice/>
  </xs:group>

  <xs:group name="xhtml.I18n.class">
    <xs:sequence/>
  </xs:group>

  <xs:group name="xhtml.Anchor.class">
    <xs:sequence>
      <xs:element ref="a"/>
    </xs:sequence>
  </xs:group>

  <xs:group name="xhtml.InlSpecial.class">
    <xs:choice>
      <xs:element ref="img"/>
      <xs:element ref="object"/>
    </xs:choice>
  </xs:group>

  <xs:group name="xhtml.InlForm.class">
    <xs:choice>
      <xs:element ref="input"/>
      <xs:element ref="select"/>
      <xs:element ref="textarea"/>
      <xs:element ref="label"/>
    </xs:choice>
  </xs:group>

  <xs:group name="xhtml.Inline.extra">
    <xs:choice/>
  </xs:group>

  <!--xs:group name="Ruby.class">
    <xs:sequence/>
  </xs:group-->

  <!--
   Inline.class includes all inline elements,
   used as a component in mixes
  -->
  <xs:group name="xhtml.Inline.class">
    <xs:choice>
      <xs:group ref="xhtml.InlStruct.class"/>
      <xs:group ref="xhtml.InlPhras.class"/>
      <xs:group ref="xhtml.Anchor.class"/>
      <xs:group ref="xhtml.InlSpecial.class"/>
      <xs:group ref="xhtml.InlForm.class"/>
      <xs:group ref="xhtml.Inline.extra"/>
    </xs:choice>
  </xs:group>

  <!--
    InlinePre.class
    Used as a component in pre model
  -->
  <xs:group name="xhtml.InlinePre.mix">
    <xs:choice>
      <xs:group ref="xhtml.InlStruct.class"/>
      <xs:group ref="xhtml.InlPhras.class"/>
      <xs:group ref="xhtml.Anchor.class"/>
      <xs:group ref="xhtml.Inline.extra"/>
    </xs:choice>
  </xs:group>


  <!--
    InlNoAnchor.class includes all non-anchor inlines,
    used as a component in mixes
  -->
  <xs:group name="xhtml.InlNoAnchor.class">
    <xs:choice>
      <xs:group ref="xhtml.InlStruct.class"/>
      <xs:group ref="xhtml.InlPhras.class"/>
      <xs:group ref="xhtml.InlSpecial.class"/>
      <xs:group ref="xhtml.InlForm.class"/>
      <xs:group ref="xhtml.Inline.extra"/>
    </xs:choice>
  </xs:group>

  <!--
   InlNoAnchor.mix includes all non-anchor inlines
  -->
  <xs:group name="xhtml.InlNoAnchor.mix">
    <xs:choice>
      <xs:group ref="xhtml.InlNoAnchor.class"/>
      <xs:group ref="xhtml.Misc.class"/>
    </xs:choice>
  </xs:group>

  <!--
   Inline.mix includes all inline elements, including Misc.class
  -->
  <xs:group name="xhtml.Inline.mix">
    <xs:choice>
      <xs:group ref="xhtml.Inline.class"/>
      <xs:group ref="xhtml.Misc.class"/>
    </xs:choice>
  </xs:group>

  <!--
   In the HTML 4 DTD, heading and list elements were included
   in the block group. The Heading.class and
   List.class groups must now be included explicitly
   on element declarations where desired.
  -->
  <xs:group name="xhtml.Heading.class">
    <xs:choice>
      <xs:element ref="h1"/>
      <xs:element ref="h2"/>
      <xs:element ref="h3"/>
      <xs:element ref="h4"/>
      <xs:element ref="h5"/>
      <xs:element ref="h6"/>
    </xs:choice>
  </xs:group>

  <xs:group name="xhtml.List.class">
    <xs:choice>
      <xs:element ref="ul"/>
      <xs:element ref="ol"/>
      <xs:element ref="dl"/>
    </xs:choice>
  </xs:group>

  <xs:group name="xhtml.Table.class">
    <xs:choice>
      <xs:element ref="table"/>
    </xs:choice>
  </xs:group>

  <xs:group name="xhtml.Form.class">
    <xs:choice>
      <xs:element ref="form"/>
    </xs:choice>
  </xs:group>

  <xs:group name="xhtml.BlkStruct.class">
    <xs:choice>
      <xs:element ref="p"/>
      <xs:element ref="div"/>
    </xs:choice>
  </xs:group>

  <xs:group name="xhtml.BlkPhras.class">
    <xs:choice>
      <xs:element ref="pre"/>
      <xs:element ref="blockquote"/>
      <xs:element ref="address"/>
    </xs:choice>
  </xs:group>

  <xs:group name="xhtml.BlkPres.class">
     <xs:choice/>
  </xs:group>

  <xs:group name="xhtml.BlkSpecial.class">
    <xs:choice>
      <xs:group ref="xhtml.Table.class"/>
      <xs:group ref="xhtml.Form.class"/>
    </xs:choice>
  </xs:group>

  <xs:group name="xhtml.Block.extra">
     <xs:choice/>
  </xs:group>

  <!--
   Block.class includes all block elements,
    used as an component in mixes
  -->
  <xs:group name="xhtml.Block.class">
    <xs:choice>
      <xs:group ref="xhtml.BlkStruct.class"/>
      <xs:group ref="xhtml.BlkPhras.class"/>
      <xs:group ref="xhtml.BlkSpecial.class"/>
      <xs:group ref="xhtml.Block.extra"/>
    </xs:choice>
  </xs:group>

  <!--
   Block.mix includes all block elements plus %Misc.class;
  -->
  <xs:group name="xhtml.Block.mix">
    <xs:choice>
      <xs:group ref="xhtml.Heading.class"/>
      <xs:group ref="xhtml.List.class"/>
      <xs:group ref="xhtml.Block.class"/>
      <xs:group ref="xhtml.Misc.class"/>
    </xs:choice>
  </xs:group>

  <!--
    All Content Elements

   Flow.mix includes all text content, block and inline
   Note that the "any" element included here allows us
   to add data from any other namespace, a necessity
   for compound document creation.
   Note however that it is not possible to add
   to any head level element without further
   modification. To add RDF metadata to the head
   of a document, modify the structure module.
  -->
  <xs:group name="xhtml.Flow.mix">
    <xs:choice>
      <xs:group ref="xhtml.Heading.class"/>
      <xs:group ref="xhtml.List.class"/>
      <xs:group ref="xhtml.Block.class"/>
      <xs:group ref="xhtml.Inline.class"/>
      <xs:group ref="xhtml.Misc.class"/>
    </xs:choice>
  </xs:group>


  <xs:group name="xhtml.FlowNoTable.mix">
    <xs:choice>
      <xs:group ref="xhtml.Heading.class"/>
      <xs:group ref="xhtml.List.class"/>
      <xs:group ref="xhtml.BlkStruct.class"/>
      <xs:group ref="xhtml.BlkPhras.class"/>
      <xs:group ref="xhtml.Form.class"/>
      <xs:group ref="xhtml.Inline.class"/>
      <xs:group ref="xhtml.Misc.class"/>
    </xs:choice>
  </xs:group>

  <!--
    BlkNoForm.mix includes all non-form block elements,
    plus Misc.class
  -->
  <xs:group name="xhtml.BlkNoForm.mix">
    <xs:choice>
      <xs:group ref="xhtml.Heading.class"/>
      <xs:group ref="xhtml.List.class"/>
      <xs:group ref="xhtml.BlkStruct.class"/>
      <xs:group ref="xhtml.BlkPhras.class"/>
      <xs:group ref="xhtml.BlkPres.class"/>
      <xs:group ref="xhtml.Table.class"/>
      <xs:group ref="xhtml.Misc.class"/>
    </xs:choice>
  </xs:group>
  <xs:element name="html" type="xhtml.html.type"/>

</xs:schema>
