D. XHTML 2.0 Schema

Contents

This appendix is normative.

D.1. XHTML 2 Schema Driver

This section contains the driver for the XHTML 2 document type implementation as an XML Schema. Note that the structure and techniques in these driver files are as described in Modularization of XHTML [XHTMLMOD].

<?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:xh11d="http://www.w3.org/1999/xhtml/datatypes/"
    xmlns="http://www.w3.org/1999/xhtml"
    elementFormDefault="qualified" >
    <xs:annotation>
        <xs:documentation>
      This is the XML Schema driver for XHTML 1.1.
      Please use this namespace for XHTML elements:
         "http://www.w3.org/1999/xhtml"
      $Id: xhtml2.xsd,v 1.1.2.1 2009/01/16 17:50:25 ahby Exp $
    </xs:documentation>
        <xs:documentation source="xhtml-copyright-1.xsd"/>
    </xs:annotation>
    <xs:annotation>
        <xs:documentation>
      This is XHTML, a reformulation of HTML as a modular XML application
      The Extensible HyperText Markup Language (XHTML)
      Copyright &#169;1998-2007 World Wide Web Consortium
      (Massachusetts Institute of Technology, European Research Consortium
       for Informatics and Mathematics, Keio University).
      All Rights Reserved.
      Permission to use, copy, modify and distribute the XHTML Schema
      modules and their accompanying xs:documentation for any purpose
      and without fee is hereby granted in perpetuity, provided that the above
      copyright notice and this paragraph appear in all copies.
      The copyright holders make no representation about the suitability of
      these XML Schema modules for any purpose.
      They are provided "as is" without expressed or implied warranty.
    </xs:documentation>
    </xs:annotation>
    <xs:annotation>
        <xs:documentation>
      This is the Schema Driver file for XHTML2
      Document Type
     This schema
        + imports external schemas (xml.xsd)
        + refedines (and include)s schema modules for XHTML2 Document Type.
        + includes Schema for Named content model for the
          XHTML2 Document Type
        XHTML2 Document Type includes the following Modules
           XHTML Core modules (Required for XHTML Family Conformance)
            +  text
            +  hypertext
            +  lists
            +  structure
           Other XHTML modules
            +  Edit
            +  Bdo
            +  Presentational
            +  Link
            +  Meta
            +  Base
            +  Scripting
            +  Style
            +  Image
            +  Applet
            +  Object
            +  Param (Applet/Object modules require Param Module)
            +  Tables
            +  Forms
            +  Client side image maps
            +  Server side image maps
            +  Ruby
    </xs:documentation>
    </xs:annotation>
    <xs:import
        namespace="http://www.w3.org/XML/1998/namespace"
        schemaLocation="http://www.w3.org/2001/xml.xsd">
        <xs:annotation>
            <xs:documentation>
         This import brings in the XML namespace attributes
         The XML attributes are used by various modules.
       </xs:documentation>
        </xs:annotation>
    </xs:import>
    <xs:import
        namespace="http://www.w3.org/1999/xhtml/datatypes/"
        schemaLocation="xhtml-datatypes-2.xsd"/>
    <xs:include
        schemaLocation="xhtml2-modules-1.xsd">
        <xs:annotation>
            <xs:documentation>
        Schema that includes all modules (and redefinitions)
        for XHTML2 Document Type.                
           </xs:documentation>
        </xs:annotation>
    </xs:include>
    <xs:include
        schemaLocation="xhtml2-model-1.xsd">
        <xs:annotation>
            <xs:documentation>
        Document Model module for the XHTML2 Document Type.
        This schema file defines all named models used by XHTML
        Modularization Framework for XHTML2 Document Type
      </xs:documentation>
        </xs:annotation>
    </xs:include>
</xs:schema>

D.2. XHTML 2 Attribute Collections

This section contains a driver that accumulates all of the attribute collections and defines the Common collection based upon them.

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema
 xmlns:xs="http://www.w3.org/2001/XMLSchema"
 elementFormDefault="qualified"
 xmlns:xh11d="http://www.w3.org/1999/xhtml/datatypes/"
