Listing of xtf2.rng
<?xml version="1.0" encoding="UTF-8"?>
<grammar xmlns="http://relaxng.org/ns/structure/1.0"
ns="http://emegir.info/xtf/2"
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" >
<include href="gdl.rng"/>
<include href="xtr.rng"/>
<start>
<choice>
<ref name="xtf"/>
<ref name="translation"/>
<ref name="transliteration"/>
<ref name="composite"/>
<ref name="atf"/>
</choice>
</start>
<define name="xtf">
<element name="xtf">
<optional>
<ref name="proto.outer"/>
</optional>
<zeroOrMore>
<choice>
<ref name="atf"/>
<ref name="transliteration"/>
<ref name="composite"/>
<ref name="translation"/>
</choice>
</zeroOrMore>
</element>
</define>
<define name="atf">
<element name="atf">
<attribute name="xml:id">
<data type="ID"/>
</attribute>
<text/>
</element>
</define>
<define name="proto.outer">
<element name="protocols">
<attribute name="scope"/>
<ref name="proto.basket"/>
</element>
</define>
<define name="proto.start">
<element name="protocols">
<attribute name="scope"/>
<zeroOrMore>
<choice>
<ref name="proto.atf"/>
<ref name="proto.bib"/>
<ref name="proto.etcsl"/>
<ref name="proto.key"/>
<ref name="proto.lemmatizer"/>
<ref name="proto.link"/>
<ref name="proto.project"/>
<ref name="proto.syntax"/>
<ref name="proto.version"/>
</choice>
</zeroOrMore>
</element>
</define>
<define name="proto.after">
<ref name="proto.note"/>
</define>
<define name="proto.inter">
<choice>
<ref name="proto.bib"/>
<ref name="proto.etcsl"/>
<ref name="proto.lem"/>
<ref name="proto.link"/>
<ref name="proto.note"/>
<ref name="proto.var"/>
</choice>
</define>
<define name="proto.atf">
<element name="protocol">
<attribute name="type">
<value>atf</value>
</attribute>
<text/>
</element>
</define>
<define name="proto.basket">
<element name="protocol">
<attribute name="type">
<value>basket</value>
</attribute>
<text/>
</element>
</define>
<define name="proto.bib">
<element name="protocol">
<attribute name="type">
<value>bib</value>
</attribute>
<text/>
</element>
</define>
<define name="proto.etcsl">
<element name="protocol">
<attribute name="type">
<value>etcsl</value>
</attribute>
<text/>
</element>
</define>
<define name="proto.key">
<element name="protocol">
<attribute name="type">
<value>key</value>
</attribute>
<text/>
</element>
</define>
<define name="proto.lem">
<element name="protocol">
<attribute name="type">
<value>lem</value>
</attribute>
<text/>
</element>
</define>
<define name="proto.lemmatizer">
<element name="protocol">
<attribute name="type">
<value>lemmatizer</value>
</attribute>
<text/>
</element>
</define>
<define name="proto.link">
<element name="protocol">
<attribute name="type">
<value>link</value>
</attribute>
<text/>
</element>
</define>
<define name="proto.note">
<element name="protocol">
<attribute name="type">
<value>note</value>
</attribute>
<text/>
</element>
</define>
<define name="proto.project">
<element name="protocol">
<attribute name="type">
<value>project</value>
</attribute>
<text/>
</element>
</define>
<define name="proto.syntax">
<element name="protocol">
<attribute name="type">
<value>syntax</value>
</attribute>
<text/>
</element>
</define>
<define name="proto.var">
<element name="protocol">
<attribute name="type">
<value>var</value>
</attribute>
<text/>
</element>
</define>
<define name="proto.version">
<element name="protocol">
<attribute name="type">
<value>version</value>
</attribute>
<text/>
</element>
</define>
<define name="comments">
<choice>
<ref name="cmt"/>
<ref name="note"/>
</choice>
</define>
<define name="cmt">
<element name="cmt">
<text/>
</element>
</define>
<define name="note">
<element name="note">
<text/>
</element>
</define>
<define name="transliteration">
<element name="transliteration">
<attribute name="xml:id">
<data type="ID"/>
</attribute>
<attribute name="n"/>
<optional>
<attribute name="hand"/>
</optional>
<attribute name="xml:lang">
<data type="NMTOKEN"/>
</attribute>
<optional>
<ref name="project"/>
</optional>
<optional>
<ref name="implicit"/>
</optional>
<optional>
<ref name="haslinks"/>
</optional>
<optional>
<ref name="maxcells"/>
</optional>
<group>
<optional>
<ref name="proto.start"/>
</optional>
<zeroOrMore>
<choice>
<ref name="object"/>
<ref name="nonobject"/>
<ref name="comments"/>
<ref name="sealing"/>
</choice>
</zeroOrMore>
</group>
</element>
</define>
<define name="n.attr">
<attribute name="n"/>
</define>
<define name="n.attr.lc">
<attribute name="n">
<data type="string">
<param name="pattern">[a-z]</param>
</data>
</attribute>
</define>
<define name="haslinks">
<attribute name="haslinks">
<data type="boolean"/>
</attribute>
</define>
<define name="maxcells">
<attribute name="cols">
<data type="nonNegativeInteger"/>
</attribute>
</define>
<define name="project">
<attribute name="project">
<data type="NMTOKEN"/>
</attribute>
</define>
<define name="object">
<element name="object">
<choice>
<ref name="implicit"/>
<group>
<attribute name="xml:id">
<data type="ID"/>
</attribute>
<attribute name="label"/>
</group>
</choice>
<choice>
<attribute name="type">
<ref name="known.object"/>
</attribute>
<group>
<attribute name="type">
<ref name="user.object"/>
</attribute>
<ref name="n.attr"/>
</group>
</choice>
<ref name="status.flags"/>
<zeroOrMore>
<choice>
<ref name="m.fragment"/>
<ref name="surface"/>
<ref name="sealing"/>
<ref name="comments"/>
<ref name="nonx"/>
</choice>
</zeroOrMore>
</element>
</define>
<define name="known.object">
<data type="string">
<param name="pattern">tablet|envelope|prism|bulla</param>
</data>
</define>
<define name="user.object">
<data type="string">
<param name="pattern">object</param>
</data>
</define>
<define name="nonobject">
<ref name="nonx"/>
</define>
<define name="surface">
<element name="surface">
<choice>
<ref name="implicit"/>
<group>
<attribute name="xml:id">
<data type="ID"/>
</attribute>
<attribute name="label"/>
</group>
</choice>
<zeroOrMore>
<choice>
<ref name="proto.inter"/>
<ref name="column"/>
<ref name="nonx"/>
<ref name="m"/>
<ref name="comments"/>
</choice>
</zeroOrMore>
<choice>
<attribute name="type">
<ref name="known.surface"/>
</attribute>
<group>
<attribute name="type">
<ref name="face.surface"/>
</attribute>
<ref name="n.attr.lc"/>
</group>
<group>
<attribute name="type">
<ref name="edge.surface"/>
</attribute>
<optional>
<ref name="n.attr.lc"/>
</optional>
</group>
<group>
<attribute name="type">
<choice>
<ref name="user.surface"/>
<ref name="seal.surface"/>
</choice>
</attribute>
<ref name="n.attr"/>
</group>
</choice>
<optional>
<ref name="primes"/>
</optional>
<ref name="status.flags"/>
</element>
</define>
<define name="known.surface">
<data type="string">
<param name="pattern" >surface|obverse|reverse|left|right|top|bottom</param>
</data>
</define>
<define name="face.surface">
<data type="string">
<param name="pattern">face</param>
</data>
</define>
<define name="edge.surface">
<data type="string">
<param name="pattern">edge</param>
</data>
</define>
<define name="user.surface">
<data type="string">
<param name="pattern">surface</param>
</data>
</define>
<define name="seal.surface">
<data type="string">
<param name="pattern">seal</param>
</data>
</define>
<define name="sealing">
<element name="sealing">
<attribute name="xml:id">
<data type="ID"/>
</attribute>
<attribute name="label"/>
<attribute name="n">
<data type="NMTOKEN"/>
</attribute>
<optional>
<attribute name="scid">
<data type="NMTOKEN"/>
</attribute>
</optional>
<zeroOrMore>
<choice>
<ref name="column"/>
<ref name="nonx"/>
<ref name="milestone"/>
<ref name="comments"/>
</choice>
</zeroOrMore>
</element>
</define>
<define name="column">
<element name="column">
<choice>
<ref name="implicit"/>
<group>
<attribute name="xml:id">
<data type="ID"/>
</attribute>
<attribute name="label"/>
</group>
</choice>
<zeroOrMore>
<choice>
<ref name="milestone"/>
<ref name="lg"/>
<ref name="l"/>
<ref name="nonl"/>
<ref name="nonx"/>
<ref name="comments"/>
<ref name="proto.inter"/>
</choice>
</zeroOrMore>
<attribute name="n"/>
<optional>
<attribute name="o"/>
</optional>
<optional>
<ref name="primes"/>
</optional>
<ref name="status.flags"/>
</element>
</define>
<define name="primes">
<attribute name="primes">
<data type="string">
<param name="pattern">′+</param>
</data>
</attribute>
</define>
<define name="milestone">
<choice>
<ref name="m"/>
<ref name="m.discourse"/>
</choice>
</define>
<define name="m">
<element name="m">
<attribute name="type">
<choice>
<value>division</value>
<value>locator</value>
</choice>
</attribute>
<optional>
<attribute name="subtype">
<data type="NMTOKEN"/>
</attribute>
</optional>
<text/>
</element>
</define>
<define name="m.discourse">
<element name="m">
<attribute name="type">
<value>discourse</value>
</attribute>
<attribute name="subtype">
<choice>
<value>body</value>
<value>date</value>
<value>linecount</value>
<value>witnesses</value>
<value>summary</value>
</choice>
</attribute>
<text/>
</element>
</define>
<define name="m.fragment">
<element name="m">
<attribute name="type">
<value>locator</value>
</attribute>
<optional>
<attribute name="subtype">
<value>fragment</value>
</attribute>
</optional>
<text/>
</element>
</define>
<define name="implicit">
<attribute name="implicit">
<value>1</value>
</attribute>
</define>
<define name="nonx">
<element name="nonx">
<ref name="nonx-attlist"/>
<text/>
</element>
</define>
<define name="nonl">
<element name="nonl">
<ref name="nonl-attlist"/>
<text/>
</element>
</define>
<define name="nong">
<element name="nong">
<ref name="nong-attlist"/>
<text/>
</element>
</define>
<define name="nonx-attlist">
<attribute name="xml:id">
<data type="ID"/>
</attribute>
<optional>
<attribute name="label"/>
<attribute name="silent">
<value>1</value>
</attribute>
</optional>
<choice>
<group>
<attribute name="strict">
<value>1</value>
</attribute>
<choice>
<group>
<attribute name="ref"/>
<attribute name="scope"/>
</group>
<group>
<attribute name="extent"/>
<attribute name="scope"/>
<attribute name="state"/>
</group>
</choice>
</group>
<group>
<attribute name="strict">
<value>0</value>
</attribute>
<optional>
<attribute name="extent"/>
</optional>
<optional>
<attribute name="ref"/>
</optional>
<optional>
<attribute name="scope"/>
</optional>
<optional>
<attribute name="state"/>
</optional>
</group>
<group>
<attribute name="strict">
<value>0</value>
</attribute>
<attribute name="ref">
<value>none</value>
</attribute>
<attribute name="type">
<value>empty</value>
</attribute>
</group>
<group>
<attribute name="type">
<value>image</value>
</attribute>
<attribute name="strict">
<value>0</value>
</attribute>
<attribute name="ref">
<data type="string">
<param name="pattern">[PQX][0-9]+@[0-9]+[a-z]*</param>
</data>
</attribute>
<attribute name="alt"/>
</group>
</choice>
</define>
<define name="non-x-attr-set">
<attribute name="type">
<choice>
<value>newline</value>
<value>broken</value>
<value>maybe-broken</value>
<value>traces</value>
<value>maybe-traces</value>
<value>blank</value>
<value>ruling</value>
<value>image</value>
<value>seal</value>
<value>comment</value>
<value>bullet</value>
<value>other</value>
</choice>
</attribute>
<optional>
<attribute name="unit">
<choice>
<value>self</value>
<value>quantity</value>
<value>ref</value>
</choice>
</attribute>
</optional>
<optional>
<attribute name="extent"/>
</optional>
<optional>
<attribute name="ref"/>
</optional>
<optional>
<attribute name="xml:id">
<data type="ID"/>
</attribute>
</optional>
</define>
<define name="noncolumn-attlist" combine="interleave">
<ref name="non-x-attr-set"/>
</define>
<define name="nonl-attlist" combine="interleave">
<ref name="non-x-attr-set"/>
</define>
<define name="nong-attlist" combine="interleave">
<ref name="non-x-attr-set"/>
</define>
<define name="l">
<element name="l">
<attribute name="xml:id">
<data type="ID"/>
</attribute>
<attribute name="n"/>
<optional>
<attribute name="o"/>
</optional>
<optional>
<attribute name="l"/>
</optional>
<optional>
<attribute name="label"/>
</optional>
<optional>
<attribute name="silent">
<value>1</value>
</attribute>
</optional>
<choice>
<oneOrMore>
<ref name="cell"/>
</oneOrMore>
<oneOrMore>
<ref name="f"/>
</oneOrMore>
<zeroOrMore>
<choice>
<ref name="ag"/>
<ref name="l.inner"/>
</choice>
</zeroOrMore>
</choice>
</element>
</define>
<define name="l.inner">
<zeroOrMore>
<choice>
<ref name="surro"/>
<ref name="normword"/>
<ref name="words"/>
<ref name="glo"/>
</choice>
</zeroOrMore>
</define>
<define name="cell">
<element name="c">
<optional>
<ref name="span"/>
</optional>
<choice>
<oneOrMore>
<ref name="f"/>
</oneOrMore>
<ref name="l.inner"/>
</choice>
</element>
</define>
<define name="span">
<attribute name="span">
<data type="nonNegativeInteger"/>
</attribute>
</define>
<define name="f">
<element name="f">
<ref name="f-attlist"/>
<zeroOrMore>
<choice>
<ref name="ag"/>
<ref name="l.inner"/>
</choice>
</zeroOrMore>
</element>
</define>
<define name="f-attlist" combine="interleave">
<optional>
<attribute name="xml:id">
<data type="ID"/>
</attribute>
</optional>
<optional>
<attribute name="n"/>
</optional>
<attribute name="type">
<data type="NMTOKEN"/>
</attribute>
<optional>
<attribute name="xml:lang">
<data type="NMTOKEN"/>
</attribute>
</optional>
</define>
<define name="lg">
<element name="lg">
<optional>
<attribute name="xml:id">
<data type="ID"/>
</attribute>
</optional>
<optional>
<attribute name="n"/>
</optional>
<choice>
<group>
<ref name="l"/>
<optional>
<ref name="gus"/>
</optional>
<ref name="nts"/>
</group>
<group>
<ref name="l"/>
<optional>
<ref name="gus"/>
</optional>
<ref name="lgs"/>
</group>
<group>
<ref name="l"/>
<optional>
<ref name="gus"/>
</optional>
<ref name="nts"/>
<ref name="lgs"/>
</group>
<group>
<ref name="l"/>
<optional>
<ref name="gus"/>
</optional>
<zeroOrMore>
<choice>
<ref name="e"/>
<ref name="comments"/>
</choice>
</zeroOrMore>
</group>
</choice>
<zeroOrMore>
<ref name="proto.inter"/>
</zeroOrMore>
<zeroOrMore>
<ref name="var"/>
</zeroOrMore>
</element>
</define>
<define name="nts">
<element name="l">
<attribute name="type">
<value>nts</value>
</attribute>
<zeroOrMore>
<choice>
<ref name="ag"/>
<ref name="l.inner"/>
</choice>
</zeroOrMore>
</element>
</define>
<define name="lgs">
<element name="l">
<attribute name="type">
<value>lgs</value>
</attribute>
<zeroOrMore>
<ref name="grapheme"/>
</zeroOrMore>
</element>
</define>
<define name="gus">
<element name="l">
<attribute name="type">
<value>gus</value>
</attribute>
<zeroOrMore>
<ref name="l.inner"/>
</zeroOrMore>
</element>
</define>
<define name="var">
<element name="v">
<attribute name="varnum">
<data type="NMTOKEN"/>
</attribute>
<ref name="l.inner"/>
</element>
</define>
<!---->
<define name="ag">
<element name="ag">
<attribute name="ref">
<data type="string">
<param name="pattern">[a-z]+</param>
</data>
</attribute>
<optional>
<attribute name="form"/>
</optional>
<zeroOrMore>
<ref name="l.inner"/>
</zeroOrMore>
</element>
</define>
<define name="surro">
<element name="surro">
<ref name="l.inner"/>
</element>
</define>
<define name="words" combine="choice">
<optional>
<ref name="surro"/>
</optional>
</define>
<define name="word" combine="choice">
<optional>
<ref name="surro"/>
</optional>
</define>
<define name="composite">
<element name="composite">
<ref name="composite-attlist"/>
<zeroOrMore>
<ref name="sigdef"/>
</zeroOrMore>
<optional>
<attribute name="hand"/>
</optional>
<optional>
<ref name="project"/>
</optional>
<optional>
<ref name="implicit"/>
</optional>
<optional>
<ref name="haslinks"/>
</optional>
<optional>
<ref name="maxcells"/>
</optional>
<optional>
<ref name="proto.start"/>
</optional>
<ref name="composite-content"/>
<zeroOrMore>
<ref name="referto"/>
<optional>
<ref name="comments"/>
</optional>
</zeroOrMore>
</element>
</define>
<define name="composite-attlist" combine="interleave">
<attribute name="xml:id">
<data type="ID"/>
</attribute>
<attribute name="n"/>
<optional>
<attribute name="xml:lang">
<data type="NMTOKEN"/>
</attribute>
</optional>
</define>
<define name="composite-content">
<zeroOrMore>
<choice>
<ref name="milestone"/>
<ref name="include"/>
<ref name="div"/>
<ref name="variants"/>
<ref name="lg"/>
<ref name="l"/>
<ref name="comments"/>
<ref name="nonl"/>
<ref name="nonx"/>
<ref name="proto.inter"/>
</choice>
</zeroOrMore>
</define>
<define name="include">
<element name="include">
<ref name="increfAttr"/>
</element>
</define>
<define name="referto">
<element name="referto">
<ref name="increfAttr"/>
</element>
</define>
<define name="increfAttr">
<attribute name="ref"/>
<attribute name="n"/>
<optional>
<attribute name="from"/>
<optional>
<attribute name="to"/>
</optional>
</optional>
</define>
<define name="div">
<element name="div">
<ref name="div-attlist"/>
<ref name="composite-content"/>
</element>
</define>
<define name="div-attlist" combine="interleave">
<optional>
<attribute name="xml:id">
<data type="ID"/>
</attribute>
</optional>
<optional>
<attribute name="n"/>
</optional>
<attribute name="type">
<data type="NMTOKEN"/>
</attribute>
<optional>
<attribute name="lang"/>
</optional>
<optional>
<attribute name="place"/>
</optional>
<optional>
<attribute name="subtype"/>
</optional>
</define>
<define name="variants">
<element name="variants">
<zeroOrMore>
<ref name="variant"/>
</zeroOrMore>
</element>
</define>
<define name="variant">
<element name="variant">
<zeroOrMore>
<choice>
<ref name="div"/>
<ref name="variants"/>
<ref name="lg"/>
<ref name="l"/>
<ref name="comments"/>
<ref name="nonl"/>
<ref name="proto.inter"/>
<ref name="nonx"/>
</choice>
</zeroOrMore>
</element>
</define>
<define name="score">
<element name="score">
<ref name="score-attlist"/>
<zeroOrMore>
<ref name="sigdef"/>
</zeroOrMore>
<zeroOrMore>
<choice>
<ref name="milestone"/>
<ref name="div"/>
<ref name="lg"/>
<ref name="comments"/>
<ref name="nonl"/>
</choice>
</zeroOrMore>
</element>
</define>
<define name="score-attlist" combine="interleave">
<attribute name="xml:id">
<data type="ID"/>
</attribute>
<attribute name="n"/>
<optional>
<attribute name="xml:lang">
<data type="NMTOKEN"/>
</attribute>
</optional>
</define>
<define name="synopticon">
<element name="synopticon">
<ref name="synopticon-attlist"/>
<zeroOrMore>
<ref name="sigdef"/>
</zeroOrMore>
<zeroOrMore>
<choice>
<ref name="eg"/>
<ref name="comments"/>
<ref name="nonl"/>
</choice>
</zeroOrMore>
</element>
</define>
<define name="synopticon-attlist" combine="interleave">
<attribute name="xml:id">
<data type="ID"/>
</attribute>
<attribute name="n"/>
<optional>
<attribute name="xml:lang">
<data type="NMTOKEN"/>
</attribute>
</optional>
</define>
<define name="sigdef">
<element name="sigdef">
<ref name="sigdef-attlist"/>
<empty/>
</element>
</define>
<define name="sigdef-attlist" combine="interleave">
<attribute name="xml:id">
<data type="ID"/>
</attribute>
<attribute name="targ-id">
<data type="NMTOKEN"/>
</attribute>
<attribute name="targ-n"/>
</define>
<define name="eg">
<element name="eg">
<ref name="eg-attlist"/>
<zeroOrMore>
<ref name="e"/>
</zeroOrMore>
</element>
</define>
<define name="eg-attlist" combine="interleave">
<optional>
<attribute name="xml:id">
<data type="ID"/>
</attribute>
</optional>
</define>
<define name="e">
<element name="e">
<ref name="e-attlist"/>
<choice>
<ref name="l.inner"/>
<oneOrMore>
<ref name="c"/>
</oneOrMore>
<oneOrMore>
<ref name="f"/>
</oneOrMore>
</choice>
</element>
</define>
<define name="e-attlist" combine="interleave">
<optional>
<attribute name="xml:id">
<data type="ID"/>
</attribute>
</optional>
<optional>
<attribute name="sigref">
<data type="IDREF"/>
</attribute>
</optional>
<optional>
<attribute name="n"/>
</optional>
<optional>
<attribute name="l"/>
</optional>
<optional>
<attribute name="p"/>
</optional>
<optional>
<attribute name="hlid"/>
</optional>
<optional>
<attribute name="plid"/>
</optional>
</define>
</grammar>