<?xml version="1.0" encoding="iso-8859-1"?>

<!-- file: xhtml-legacy-1.rng

     This is XHTML, a reformulation of HTML as a modular XML application.
     Copyright 1998-2010 W3C (MIT, ERCIM, Keio), All Rights Reserved.
     Revision: $Id: xhtml-legacy-1.rng,v 1.1 2010/12/12 23:24:11 smccarro Exp $

     This RelaxNG module is identified by URI:
        
        http://www.w3.org/MarkUp/RELAXNG/xhtml-legacy-1.rng
     .................................................................... -->
<!-- Legacy Module -->
<grammar xmlns="http://relaxng.org/ns/structure/1.0">

<define name="xhtml.lang.attrib" combine="interleave">
  <optional>
    <attribute name="lang">
      <ref name="xhtml.LanguageCode.datatype"/>
    </attribute>
  </optional>
</define>

<define name="xhtml.basefont">
  <element name="basefont">
    <ref name="xhtml.basefont.attlist"/>
  </element>
</define>

<define name="xhtml.basefont.attlist">
  <ref name="xhtml.id.attrib"/>
  <ref name="xhtml.size.attrib"/>
  <ref name="xhtml.Font.attrib"/>
</define>

<define name="xhtml.center">
  <element name="center">
    <ref name="xhtml.center.attlist"/>
    <ref name="xhtml.Flow.model"/>
  </element>
</define>

<define name="xhtml.center.attlist">
  <ref name="xhtml.Common.attrib"/>
</define>

<define name="xhtml.font">
  <element name="font">
    <ref name="xhtml.font.attlist"/>
    <ref name="xhtml.Inline.model"/>
  </element>
</define>

<define name="xhtml.font.attlist">
  <ref name="xhtml.Core.attrib"/>
  <ref name="xhtml.I18n.attrib"/>
  <ref name="xhtml.Font.attrib"/>
  <optional>
    <attribute name="size"/>
  </optional>
</define>

<define name="xhtml.Font.attrib">
  <optional>
    <attribute name="color">
      <ref name="xhtml.Color.datatype"/>
    </attribute>
  </optional>
  <optional>
    <attribute name="face"/>
  </optional>
</define>

<define name="xhtml.s">
  <element name="s">
    <ref name="xhtml.s.attlist"/>
    <ref name="xhtml.Inline.model"/>
  </element>
</define>

<define name="xhtml.s.attlist">
  <ref name="xhtml.Common.attrib"/>
</define>

<define name="xhtml.strike">
  <element name="strike">
    <ref name="xhtml.strike.attlist"/>
    <ref name="xhtml.Inline.model"/>
  </element>
</define>

<define name="xhtml.strike.attlist">
  <ref name="xhtml.Common.attrib"/>
</define>

<define name="xhtml.u">
  <element name="u">
    <ref name="xhtml.u.attlist"/>
    <ref name="xhtml.Inline.model"/>
  </element>
</define>

<define name="xhtml.u.attlist">
  <ref name="xhtml.Common.attrib"/>
</define>

<define name="xhtml.dir">
  <element name="dir">
    <ref name="xhtml.dir.attlist"/>
    <oneOrMore>
      <ref name="xhtml.li.noblock"/>
    </oneOrMore>
  </element>
</define>

<define name="xhtml.dir.attlist">
  <ref name="xhtml.Common.attrib"/>
  <optional>
    <attribute name="compact">
      <value>compact</value>
    </attribute>
  </optional>
</define>

<define name="xhtml.menu">
  <element name="menu">
    <ref name="xhtml.menu.attlist"/>
    <oneOrMore>
      <ref name="xhtml.li.noblock"/>
    </oneOrMore>
  </element>
</define>

<define name="xhtml.menu.attlist">
  <ref name="xhtml.Common.attrib"/>
  <optional>
    <attribute name="compact">
      <value>compact</value>
    </attribute>
  </optional>
</define>

<define name="xhtml.li.noblock">
  <element name="li">
    <ref name="xhtml.li.attlist"/>
    <ref name="xhtml.Inline.model"/>
  </element>
</define>

<define name="xhtml.isindex">
  <element name="isindex">
    <ref name="xhtml.isindex.attlist"/>
  </element>
</define>

