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

<!-- file: xhtml-text-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-text-1.rng,v 1.1 2010/12/12 23:24:12 smccarro Exp $

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

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

<define name="xhtml.br.attlist">
  <ref name="xhtml.Core.attrib"/>
</define>

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

<define name="xhtml.q.attlist">
  <ref name="xhtml.Common.attrib"/>
  <optional>
    <attribute name="cite">
      <ref name="xhtml.URI.datatype"/>
    </attribute>
  </optional>
</define>

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

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

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

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

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

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

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

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

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

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

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

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

<define name="xhtml.blockquote">
  <element name="blockquote">
    <ref name="xhtml.blockquote.attlist"/>
    <ref name="xhtml.Block.model"/>
  </element>
</define>

<define name="xhtml.blockquote.attlist">
  <ref name="xhtml.Common.attrib"/>
  <optional>
    <attribute name="cite">
      <ref name="xhtml.URI.datatype"/>
    </attribute>
  </optional>
</define>

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

<define name="xhtml.pre.attlist">
  <ref name="xhtml.Common.attrib"/>
  <optional>
    <attribute name="xml:space">
      <value>preserve</value>
    </attribute>
  </optional>
</define>

<define name="xhtml.h1">
  <element name="h1">
    <ref name="xhtml.Heading.attrib"/>
    <ref name="xhtml.Heading.content"/>
  </element>
</define>
 
<define name="xhtml.h2">
  <element name="h2">
    <ref name="xhtml.Heading.attrib"/>
    <ref name="xhtml.Heading.content"/>
  </element>
</define>
 
<define name="xhtml.h3">
  <element name="h3">
    <ref name="xhtml.Heading.attrib"/>
    <ref name="xhtml.Heading.content"/>
  </element>
</define>
 
<define name="xhtml.h4">
  <element name="h4">
    <ref name="xhtml.Heading.attrib"/>
    <ref name="xhtml.Heading.content"/>
  </element>
</define>
 
<define name="xhtml.h5">
  <element name="h5">
    <ref name="xhtml.Heading.attrib"/>
    <ref name="xhtml.Heading.content"/>
  </element>
</define>

<define name="xhtml.h6">
  <element name="h6">
    <ref name="xhtml.Heading.attrib"/>
    <ref name="xhtml.Heading.content"/>
  </element>
</define>

<define name="xhtml.Heading.attrib">
  <ref name="xhtml.Common.attrib"/>
</define>
 
<define name="xhtml.Heading.content">
  <ref name="xhtml.Inline.model"/>
</define>

<define name="xhtml.Heading.class">
  <choice>
    <ref name="xhtml.h1"/>
    <ref name="xhtml.h2"/>
    <ref name="xhtml.h3"/>
    <ref name="xhtml.h4"/>
    <ref name="xhtml.h5"/>
    <ref name="xhtml.h6"/>
  </choice>
</define>

<define name="xhtml.Block.class">
  <choice>
    <ref name="xhtml.address"/>
    <ref name="xhtml.blockquote"/>
    <ref name="xhtml.div"/>
    <ref name="xhtml.p"/>
    <ref name="xhtml.pre"/>
    <ref name="xhtml.Heading.class"/>
  </choice>
</define>

<define name="xhtml.Inline.class">
  <choice>
    <ref name="xhtml.abbr"/>
    <ref name="xhtml.acronym"/>
    <ref name="xhtml.br"/>
    <ref name="xhtml.cite"/>
    <ref name="xhtml.code"/>
    <ref name="xhtml.dfn"/>
    <ref name="xhtml.em"/>
    <ref name="xhtml.kbd"/>
    <ref name="xhtml.q"/>
    <ref name="xhtml.samp"/>
    <ref name="xhtml.span"/>
    <ref name="xhtml.strong"/>
    <ref name="xhtml.var"/>
  </choice>
</define>

<define name="xhtml.Inline.model">
  <zeroOrMore>
    <choice>
      <text/>
      <ref name="xhtml.Inline.class"/>
    </choice>
  </zeroOrMore>
</define>

<!-- This is redefined by the legacy module to include inlines. -->
<define name="xhtml.Block.mix">
  <ref name="xhtml.Block.class"/>
</define>

<define name="xhtml.Block.model">
  <oneOrMore>
    <ref name="xhtml.Block.mix"/>
  </oneOrMore>
</define>

<define name="xhtml.Flow.model">
  <zeroOrMore>
    <choice>
      <text/>
      <ref name="xhtml.Inline.class"/>
      <ref name="xhtml.Block.class"/>
    </choice>
  </zeroOrMore>
</define>

</grammar>