>
  <xs:import namespace="http://www.w3.org/1999/xhtml/datatypes/" 
             schemaLocation="xhtml-datatypes-2.xsd" />
  <xs:import namespace="http://www.w3.org/XML/1998/namespace"
             schemaLocation="http://www.w3.org/2001/xml.xsd">
    <xs:annotation>
        <xs:documentation>
        This import brings in the XML namespace attributes
        The module itself does not provide the schemaLocation
        and expects the driver schema to provide the
        actual SchemaLocation.
        </xs:documentation>
    </xs:annotation>
  </xs:import>
  <xs:include schemaLocation="xhtml-core-2.xsd"/>
  <xs:include schemaLocation="xhtml-bidi-2.xsd"/>
  <xs:include schemaLocation="xml-events-attribs-2.xsd"/>
  <xs:include schemaLocation="xhtml-edit-2.xsd"/>
  <xs:include schemaLocation="xhtml-embedding-2.xsd"/>
  <!-- forms common collection -->
  <xs:include schemaLocation="xhtml-hyperAttributes-2.xsd"/>
  <xs:include schemaLocation="xhtml-i18n-2.xsd"/>
  <xs:include schemaLocation="xhtml-csismap-2.xsd"/>
  <xs:include schemaLocation="xhtml-media-attrib-2.xsd"/>
  <xs:include schemaLocation="xhtml-metaAttributes-2.xsd"/>
  <xs:include schemaLocation="xhtml-role-attrib-2.xsd"/>
  <xs:include schemaLocation="xhtml-style-attrib-2.xsd"/>
  <xs:attributeGroup name="xhtml.Core.extra.attrib"/>
  <xs:attributeGroup name="xhtml.Bidi.extra.attrib"/>
  <xs:attributeGroup name="xmlEvents.extra.attrib"/>
  <xs:attributeGroup name="xhtml.Edit.extra.attrib"/>
  <xs:attributeGroup name="xhtml.Embedding.extra.attrib"/>
  <xs:attributeGroup name="xhtml.Hypertext.extra.attrib"/>
  <xs:attributeGroup name="xhtml.I18n.extra.attrib"/>
  <xs:attributeGroup name="xhtml.Csismap.extra.attrib"/>
  <xs:attributeGroup name="xhtml.Media.extra.attrib"/>
  <xs:attributeGroup name="xhtml.MetaAttributes.extra.attrib"/>
  <xs:attributeGroup name="xhtml.Role.extra.attrib"/>
  <xs:attributeGroup name="xhtml.Style.extra.attrib"/>
  <xs:attributeGroup name="xhtml.CommonNoEvents.attrib">
      <xs:attributeGroup ref="xhtml.Core.attrib"/>
      <xs:attributeGroup ref="xhtml.Bidi.attrib"/>
      <xs:attributeGroup ref="xhtml.Edit.attrib"/>
      <xs:attributeGroup ref="xhtml.Embedding.attrib"/>
      <xs:attributeGroup ref="xhtml.Hypertext.attrib"/>
      <xs:attributeGroup ref="xhtml.I18n.attrib"/>
      <xs:attributeGroup ref="xhtml.ImageMap.attrib"/>
      <xs:attributeGroup ref="xhtml.Media.attrib"/>
      <xs:attributeGroup ref="xhtml.MetaAttributes.attrib"/>
      <xs:attributeGroup ref="xhtml.Role.attrib"/>
      <xs:attributeGroup ref="xhtml.Style.attrib"/>
      <xs:attributeGroup ref="xhtml.Common.extra"/>
  </xs:attributeGroup>
  <xs:attributeGroup name="xhtml.Common.attrib">
      <xs:attributeGroup ref="xhtml.CommonNoEvents.attrib"/>
      <xs:attributeGroup ref="xmlEvents.attrib"/>
  </xs:attributeGroup>
  <xs:attributeGroup name="xhtml.Global.Core.extra.attrib"/>
  <xs:attributeGroup name="xhtml.Global.Edit.extra.attrib"/>
  <xs:attributeGroup name="xhtml.Global.Embedding.extra.attrib"/>
  <xs:attributeGroup name="xhtml.Global.Hypertext.extra.attrib"/>
  <xs:attributeGroup name="xhtml.Global.Media.extra.attrib"/>
</xs:schema>

D.3. XHTML 2 Content Model