<define name="xhtml.isindex.attlist">
  <ref name="xhtml.Core.attrib"/>
  <ref name="xhtml.I18n.attrib"/>
  <optional>
    <attribute name="prompt">
      <ref name="xhtml.Text.datatype"/>
    </attribute>
  </optional>
</define>

<define name="xhtml.applet.attlist" combine="interleave">
  <optional>
    <attribute name="align">
      <choice>
	<value>top</value>
	<value>middle</value>
	<value>bottom</value>
	<value>left</value>
	<value>right</value>
      </choice>
    </attribute>
  </optional>
  <optional>
    <attribute name="hspace">
      <ref name="xhtml.Pixels.datatype"/>
    </attribute>
  </optional>
  <optional>
    <attribute name="vspace">
      <ref name="xhtml.Pixels.datatype"/>
    </attribute>
  </optional>
</define>

<define name="xhtml.body.attlist" combine="interleave">
  <optional>
    <attribute name="background">
      <ref name="xhtml.URI.datatype"/>
    </attribute>
  </optional>
  <optional>
    <attribute name="bgcolor">
      <ref name="xhtml.Color.datatype"/>
    </attribute>
  </optional>
  <optional>
    <attribute name="text">
      <ref name="xhtml.Color.datatype"/>
    </attribute>
  </optional>
  <optional>
    <attribute name="link">
      <ref name="xhtml.Color.datatype"/>
    </attribute>
  </optional>
  <optional>
    <attribute name="vlink">
      <ref name="xhtml.Color.datatype"/>
    </attribute>
  </optional>
  <optional>
    <attribute name="alink">
      <ref name="xhtml.Color.datatype"/>
    </attribute>
  </optional>
</define>

<define name="xhtml.br.attlist" combine="interleave">
  <optional>
    <attribute name="clear">
      <choice>
	<value>left</value>
	<value>all</value>
	<value>right</value>
	<value>none</value>
      </choice>
    </attribute>
  </optional>
</define>

<define name="xhtml.caption.attlist" combine="interleave">
  <ref name="xhtml.align.attrib"/>
</define>

<define name="xhtml.div.attlist" combine="interleave">
  <ref name="xhtml.align.attrib"/>
</define>

<!-- Not in the CR, but surely an error. -->

<define name="xhtml.dl.attlist" combine="interleave">
  <optional>
    <attribute name="compact">
      <value>compact</value>
    </attribute>
  </optional>
</define>

<define name="xhtml.Heading.attrib" combine="interleave">
  <ref name="xhtml.align.attrib"/>
</define>

<define name="xhtml.hr.attlist" combine="interleave">
  <optional>
    <attribute name="align">
      <choice>
	<value>left</value>
	<value>center</value>
	<value>right</value>
      </choice>
    </attribute>
  </optional>
  <optional>
    <attribute name="noshade">
      <value>noshade</value>
    </attribute>
  </optional>
  <optional>
    <attribute name="size">
      <ref name="xhtml.Pixels.datatype"/>
    </attribute>
  </optional>
  <optional>
    <attribute name="width">
      <ref name="xhtml.Pixels.datatype"/>
    </attribute>
  </optional>
</define>

<define name="xhtml.img.attlist" combine="interleave">
  <optional>
    <attribute name="align">
      <choice>
	<value>top</value>
	<value>middle</value>
	<value>bottom</value>
	<value>left</value>
	<value>right</value>
      </choice>
    </attribute>
  </optional>
  <optional>
    <attribute name="border">
      <ref name="xhtml.Pixels.datatype"/>
    </attribute>
  </optional>
  <optional>
    <attribute name="hspace">
      <ref name="xhtml.Pixels.datatype"/>
    </attribute>
  </optional>
  <optional>
    <attribute name="vspace">
      <ref name="xhtml.Pixels.datatype"/>
    </attribute>
  </optional>
</define>

<define name="xhtml.input.attlist" combine="interleave">
  <ref name="xhtml.align.attrib"/>
</define>

<define name="xhtml.legend.attlist" combine="interleave">
  <optional>
    <attribute name="align">
      <choice>
	<value>top</value>
	<value>bottom</value>
	<value>left</value>
	<value>right</value>
      </choice>
    </attribute>
  </optional>
</define>

<define name="xhtml.li.attlist" combine="interleave">
  <optional>
    <attribute name="type"/>
  </optional>
  <optional>
    <attribute name="value"/>
  </optional>
