grammars/basicdoc.rng in relaton-iho-1.7.2 vs grammars/basicdoc.rng in relaton-iho-1.8.0
- old
+ new
@@ -1,11 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
- <include href="biblio.rng"/>
- <start>
- <ref name="document"/>
- </start>
+ <include href="biblio.rng">
+ <start>
+ <ref name="document"/>
+ </start>
+ </include>
<define name="document">
<element name="document">
<optional>
<attribute name="identifier"/>
</optional>
@@ -41,17 +42,20 @@
<attribute name="id">
<data type="ID"/>
</attribute>
</optional>
<optional>
- <ref name="section-title"/>
+ <attribute name="language"/>
</optional>
<optional>
- <ref name="BasicBlock"/>
+ <attribute name="script"/>
</optional>
+ <optional>
+ <ref name="section-title"/>
+ </optional>
<zeroOrMore>
- <ref name="note"/>
+ <ref name="BasicBlock"/>
</zeroOrMore>
</define>
<define name="references">
<element name="references">
<optional>
@@ -90,10 +94,14 @@
<ref name="quote"/>
<ref name="sourcecode"/>
<ref name="example"/>
<ref name="review"/>
<ref name="pre"/>
+ <ref name="note"/>
+ <ref name="pagebreak"/>
+ <ref name="hr"/>
+ <ref name="bookmark"/>
</choice>
</define>
<define name="paragraph">
<element name="p">
<ref name="ParagraphType"/>
@@ -186,10 +194,18 @@
<optional>
<attribute name="unnumbered">
<data type="boolean"/>
</attribute>
</optional>
+ <optional>
+ <attribute name="subsequence"/>
+ </optional>
+ <optional>
+ <attribute name="inequality">
+ <data type="boolean"/>
+ </attribute>
+ </optional>
<ref name="stem"/>
<optional>
<ref name="dl"/>
</optional>
<zeroOrMore>
@@ -240,10 +256,13 @@
<attribute name="unnumbered">
<data type="boolean"/>
</attribute>
</optional>
<optional>
+ <attribute name="subsequence"/>
+ </optional>
+ <optional>
<attribute name="lang"/>
</optional>
<optional>
<ref name="tname"/>
</optional>
@@ -265,10 +284,13 @@
<element name="pre">
<attribute name="id">
<data type="ID"/>
</attribute>
<optional>
+ <attribute name="alt"/>
+ </optional>
+ <optional>
<ref name="tname"/>
</optional>
<text/>
<zeroOrMore>
<ref name="note"/>
@@ -284,13 +306,19 @@
<attribute name="unnumbered">
<data type="boolean"/>
</attribute>
</optional>
<optional>
+ <attribute name="subsequence"/>
+ </optional>
+ <optional>
<attribute name="alt"/>
</optional>
<optional>
+ <attribute name="summary"/>
+ </optional>
+ <optional>
<attribute name="uri">
<data type="anyURI"/>
</attribute>
</optional>
<optional>
@@ -311,18 +339,22 @@
</optional>
</element>
</define>
<define name="tname">
<element name="name">
- <text/>
+ <oneOrMore>
+ <choice>
+ <ref name="PureTextElement"/>
+ <ref name="eref"/>
+ <ref name="stem"/>
+ <ref name="keyword"/>
+ <ref name="xref"/>
+ <ref name="hyperlink"/>
+ </choice>
+ </oneOrMore>
</element>
</define>
- <define name="tclass">
- <element name="name">
- <text/>
- </element>
- </define>
<define name="thead">
<element name="thead">
<ref name="tr"/>
</element>
</define>
@@ -368,10 +400,20 @@
<value>right</value>
<value>center</value>
</choice>
</attribute>
</optional>
+ <optional>
+ <attribute name="valign">
+ <choice>
+ <value>top</value>
+ <value>middle</value>
+ <value>bottom</value>
+ <value>baseline</value>
+ </choice>
+ </attribute>
+ </optional>
<choice>
<zeroOrMore>
<ref name="TextElement"/>
</zeroOrMore>
<oneOrMore>
@@ -395,10 +437,20 @@
<value>right</value>
<value>center</value>
</choice>
</attribute>
</optional>
+ <optional>
+ <attribute name="valign">
+ <choice>
+ <value>top</value>
+ <value>middle</value>
+ <value>bottom</value>
+ <value>baseline</value>
+ </choice>
+ </attribute>
+ </optional>
<choice>
<zeroOrMore>
<ref name="TextElement"/>
</zeroOrMore>
<oneOrMore>
@@ -415,10 +467,16 @@
<optional>
<attribute name="unnumbered">
<data type="boolean"/>
</attribute>
</optional>
+ <optional>
+ <attribute name="subsequence"/>
+ </optional>
+ <optional>
+ <ref name="tname"/>
+ </optional>
<oneOrMore>
<choice>
<ref name="formula"/>
<ref name="ul"/>
<ref name="ol"/>
@@ -479,21 +537,29 @@
<attribute name="unnumbered">
<data type="boolean"/>
</attribute>
</optional>
<optional>
- <ref name="source"/>
+ <attribute name="subsequence"/>
</optional>
<optional>
- <ref name="tname"/>
+ <attribute name="class"/>
</optional>
<optional>
- <ref name="tclass"/>
+ <ref name="source"/>
</optional>
+ <optional>
+ <ref name="tname"/>
+ </optional>
<choice>
<ref name="image"/>
+ <ref name="video"/>
+ <ref name="audio"/>
<ref name="pre"/>
+ <oneOrMore>
+ <ref name="paragraph-with-footnote"/>
+ </oneOrMore>
<zeroOrMore>
<ref name="figure"/>
</zeroOrMore>
</choice>
<zeroOrMore>
@@ -527,10 +593,12 @@
<ref name="hyperlink"/>
<ref name="hr"/>
<ref name="pagebreak"/>
<ref name="bookmark"/>
<ref name="image"/>
+ <ref name="index"/>
+ <ref name="index-xref"/>
</choice>
</define>
<define name="PureTextElement">
<choice>
<text/>
@@ -551,18 +619,24 @@
</element>
</define>
<define name="em">
<element name="em">
<zeroOrMore>
- <ref name="PureTextElement"/>
+ <choice>
+ <ref name="PureTextElement"/>
+ <ref name="stem"/>
+ </choice>
</zeroOrMore>
</element>
</define>
<define name="strong">
<element name="strong">
<zeroOrMore>
- <ref name="PureTextElement"/>
+ <choice>
+ <ref name="PureTextElement"/>
+ <ref name="stem"/>
+ </choice>
</zeroOrMore>
</element>
</define>
<define name="tt">
<element name="tt">
@@ -651,10 +725,69 @@
<define name="pagebreak">
<element name="pagebreak">
<empty/>
</element>
</define>
+ <define name="index">
+ <element name="index">
+ <optional>
+ <attribute name="to">
+ <data type="IDREF"/>
+ </attribute>
+ </optional>
+ <element name="primary">
+ <oneOrMore>
+ <ref name="PureTextElement"/>
+ </oneOrMore>
+ </element>
+ <optional>
+ <element name="secondary">
+ <oneOrMore>
+ <ref name="PureTextElement"/>
+ </oneOrMore>
+ </element>
+ </optional>
+ <optional>
+ <element name="tertiary">
+ <oneOrMore>
+ <ref name="PureTextElement"/>
+ </oneOrMore>
+ </element>
+ </optional>
+ </element>
+ </define>
+ <define name="index-xref">
+ <element name="index-xref">
+ <attribute name="also">
+ <data type="boolean"/>
+ </attribute>
+ <element name="primary">
+ <oneOrMore>
+ <ref name="PureTextElement"/>
+ </oneOrMore>
+ </element>
+ <optional>
+ <element name="secondary">
+ <oneOrMore>
+ <ref name="PureTextElement"/>
+ </oneOrMore>
+ </element>
+ </optional>
+ <optional>
+ <element name="tertiary">
+ <oneOrMore>
+ <ref name="PureTextElement"/>
+ </oneOrMore>
+ </element>
+ </optional>
+ <element name="target">
+ <oneOrMore>
+ <ref name="PureTextElement"/>
+ </oneOrMore>
+ </element>
+ </element>
+ </define>
<!-- bare ID element, used for referencing arbitrary spans of text -->
<define name="bookmark">
<element name="bookmark">
<attribute name="id">
<data type="ID"/>
@@ -777,18 +910,21 @@
</optional>
<optional>
<attribute name="alt"/>
</optional>
<optional>
+ <attribute name="title"/>
+ </optional>
+ <optional>
<attribute name="longdesc">
<data type="anyURI"/>
</attribute>
</optional>
</element>
</define>
<define name="video">
- <element name="image">
+ <element name="video">
<attribute name="id">
<data type="ID"/>
</attribute>
<attribute name="src">
<data type="anyURI"/>
@@ -815,21 +951,24 @@
</optional>
<optional>
<attribute name="alt"/>
</optional>
<optional>
+ <attribute name="title"/>
+ </optional>
+ <optional>
<attribute name="longdesc">
<data type="anyURI"/>
</attribute>
</optional>
<zeroOrMore>
<ref name="altsource"/>
</zeroOrMore>
</element>
</define>
<define name="audio">
- <element name="image">
+ <element name="audio">
<attribute name="id">
<data type="ID"/>
</attribute>
<attribute name="src">
<data type="anyURI"/>
@@ -840,10 +979,13 @@
</optional>
<optional>
<attribute name="alt"/>
</optional>
<optional>
+ <attribute name="title"/>
+ </optional>
+ <optional>
<attribute name="longdesc">
<data type="anyURI"/>
</attribute>
</optional>
<zeroOrMore>
@@ -923,9 +1065,12 @@
<value>arabic</value>
<value>roman_upper</value>
<value>alphabet_upper</value>
</choice>
</attribute>
+ <optional>
+ <attribute name="start"/>
+ </optional>
<oneOrMore>
<ref name="li"/>
</oneOrMore>
<zeroOrMore>
<ref name="note"/>