This section instantiates the XHTML 2 Content Model using XML Schema, including defining the various XHTML 2 Content Sets that are used by the modules.

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns:xh11d="http://www.w3.org/1999/xhtml/datatypes/"
    elementFormDefault="qualified" >
    <xs:import
        namespace="http://www.w3.org/1999/xhtml/datatypes/"
        schemaLocation="xhtml-datatypes-2.xsd"/>
    <xs:annotation>
        <xs:documentation> 
            This is the XML Schema module of common content models for XHTML11 
            $Id: xhtml2-model-1.xsd,v 1.1.2.2 2009/04/07 14:13:23 ahby Exp $ 
        </xs:documentation>
        <xs:documentation source="xhtml-copyright-1.xsd"/>
    </xs:annotation>
    <xs:annotation>
        <xs:documentation> 
            XHTML 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: 
               xhtml.Text.mix; character-level elements
               xhtml.Structural.mix; block-like elements, e.g., paragraphs and lists
               xhtml.Flow.mix; any block or inline elements 
               xhtml.HeadOpts.mix; Head Elements 
               xhtml.StructuralPre.mix; Special class for pre content model 
            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 
               xhtml.Core.extra.attrib 
               xhtml.I18n.extra.attrib
               xhtml.Common.extra 
            The above attribute Groups are considered Global 
        </xs:documentation>
    </xs:annotation>
    <xs:attributeGroup
        name="xhtml.Common.extra">
        <xs:annotation>
            <xs:documentation> Extended Common 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.Head.extra">
        <xs:sequence/>
    </xs:group>
    <xs:group
        name="xhtml.head.content">
        <xs:sequence>
            <xs:element
                name="title"
                minOccurs="1"
                maxOccurs="1"
                type="xhtml.title.type"/>
            <xs:choice>
                <xs:element
                    name="access"
                    type="xhtml.access.type"/>
                <xs:element
                    name="action"
                    type="xmlHandlers.action.type"/>
                <xs:element
                    name="link"
                    type="xhtml.link.type"/>
                <xs:element
                    name="listener"
                    type="xmlEvents.listener.type"/>
                <xs:element
                    name="meta"
                    type="xhtml.meta.type"/>
                <xs:element
                    name="style"
                    type="xhtml.style.type"/>
                <xs:group ref="xhtml.Head.extra"/>
            </xs:choice>
        </xs:sequence>
    </xs:group>
    <!-- Text Elements -->
    <xs:group
        name="xhtml.Text.extra">
        <xs:sequence/>
    </xs:group>
    <xs:group
        name="xhtml.TextNoRuby.class">
        <xs:choice>
            <xs:element
                name="abbr"
                type="xhtml.abbr.type"/>
            <xs:element
                name="caption"
                type="xhtml.caption.type"/>
            <xs:element
                name="cite"
                type="xhtml.cite.type"/>
            <xs:element
                name="code"
                type="xhtml.code.type"/>
            <xs:element
                name="dfn"
                type="xhtml.dfn.type"/>
            <xs:element
                name="em"
                type="xhtml.em.type"/>
            <xs:element
                name="kbd"
                type="xhtml.kbd.type"/>
            <xs:element
                name="l"
                type="xhtml.l.type"/>
            <xs:element
                name="q"
                type="xhtml.q.type"/>
            <xs:element
                name="samp"
                type="xhtml.samp.type"/>
            <xs:element
                name="span"
                type="xhtml.span.type"/>
            <xs:element
                name="strong"
                type="xhtml.strong.type"/>
            <xs:element
                name="sub"
                type="xhtml.sub.type"/>
            <xs:element
                name="sup"
                type="xhtml.sup.type"/>
            <xs:element
                name="var"
                type="xhtml.var.type"/>
            <xs:element
                name="img"
                type="xhtml.img.type"/>
            <xs:element
                name="link"
                type="xhtml.link.type"/>
            <xs:element
                name="meta"
                type="xhtml.meta.type"/>
            <xs:element
                name="object"
                type="xhtml.object.type"/>
        </xs:choice>
    </xs:group>
    <xs:group name="xhtml.Text.class">
        <xs:choice>
            <xs:element
                name="ruby"
                type="xhtml.ruby.type"/>
            <xs:group
                ref="xhtml.TextNoRuby.class"/>
        </xs:choice>
    </xs:group>
    <xs:group name="xhtml.Text.mix">
        <xs:choice>
            <xs:group ref="xhtml.Text.class"/>
            <xs:group ref="xhtml.Text.extra"/>
        </xs:choice>
    </xs:group>
    <xs:group
        name="xhtml.Heading.class">
        <xs:choice>
            <xs:element
                name="h"
                type="xhtml.h.type"/>
            <xs:element
                name="h1"
                type="xhtml.h1.type"/>
            <xs:element
                name="h2"
                type="xhtml.h2.type"/>
            <xs:element
                name="h3"
                type="xhtml.h3.type"/>
            <xs:element
                name="h4"
                type="xhtml.h4.type"/>
            <xs:element
                name="h5"
                type="xhtml.h5.type"/>
            <xs:element
                name="h6"
                type="xhtml.h6.type"/>
        </xs:choice>
    </xs:group>
    <xs:group
        name="xhtml.List.class">
        <xs:choice>
            <xs:element
                name="ul"
                type="xhtml.ul.type"/>
            <xs:element
                name="ol"
                type="xhtml.ol.type"/>
            <xs:element
                name="dl"
                type="xhtml.dl.type"/>
        </xs:choice>
    </xs:group>
    <xs:group
        name="xhtml.List.extra">
        <xs:sequence/>
    </xs:group>
    <xs:group name="xhtml.List.mix">
        <xs:choice>
            <xs:group ref="xhtml.List.class"/>
            <xs:group ref="xhtml.List.extra"/>
        </xs:choice>
    </xs:group>
    <xs:group
        name="xhtml.Table.class">
        <xs:choice>
            <xs:element
                name="table"
                type="xhtml.table.type"/>
        </xs:choice>
    </xs:group>
    <xs:group
        name="xhtml.Structural.class">
        <xs:choice>
            <xs:element
                name="action"
                type="xmlHandlers.action.type"/>
            <xs:element
                name="address"
                type="xhtml.address.type"/>
            <xs:element
                name="blockcode"
                type="xhtml.blockcode.type"/>
            <xs:element
                name="blockquote"
                type="xhtml.blockquote.type"/>
            <xs:element
                name="div"
                type="xhtml.div.type"/>
            <xs:group ref="xhtml.List.class"/>
            <xs:element
                name="listener"
                type="xmlEvents.listener.type"/>
            <xs:element
                name="p"
                type="xhtml.p.type"/>
            <xs:element
                name="pre"
                type="xhtml.pre.type"/>
            <xs:element
                name="script"
                type="xmlScripting.script.type"/>
            <xs:element
                name="section"
                type="xhtml.section.type"/>
            <xs:element
                name="separator"
                type="xhtml.separator.type"/>
            <xs:element
                name="style"
                type="xhtml.style.type"/>
            <xs:element
                name="table"
                type="xhtml.table.type"/>
        </xs:choice>
    </xs:group>
    <xs:group
        name="xhtml.Structural.extra">
        <xs:sequence/>
    </xs:group>
    <!--
    Structural.mix includes all block elements plus %Misc.class;
  -->
    <xs:group name="xhtml.Structural.mix">
        <xs:choice>
            <xs:group ref="xhtml.Structural.class"/>
            <xs:group ref="xhtml.Structural.extra"/>
        </xs:choice>
    </xs:group>
    <xs:group
        name="xhtml.Flow.class">
        <xs:choice>
            <xs:group
                ref="xhtml.Heading.class"/>
            <xs:group
                ref="xhtml.Structural.class"/>
            <xs:group
                ref="xhtml.Text.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.extra">
        <xs:sequence/>
    </xs:group>
    <xs:group
        name="xhtml.Flow.mix">
        <xs:choice>
            <xs:group
                ref="xhtml.Flow.class"/>
            <xs:group
                ref="xhtml.Flow.extra"/>
        </xs:choice>
    </xs:group>
    <xs:element
        name="html"
        type="xhtml.html.type"/>