</define>

<define name="xhtml.object.attlist" combine="interleave">
  <optional>
    <attribute name="align">
      <choice>
	<value>top</value>
	<value>middle</value>
	<value>bottom</value>
	<value>left</value>
	<value>right</value>
      </choice>
    </attribute>
  </optional>
  <optional>
    <attribute name="border">
      <ref name="xhtml.Pixels.datatype"/>
    </attribute>
  </optional>
  <optional>
    <attribute name="hspace">
      <ref name="xhtml.Pixels.datatype"/>
    </attribute>
  </optional>
  <optional>
    <attribute name="vspace">
      <ref name="xhtml.Pixels.datatype"/>
    </attribute>
  </optional>
</define>

<define name="xhtml.ol.attlist" combine="interleave">
  <optional>
    <attribute name="type"/>
  </optional>
  <optional>
    <attribute name="compact">
      <value>compact</value>
    </attribute>
  </optional>
  <optional>
    <attribute name="start"/>
  </optional>
</define>

<define name="xhtml.p.attlist" combine="interleave">
  <ref name="xhtml.align.attrib"/>
</define>

<define name="xhtml.pre.attlist" combine="interleave">
  <optional>
    <attribute name="width">
      <ref name="xhtml.Length.datatype"/>
    </attribute>
  </optional>
</define>

<define name="xhtml.script.attlist" combine="interleave">
  <optional>
    <attribute name="language">
      <ref name="xhtml.ContentType.datatype"/>
    </attribute>
  </optional>
</define>

<define name="xhtml.table.attlist" combine="interleave">
  <ref name="xhtml.align.attrib"/>
  <optional>
    <attribute name="bgcolor">
      <ref name="xhtml.Color.datatype"/>
    </attribute>
  </optional>
</define>

<define name="xhtml.tr.attlist" combine="interleave">
  <optional>
    <attribute name="bgcolor">
      <ref name="xhtml.Color.datatype"/>
    </attribute>
  </optional>
</define>

<define name="xhtml.Cell.attrib" combine="interleave">
  <optional>
    <attribute name="nowrap">
      <value>nowrap</value>
    </attribute>
  </optional>
  <optional>
    <attribute name="bgcolor">
      <ref name="xhtml.Color.datatype"/>
    </attribute>
  </optional>
  <optional>
    <attribute name="width">
      <ref name="xhtml.Pixels.datatype"/>
    </attribute>
  </optional>
  <optional>
    <attribute name="height">
      <ref name="xhtml.Pixels.datatype"/>
    </attribute>
  </optional>
</define>

<define name="xhtml.ul.attlist" combine="interleave">
  <optional>
    <attribute name="type"/>
  </optional>
  <optional>
    <attribute name="compact">
      <value>compact</value>
    </attribute>
  </optional>
</define>

<define name="xhtml.align.attrib">
  <optional>
    <attribute name="align">
      <choice>
	<value>left</value>
	<value>center</value>
	<value>right</value>
	<value>justify</value>
      </choice>
    </attribute>
  </optional>
</define>

<define name="xhtml.Color.datatype">
  <text/>
</define>

<define name="xhtml.Inline.class" combine="choice">
  <choice>
    <ref name="xhtml.font"/>
    <ref name="xhtml.basefont"/>
    <ref name="xhtml.s"/>
    <ref name="xhtml.strike"/>
    <ref name="xhtml.u"/>
  </choice>
</define>

<define name="xhtml.Block.class" combine="choice">
  <choice>
    <ref name="xhtml.center"/>
    <ref name="xhtml.isindex"/>
  </choice>
</define>

<define name="xhtml.List.class" combine="choice">
  <choice>
    <ref name="xhtml.dir"/>
    <ref name="xhtml.menu"/>
  </choice>
</define>

<define name="xhtml.head.content" combine="interleave">
  <optional>
    <ref name="xhtml.isindex"/>
  </optional>
</define>

<define name="xhtml.Block.mix" combine="choice">
  <choice>
    <text/>
    <ref name="xhtml.Inline.class"/>
  </choice>
</define>

<!-- With the legacy module and the frames modules, the html
     element can contain either body or frameset. -->
<define name="xhtml.frameset" combine="choice">
  <ref name="xhtml.body"/>
</define>

</grammar>

