<?xml version="1.0" encoding="utf-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns:xh11d="http://www.w3.org/1999/xhtml/datatypes/"
  targetNamespace="http://www.gophernet.org/schemata/bcml.xsd"
  xmlns="http://www.gophernet.org/schemata/bcml.xsd"
  elementFormDefault="qualified">


  <xsd:redefine schemaLocation="http://www.w3.org/TR/2006/PR-xhtml-modularization-20060213/SCHEMA/xhtml-attribs-1.xsd">
    <xsd:annotation>
      <xsd:documentation>
        This module provides common attributes used by other XHTML elements.
        Redefine the core XHTML attributes to remove "id" and "class" as these
        could be used to provide undesired hooks into the stylesheets and
        possibly create duplicated ids when inserted into another document.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:attributeGroup name="xhtml.Core.attrib">
      <xsd:attributeGroup ref="xhtml.title"/>
      <xsd:attributeGroup ref="xhtml.Core.extra.attrib"/>
    </xsd:attributeGroup>
  </xsd:redefine>

  <xsd:redefine schemaLocation="http://www.w3.org/TR/2006/PR-xhtml-modularization-20060213/SCHEMA/xhtml-inlphras-1.xsd">
    <xsd:annotation>
      <xsd:documentation>
        The inline phrasal module is part of the text module.  Redefine the
        "cite" attribute of "q" to use restrictedURI.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:attributeGroup name="xhtml.q.attlist">
      <xsd:attributeGroup ref="xhtml.Common.attrib"/>
      <xsd:attribute name="cite" type="restrictedURI"/>
    </xsd:attributeGroup>
  </xsd:redefine>

  <xsd:redefine schemaLocation="http://www.w3.org/TR/2006/PR-xhtml-modularization-20060213/SCHEMA/xhtml-blkphras-1.xsd">
    <xsd:annotation>
      <xsd:documentation>
        The block phrasal module is part of the text module.  Redefine the
        "cite" attribute of "blockquote" to use restrictedURI.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:attributeGroup name="xhtml.blockquote.attlist">
      <xsd:attributeGroup ref="xhtml.Common.attrib"/>
      <xsd:attribute name="cite" type="restrictedURI"/>
    </xsd:attributeGroup>
  </xsd:redefine>

  <xsd:include schemaLocation="http://www.w3.org/TR/2006/PR-xhtml-modularization-20060213/SCHEMA/xhtml-framework-1.xsd">
    <xsd:annotation>
      <xsd:documentation>
        This module is required to instatiate the XHTML modularization
        framework.
      </xsd:documentation>
    </xsd:annotation>
  </xsd:include>

  <xsd:include schemaLocation="http://www.w3.org/TR/2006/PR-xhtml-modularization-20060213/SCHEMA/xhtml-text-1.xsd">
    <xsd:annotation>
      <xsd:documentation>
        The text module, needed by html.BlkStruct.class, xhtml.InlStruct.class,
        xhtml.InlPhras.class, xhtml.BlkPhras.class, xhtml.BlkPres.class and
        xhtml.InlPre.mix.  This module provides the block element types used at
        the root of bcml.
      </xsd:documentation>
    </xsd:annotation>
  </xsd:include>

  <xsd:include schemaLocation="http://www.w3.org/TR/2006/PR-xhtml-modularization-20060213/SCHEMA/xhtml-pres-1.xsd">
    <xsd:annotation>
      <xsd:documentation>
        The presentation module, needed by xhtml.InlPres.class.
      </xsd:documentation>
    </xsd:annotation>
  </xsd:include>

  <xsd:include schemaLocation="http://www.w3.org/TR/2006/PR-xhtml-modularization-20060213/SCHEMA/xhtml-bdo-1.xsd">
    <xsd:annotation>
      <xsd:documentation>
        The bi-directional text module, needed by xhtml.I18n.class and
        xhtml.I18n.extra.attrib.
      </xsd:documentation>
    </xsd:annotation>
  </xsd:include>

  <xsd:redefine schemaLocation="http://www.w3.org/TR/2006/PR-xhtml-modularization-20060213/SCHEMA/xhtml-hypertext-1.xsd">
    <xsd:annotation>
      <xsd:documentation>
        The hypertext module provides the anchor type needed by
        xhtml.Anchor.class.  Redefine the "href" attribute of "a" to use
        restrictedURI and remove the accesskey and tabindex attributes.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:attributeGroup name="xhtml.a.attlist">
      <xsd:attributeGroup ref="xhtml.Common.attrib"/>
      <xsd:attribute name="href" type="restrictedURI"/>
      <xsd:attribute name="charset" type="xh11d:Charset"/>
      <xsd:attribute name="type" type="xh11d:ContentType"/>
      <xsd:attribute name="hreflang" type="xh11d:LanguageCode"/>
      <xsd:attribute name="rel" type="xh11d:LinkTypes"/>
      <xsd:attribute name="rev" type="xh11d:LinkTypes"/>
    </xsd:attributeGroup>
  </xsd:redefine>

  <xsd:redefine schemaLocation="http://www.w3.org/TR/2006/PR-xhtml-modularization-20060213/SCHEMA/xhtml-image-1.xsd">
    <xsd:annotation>
      <xsd:documentation>
        The image module, needed by xhtml.InlSpecial.class.
        Redefine src and longdesc to use restrictedURI.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:attributeGroup name="xhtml.img.attlist">
      <xsd:attributeGroup ref="xhtml.Common.attrib"/>
      <xsd:attribute name="src" type="restrictedURI" use="required"/>
      <xsd:attribute name="alt" type="xh11d:Text" use="required"/>
      <xsd:attribute name="longdesc" type="restrictedURI"/>
      <xsd:attribute name="height" type="xh11d:Length"/>
      <xsd:attribute name="width" type="xh11d:Length"/>
    </xsd:attributeGroup>
  </xsd:redefine>

  <xsd:include schemaLocation="http://www.w3.org/TR/2006/PR-xhtml-modularization-20060213/SCHEMA/xhtml-list-1.xsd">
    <xsd:annotation>
      <xsd:documentation>
        The list module is used by xhtml.List.class.
      </xsd:documentation>
    </xsd:annotation>
  </xsd:include>

  <xsd:include schemaLocation="http://www.w3.org/TR/2006/PR-xhtml-modularization-20060213/SCHEMA/xhtml-table-1.xsd">
    <xsd:annotation>
      <xsd:documentation>
        The table module, used by xhtml.Table.class.
      </xsd:documentation>
    </xsd:annotation>
  </xsd:include>

  <xsd:group name="xhtml.Block.class">
    <xsd:annotation>
      <xsd:documentation>
        This group defines the block-level elements for an HTML document.
        The groups are copied from xhtml11-model-1.xsd.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:choice>
      <xsd:group ref="xhtml.BlkStruct.class"/>
      <xsd:group ref="xhtml.BlkPhras.class"/>
      <xsd:group ref="xhtml.BlkPres.class"/>
      <xsd:group ref="xhtml.Block.extra"/>
      <xsd:group ref="xhtml.BlkSpecial.class"/>
    </xsd:choice>
  </xsd:group>

  <xsd:group name="xhtml.BlkStruct.class">
    <xsd:annotation>
      <xsd:documentation>
        This group provides the basic block-level structure elements.  Its
        contents are copied from xhtml11-model-1.xsd.  The types are provided
        by the text module.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:choice>
      <xsd:element name="p" type="xhtml.p.type"/>
      <xsd:element name="div" type="xhtml.div.type"/>
    </xsd:choice>
  </xsd:group>

  <xsd:group name="xhtml.Inline.mix">
    <xsd:annotation>
      <xsd:documentation>
       This group defines a combination of inline and miscellaneous elements.
       The contents are copied from xhtml11-model-1.xsd.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:choice>
      <xsd:group ref="xhtml.Inline.class"/>
      <xsd:group ref="xhtml.Misc.class"/>
    </xsd:choice>
  </xsd:group>

  <xsd:group name="xhtml.Flow.mix">
    <xsd:annotation>
      <xsd:documentation>
        Copied from xhtml11-model-1.xsd and modified to exclude
        xhtml.Heading.class.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:choice>
      <xsd:group ref="xhtml.List.class"/>
      <xsd:group ref="xhtml.Block.class"/>
      <xsd:group ref="xhtml.Inline.class"/>
      <xsd:group ref="xhtml.Misc.class"/>
    </xsd:choice>
  </xsd:group>

  <xsd:group name="xhtml.Inline.class">
    <xsd:annotation>
      <xsd:documentation>
        This group defines the set of inline elements.  The contents are copied
        from xhtml11-model-1.class and modified to exclude xhtml.InlForm.class
        and xhtml.Ruby.class.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:choice>
      <xsd:group ref="xhtml.InlStruct.class"/>
      <xsd:group ref="xhtml.InlPhras.class"/>
      <xsd:group ref="xhtml.InlPres.class"/>
      <xsd:group ref="xhtml.I18n.class"/>
      <xsd:group ref="xhtml.Anchor.class"/>
      <xsd:group ref="xhtml.InlSpecial.class"/>
      <xsd:group ref="xhtml.Inline.extra"/>
    </xsd:choice>
  </xsd:group>

  <xsd:group name="xhtml.BlkSpecial.class">
    <xsd:annotation>
      <xsd:documentation>
        Special block elements.  This group is copied from xhtml11-model-1.xsd
        and modified to remove xhtml.Form.class and xhtml.Fieldset.class.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:choice>
      <xsd:group ref="xhtml.Table.class"/>
    </xsd:choice>
  </xsd:group>

  <xsd:group name="xhtml.Table.class">
    <xsd:annotation>
      <xsd:documentation>
        This group is copied from xhtml11-model-1.xsd.  The types are provided
        by the table module.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:choice>
      <xsd:element name="table" type="xhtml.table.type"/>
    </xsd:choice>
  </xsd:group>

  <xsd:attributeGroup name="xhtml.Core.extra.attrib">
    <xsd:annotation>
      <xsd:documentation>
        This group is referenced in the attributes module.
      </xsd:documentation>
    </xsd:annotation>
  </xsd:attributeGroup>

  <xsd:attributeGroup name="xhtml.I18n.extra.attrib">
    <xsd:annotation>
      <xsd:documentation>
        This group is referenced in the attributes module.  "dir" attribute
        reference copied from xhtml11-model-1.xsd and provided by the
        bi-directional text module.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:attributeGroup ref="xhtml.dir.attrib"/>
  </xsd:attributeGroup>

  <xsd:attributeGroup name="xhtml.Common.extra">
    <xsd:annotation>
      <xsd:documentation>
        This group is referenced in the attributes module.
        xhtml11-module-1.xsd defines it as containing xhtml.style.attrib,
        defined in the style module, which is not included here.
      </xsd:documentation>
    </xsd:annotation>
  </xsd:attributeGroup>

  <xsd:attributeGroup name="xhtml.Global.core.extra.attrib">
    <xsd:annotation>
      <xsd:documentation>
        Referenced in the attributes module.
      </xsd:documentation>
    </xsd:annotation>
  </xsd:attributeGroup>

  <xsd:attributeGroup name="xhtml.Global.I18n.extra.attrib">
    <xsd:annotation>
      <xsd:documentation>
        Referenced in the attributes module.
      </xsd:documentation>
    </xsd:annotation>
  </xsd:attributeGroup>

  <xsd:attributeGroup name="xhtml.Global.Common.extra">
    <xsd:annotation>
      <xsd:documentation>
        Referenced in the attributes module.
      </xsd:documentation>
    </xsd:annotation>
  </xsd:attributeGroup>

  <xsd:group name="xhtml.InlNoAnchor.mix">
    <xsd:annotation>
      <xsd:documentation>
        All non-anchor inline types.  Copied from xhtml11-model-1.xsd.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:choice>
      <xsd:group ref="xhtml.InlNoAnchor.class"/>
      <xsd:group ref="xhtml.Misc.class"/>
    </xsd:choice>
  </xsd:group>

  <xsd:group name="xhtml.InlNoAnchor.class">
    <xsd:annotation>
      <xsd:documentation>
        All non-anchor inline elements.  This group is copied from
        xhtml-model-1.xsd and modified to exclude xhtml.InlForm.class and
        xhtml.Ruby.class.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:choice>
      <xsd:group ref="xhtml.InlStruct.class"/>
      <xsd:group ref="xhtml.InlPhras.class"/>
      <xsd:group ref="xhtml.InlPres.class"/>
      <xsd:group ref="xhtml.I18n.class"/>
      <xsd:group ref="xhtml.InlSpecial.class"/>
      <xsd:group ref="xhtml.Inline.extra"/>
    </xsd:choice>
  </xsd:group>

  <xsd:group name="xhtml.Misc.class">
    <xsd:annotation>
      <xsd:documentation>
        This group is copied from xhtml11-model-1.xsd and modified to exclude
        xhtml.Edit.class and xhtml.Script.class.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:choice>
      <xsd:group ref="xhtml.Misc.extra"/>
    </xsd:choice>
  </xsd:group>

  <xsd:group name="xhtml.InlStruct.class">
    <xsd:annotation>
      <xsd:documentation>
        Inline structural elements.  The group contents are copied from
        xhtml11-model-1.xsd.  The types are provided by the text module.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:choice>
      <xsd:element name="br" type="xhtml.br.type"/>
      <xsd:element name="span" type="xhtml.span.type"/>
    </xsd:choice>
  </xsd:group>

  <xsd:group name="xhtml.InlPhras.class">
    <xsd:annotation>
      <xsd:documentation>
        Inline phrasal elements.  The list is copied from xhtml11-model-1.xsd
        and the types are provided by the text module.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:choice>
      <xsd:element name="em" type="xhtml.em.type"/>
      <xsd:element name="strong" type="xhtml.strong.type"/>
      <xsd:element name="dfn" type="xhtml.dfn.type"/>
      <xsd:element name="code" type="xhtml.code.type"/>
      <xsd:element name="samp" type="xhtml.samp.type"/>
      <xsd:element name="kbd" type="xhtml.kbd.type"/>
      <xsd:element name="var" type="xhtml.var.type"/>
      <xsd:element name="cite" type="xhtml.cite.type"/>
      <xsd:element name="abbr" type="xhtml.abbr.type"/>
      <xsd:element name="acronym" type="xhtml.acronym.type"/>
      <xsd:element name="q" type="xhtml.q.type"/>
    </xsd:choice>
  </xsd:group>

  <xsd:group name="xhtml.InlPres.class">
    <xsd:annotation>
      <xsd:documentation>
        Inline presentation elements.  The group contents are copied from
        xhtml11-model-1.xsd.  The types are provided by the preentation module.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:choice>
      <xsd:element name="tt" type="xhtml.InlPres.type"/>
      <xsd:element name="i" type="xhtml.InlPres.type"/>
      <xsd:element name="b" type="xhtml.InlPres.type"/>
      <xsd:element name="big" type="xhtml.InlPres.type"/>
      <xsd:element name="small" type="xhtml.InlPres.type"/>
      <xsd:element name="sub" type="xhtml.InlPres.type"/>
      <xsd:element name="sup" type="xhtml.InlPres.type"/>
    </xsd:choice>
  </xsd:group>

  <xsd:group name="xhtml.I18n.class">
    <xsd:annotation>
      <xsd:documentation>
        Internationalization.  The group contents are copied from
        xhtml11-model-1.xsd.  The types are provided by the bi-directional
        text module.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:sequence>
      <xsd:element name="bdo" type="xhtml.bdo.type"/>
    </xsd:sequence>
  </xsd:group>

  <xsd:group name="xhtml.InlSpecial.class">
    <xsd:annotation>
      <xsd:documentation>
        Special inline elements.  The contents of the group are copied from
        xhtml11-model-1.xsd and modified to remove the "map" element, which
        cannot be included safely due to its required "id" attribute, and the
        "object" element.  The object types can't be adequately redefined due
        to the need to derive from a list type and an unnamed type.  Though
        safe handling of objects, like images, should be up to the user agent,
        I also don't want to open the possibility that someone could, through
        comments, make my web page make noise.  The hypertext elements should
        be a sufficient replacement.

        The types are provided by the image module.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:choice>
      <xsd:element name="img" type="xhtml.img.type"/>
    </xsd:choice>
  </xsd:group>

  <xsd:group name="xhtml.Inline.extra">
    <xsd:annotation>
      <xsd:documentation>
        This empty group is copied from xhtml11-model-1.xsd.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:sequence/>
  </xsd:group>

  <xsd:group name="xhtml.Misc.extra">
    <xsd:annotation>
      <xsd:documentation>
        This empty group is copied from xhtml11-model-1.xsd.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:sequence/>
  </xsd:group>

  <xsd:group name="xhtml.List.class">
    <xsd:annotation>
      <xsd:documentation>
        List elements, copied from xhtml11-model-1.xsd.  Types provided by the
        list module.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:choice>
      <xsd:element name="ul" type="xhtml.ul.type"/>
      <xsd:element name="ol" type="xhtml.ol.type"/>
      <xsd:element name="dl" type="xhtml.dl.type"/>
    </xsd:choice>
  </xsd:group>

  <xsd:group name="xhtml.Anchor.class">
    <xsd:annotation>
      <xsd:documentation>
        Anchor type.  The list is copied from xhtml11-model-1.xsd.  The type
        is provided by the hypertext module.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:sequence>
      <xsd:element name="a" type="xhtml.a.type"/>
    </xsd:sequence>
  </xsd:group>

  <xsd:group name="xhtml.BlkPhras.class">
    <xsd:annotation>
      <xsd:documentation>
        Block phrasal elements.  Copied from xhtml11-model-1.xsd.  Types
        provided by the text module.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:choice>
      <xsd:element name="pre" type="xhtml.pre.type"/>
      <xsd:element name="blockquote" type="xhtml.blockquote.type"/>
      <xsd:element name="address" type="xhtml.address.type"/>
    </xsd:choice>
  </xsd:group>

  <xsd:group name="xhtml.BlkPres.class">
    <xsd:annotation>
      <xsd:documentation>
        Block-level presentation elements.  Copied from xhtml11-model-1.xsd.
        Types provided by the text module.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:sequence>
      <xsd:element name="hr" type="xhtml.hr.type"/>
    </xsd:sequence>
  </xsd:group>

  <xsd:group name="xhtml.Block.extra">
    <xsd:annotation>
      <xsd:documentation>
        This empty group is copied from xhtml11-model-1.xsd.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:sequence/>
  </xsd:group>

  <xsd:group name="xhtml.InlinePre.mix">
    <xsd:annotation>
      <xsd:documentation>
        Elements used as chilren of "pre".  Copied from xhtml11-model-1.xsd
        and modified to exclude the "script" and "map" elements.  The types
        of "tt", "i" and "b" are part of the text module.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:choice>
      <xsd:group ref="xhtml.InlStruct.class"/>
      <xsd:group ref="xhtml.InlPhras.class"/>
      <xsd:element name="tt" type="xhtml.InlPres.type"/>
      <xsd:element name="i" type="xhtml.InlPres.type"/>
      <xsd:element name="b" type="xhtml.InlPres.type"/>
      <xsd:group ref="xhtml.I18n.class"/>
      <xsd:group ref="xhtml.Anchor.class"/>
      <xsd:group ref="xhtml.Inline.extra"/>
    </xsd:choice>
  </xsd:group>

  <xsd:group name="xhtml.Block.mix">
    <xsd:annotation>
      <xsd:documentation>
        Block elements plus Misc.class.  Copied from xhtml11-model-1.xsd and
        modified to exclude xhtml.Heading.class.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:choice>
      <xsd:group ref="xhtml.List.class"/>
      <xsd:group ref="xhtml.Block.class"/>
      <xsd:group ref="xhtml.Misc.class"/>
    </xsd:choice>
  </xsd:group>

  <xsd:simpleType name="restrictedURI">
    <xsd:annotation>
      <xsd:documentation>
        The pattern for restrictedURI matches any string that does not begin
        with "javascript:" or "file:"
      </xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="xh11d:URI">
      <xsd:pattern value="(j)|(ja)|(jav)|(java)|(javas)|(javasc)|(javascr)|(javascri)|(javascrip)|(javascript)|(f)|(fi)|(fil)|(file)|([^jf].*)|([jf][^ai].*)|([jf][ai][^vl].*)|([jf][fi][vl][^ae].*)|(file[^:].*)|(java[^s].*)|(javas[^c].*)|(javasc[^r].*)|(javascr[^i].*)|(javascri[^p].*)|(javascrip[^t].*)|(javascript[^:].*)"/>
    </xsd:restriction>
  </xsd:simpleType>

  <xsd:element name="bcml">
    <xsd:annotation>
      <xsd:documentation>
        Define the document element as a sequence of block-level elements
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexType>
      <xsd:choice minOccurs="1" maxOccurs="unbounded">
        <xsd:group ref="xhtml.Block.class"/>
      </xsd:choice>
    </xsd:complexType>
  </xsd:element>
</xsd:schema>