</xs:schema>

D.4. XHTML 2 Modules

This section loads all of the modules that are used in XHTML 2. The modules themselves are defined in the next Appendix.

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" 
           elementFormDefault="qualified" 
           xmlns:xh11d="http://www.w3.org/1999/xhtml/datatypes/" >
    <xs:import namespace="http://www.w3.org/1999/xhtml/datatypes/" 
               schemaLocation="xhtml-datatypes-2.xsd" />
    <xs:import namespace="http://www.w3.org/XML/1998/namespace"
      schemaLocation="http://www.w3.org/2001/xml.xsd" />
    <xs:annotation>
        <xs:documentation>
      This schema includes all modules for XHTML1.1 Document Type.
      $Id: xhtml2-modules-1.xsd,v 1.1.2.5 2009/04/07 16:32:57 ahby Exp $
    </xs:documentation>
        <xs:documentation source="xhtml-copyright-1.xsd"/>
    </xs:annotation>
    <xs:annotation>
        <xs:documentation>
     This schema includes all modules (and redefinitions)
     for XHTML2 Document Type.
     XHTML2 Document Type includes the following Modules
       XHTML Core modules (Required for XHTML Family Conformance)
            +  text
            +  hypertext
            +  lists
            +  structure
       Other XHTML modules
            +  Edit
            +  Bdo
            +  Presentational
            +  Link
            +  Meta
            +  Base
            +  Scripting
            +  Style
            +  Image
            +  Applet
            +  Object
            +  Param (Applet/Object modules require Param Module)
            +  Tables
            +  Target
            +  Forms
            +  Client side image maps
            +  Server side image maps
    </xs:documentation>
    </xs:annotation>
    <xs:include schemaLocation="xhtml2-attribs-1.xsd"/>
    <xs:include schemaLocation="xhtml-framework-2.xsd"/>
    <xs:include schemaLocation="xhtml-structural-2.xsd"/>
    <xs:include schemaLocation="xhtml-text-2.xsd"/>
    <xs:include schemaLocation="xhtml-hypertext-2.xsd"/>
    <xs:include schemaLocation="xhtml-list-2.xsd"/>
    <xs:redefine schemaLocation="xhtml-document-2.xsd">
        <xs:attributeGroup name="xhtml.version.attrib">
            <xs:attribute name="version" type="xh11d:CDATA" fixed="xhtml2"/>
        </xs:attributeGroup>
    </xs:redefine>
    <xs:include schemaLocation="xhtml-edit-2.xsd"/>
    <xs:include schemaLocation="xhtml-i18n-2.xsd"/>
    <xs:include schemaLocation="xhtml-meta-2.xsd"/>
    <xs:include schemaLocation="xhtml-legacy-br-2.xsd"/>
    <xs:include schemaLocation="xhtml-legacy-edit-2.xsd"/>
    <xs:include schemaLocation="xhtml-legacy-heading-2.xsd"/>
    <xs:redefine schemaLocation="xhtml-access-2.xsd">
        <xs:attributeGroup name="xhtmlAccess.Common.attrib">
            <xs:attributeGroup ref="xhtml.Common.attrib"/>
        </xs:attributeGroup>
    </xs:redefine>
    <xs:redefine schemaLocation="xml-events-2.xsd">
        <xs:attributeGroup name="xmlEvents.Common.attrib">
            <xs:attributeGroup ref="xhtml.CommonNoEvents.attrib"/>
        </xs:attributeGroup>
    </xs:redefine>
    <xs:redefine schemaLocation="xml-handlers-2.xsd">
        <xs:attributeGroup name="xmlHandlers.Common.attrib">
            <xs:attributeGroup ref="xhtml.Common.attrib"/>
        </xs:attributeGroup>
    </xs:redefine>
    <xs:redefine schemaLocation="xml-script-2.xsd">
        <xs:attributeGroup name="xmlScripting.Common.attrib"/>
        <xs:attributeGroup name="xmlScripting.script.attlist">
            <xs:attributeGroup ref="xhtml.Common.attrib"/>
            <xs:attribute name="charset" type="xh11d:Charset"/>
            <xs:attribute name="defer" type="xs:NMTOKEN" fixed="defer"/>
            <xs:attribute name="implements" type="xh11d:URIorSafeCURIEs"/>
        </xs:attributeGroup>
    </xs:redefine>
    <xs:include schemaLocation="xhtml-style-2.xsd"/>
    <xs:include schemaLocation="xhtml-image-2.xsd"/>
    <xs:include schemaLocation="xhtml-csismap-2.xsd"/>
    <xs:include schemaLocation="xhtml-object-2.xsd"/>
    <xs:include schemaLocation="xhtml-param-2.xsd"/>
    <xs:include schemaLocation="xhtml-table-2.xsd"/>
    <xs:include schemaLocation="xhtml-ruby-2.xsd"/>
    <xs:include schemaLocation="xml-events-2.xsd"/>
</xs:schema>