<?xml version="1.0" encoding="UTF-8"?>
<grammar xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0">
  <include href="latex-document17.rng">
    <a:documentation>PDF/UA-1</a:documentation>
  </include>
  <!-- LaTeX Bible Markup Namespace -->
  <define name="Sect" combine="choice">
    <element>
      <name ns="">Frontmatter</name>
      <ref name="showtags-attributes"/>
      <attribute name="rolemaps-to">
        <value>Sect</value>
      </attribute>
      <optional>
        <attribute name="id"/>
      </optional>
      <ref name="Frontmatter-Title"/>
      <optional>
        <ref name="TOC"/>
      </optional>
      <zeroOrMore>
        <ref name="text-unit"/>
      </zeroOrMore>
    </element>
  </define>
  <define name="Sect" combine="choice">
    <element>
      <name ns="">Testament</name>
      <ref name="showtags-attributes"/>
      <attribute name="rolemaps-to">
        <value>Sect</value>
      </attribute>
      <optional>
        <attribute name="id"/>
      </optional>
      <ref name="Testament-Title"/>
      <optional>
        <ref name="TOC"/>
      </optional>
      <zeroOrMore>
        <ref name="text-unit"/>
      </zeroOrMore>
      <zeroOrMore>
        <ref name="Book"/>
      </zeroOrMore>
    </element>
  </define>
  <define name="Testament">
    <element>
      <name ns="">Testament</name>
      <ref name="showtags-attributes"/>
      <attribute name="rolemaps-to">
        <value>Sect</value>
      </attribute>
      <optional>
        <attribute name="id"/>
      </optional>
      <ref name="Testament-Title"/>
      <optional>
        <ref name="TOC"/>
      </optional>
      <zeroOrMore>
        <choice>
          <ref name="text-unit"/>
          <ref name="Span"/>
        </choice>
      </zeroOrMore>
      <zeroOrMore>
        <ref name="Book"/>
      </zeroOrMore>
    </element>
  </define>
  <define name="Frontmatter-Title">
    <element>
      <name ns="">Frontmatter-Title</name>
      <ref name="showtags-attributes"/>
      <attribute name="rolemaps-to">
        <value>H1</value>
      </attribute>
      <optional>
        <attribute name="id"/>
      </optional>
      <attribute name="title"/>
      <zeroOrMore>
        <ref name="Span"/>
      </zeroOrMore>
    </element>
  </define>
  <define name="Testament-Title">
    <element>
      <name ns="">Testament-Title</name>
      <ref name="showtags-attributes"/>
      <attribute name="rolemaps-to">
        <value>H1</value>
      </attribute>
      <optional>
        <attribute name="id"/>
      </optional>
      <attribute name="title"/>
      <zeroOrMore>
        <ref name="Span"/>
      </zeroOrMore>
    </element>
  </define>
  <define name="Book">
    <element>
      <name ns="">Book</name>
      <ref name="showtags-attributes"/>
      <attribute name="rolemaps-to">
        <value>Sect</value>
      </attribute>
      <optional>
        <attribute name="id"/>
      </optional>
      <ref name="Book-Title"/>
      <optional>
        <ref name="TOC"/>
      </optional>
      <zeroOrMore>
        <choice>
          <ref name="text-unit"/>
          <ref name="Span"/>
        </choice>
      </zeroOrMore>
      <zeroOrMore>
        <ref name="BChapter"/>
      </zeroOrMore>
    </element>
  </define>
  <define name="Book-Title">
    <element>
      <name ns="">Book-Title</name>
      <ref name="showtags-attributes"/>
      <attribute name="rolemaps-to">
        <value>H2</value>
      </attribute>
      <optional>
        <attribute name="id"/>
      </optional>
      <attribute name="title"/>
      <zeroOrMore>
        <ref name="Span"/>
      </zeroOrMore>
    </element>
  </define>
  <define name="BChapter">
    <element>
      <name ns="">Chapter</name>
      <ref name="showtags-attributes"/>
      <attribute name="rolemaps-to">
        <value>Sect</value>
      </attribute>
      <optional>
        <attribute name="id"/>
      </optional>
      <optional>
        <ref name="Chapter-Title"/>
      </optional>
      <optional>
        <ref name="TOC"/>
      </optional>
      <zeroOrMore>
        <choice>
          <ref name="text-unit"/>
          <ref name="Span"/>
        </choice>
      </zeroOrMore>
      <zeroOrMore>
        <ref name="Bverse"/>
      </zeroOrMore>
    </element>
  </define>
  <define name="Chapter-Title">
    <element>
      <name ns="">Chapter-Title</name>
      <ref name="showtags-attributes"/>
      <ref name="layout-attributes"/>
      <attribute name="rolemaps-to">
        <value>H3</value>
      </attribute>
      <optional>
        <attribute name="id"/>
      </optional>
      <optional>
        <attribute name="title"/>
      </optional>
      <zeroOrMore>
        <choice>
          <text/>
          <ref name="Span"/>
        </choice>
      </zeroOrMore>
    </element>
  </define>
  <define name="Bverse">
    <element>
      <name ns="">verse</name>
      <ref name="showtags-attributes"/>
      <attribute name="rolemaps-to">
        <value>P</value>
      </attribute>
      <ref name="pdf2-attributes"/>
      <zeroOrMore>
        <choice>
          <text/>
          <ref name="text-unit"/>
          <ref name="Span"/>
        </choice>
      </zeroOrMore>
    </element>
  </define>
</grammar>
