| <?xml version="1.0" encoding="UTF-8"?> |
| |
| <grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" ns="http://ids-mannheim.de/ns/KorAP" xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0"> |
| <!-- $Id$ --> |
| <start> |
| <element name="layer"> |
| <optional> |
| <attribute name="type"> |
| <a:documentation>As of Sep 2013, this isn't used anywhere.</a:documentation> |
| <data type="NCName"/> |
| </attribute> |
| </optional> |
| <attribute name="version"> |
| <value>KorAP-0.4</value> |
| </attribute> |
| <attribute name="docid"> |
| <data type="NCName"/> |
| </attribute> |
| <optional> |
| <attribute name="unit" a:defaultValue="char"> |
| <documentation xmlns="http://relaxng.org/ns/compatibility/annotations/1.0">Default: character</documentation> |
| <choice> |
| <value type="NCName">char</value> |
| <value type="NCName">msec</value> |
| <value type="NCName">sec</value> |
| </choice> |
| </attribute> |
| </optional> |
| <oneOrMore> |
| <element name="spanList"> |
| <!-- shouldn't this come straight from XML? |
| <optional> |
| <attribute> |
| <documentation xmlns="http://relaxng.org/ns/compatibility/annotations/1.0">If you ask me about why we need xml:base here, the answer is probably: I forgot to remove it and maybe I should -P</documentation> |
| <name ns="http://www.w3.org/XML/1998/namespace">base</name> |
| <data type="anyURI"/> |
| </attribute> |
| </optional>--> |
| <optional> |
| <attribute name="fragmented"> |
| <a:documentation>For spanLists non-exhaustively covered by the spans therein.</a:documentation> |
| <data type="boolean"/> |
| </attribute> |
| </optional> |
| <optional> |
| <attribute name="speaker-id"> |
| <documentation xmlns="http://relaxng.org/ns/compatibility/annotations/1.0">This is for speech corpora; the datatype restriction may be too strict, I assumed it is a real ID in the source</documentation> |
| <data type="NCName"/> |
| </attribute> |
| </optional> |
| <optional> |
| <attribute name="id"> |
| <data type="ID"/> |
| </attribute> |
| </optional> |
| <optional> |
| <attribute name="type"> |
| <data type="NCName"/> |
| </attribute> |
| </optional> |
| <oneOrMore> |
| <ref name="span"/> |
| </oneOrMore> |
| </element> |
| </oneOrMore> |
| </element> |
| </start> |
| <define name="span"> |
| <element name="span"> |
| <optional> |
| <attribute name="id"> |
| <data type="ID"/> |
| </attribute> |
| </optional> |
| <!--<optional> |
| <attribute name="type"> |
| <data type="NCName"/> |
| </attribute> |
| </optional>--> |
| <attribute name="from"> |
| <choice> |
| <data type="integer"/> |
| </choice> |
| </attribute> |
| <attribute name="to"> |
| <choice> |
| <data type="integer"/> |
| </choice> |
| </attribute> |
| <optional> |
| <documentation xmlns="http://relaxng.org/ns/compatibility/annotations/1.0">This attribute is used in the base foundry tokenization files only, and only for a while, for debugging purposes. It may be that the time has come to comment it out.</documentation> |
| <attribute name="word"> |
| <data type="string"/> |
| </attribute> |
| </optional> |
| <optional> |
| <attribute name="prev"> |
| <data type="integer"/> |
| </attribute> |
| </optional> |
| <optional> |
| <attribute name="next"> |
| <data type="integer"/> |
| </attribute> |
| </optional> |
| <optional> |
| <attribute name="prev_id"> |
| <data type="IDREF"/> |
| </attribute> |
| </optional> |
| <optional> |
| <attribute name="next_id"> |
| <data type="IDREF"/> |
| </attribute> |
| </optional> |
| |
| <optional> |
| <ref name="fs"/> |
| </optional> |
| |
| <zeroOrMore> |
| <ref name="rel"/> |
| </zeroOrMore> |
| </element> |
| </define> |
| |
| <define name="rel"> |
| <element name="rel"> |
| <documentation xmlns="http://relaxng.org/ns/compatibility/annotations/1.0">The possible children are <fs/> and <span/>, in any order. <fs/> or the @label attribute are used to encode the 'labelling' information. Instead of <span/>, one can use either the @target attribute (for referring to IDs within the same file), or the @uri attribute (for URIs), or the attribute @type with the values set to either "unary" (for e.g. the malformed dependencies that XIP produces) or "refl" for reflexive relationships.</documentation> |
| <!--<optional> |
| <attribute name="n"> |
| <documentation xmlns="http://relaxng.org/ns/compatibility/annotations/1.0">This is a kludgey attribute, currently used for dependencies that target e.g. a compound or an infinitive together with "zu"</documentation> |
| <data type="integer"/> |
| </attribute> |
| </optional>--> |
| <interleave> |
| <choice> |
| <attribute name="label"> |
| <text/> |
| </attribute> |
| <ref name="fs"/> |
| </choice> |
| <choice> |
| <choice> |
| <attribute name="target"> |
| <data type="IDREF"/> |
| </attribute> |
| <attribute name="uri"> |
| <data type="anyURI"/> |
| </attribute> |
| </choice> |
| <oneOrMore><ref name="span"/></oneOrMore> |
| <!-- oneOrMore was introduced here for time spans; this could be handled by separate <rel> elements, of course--> |
| <attribute name="type"> |
| <choice> |
| <value type="NCName">unary</value> |
| <value type="NCName">refl</value> |
| </choice> |
| </attribute> |
| </choice> |
| </interleave> |
| </element> |
| </define> |
| |
| <include href="fsr.rng"/> |
| </grammar> |