bansp | c3cdcb9 | 2022-03-09 03:25:32 +0100 | [diff] [blame] | 1 | <?xml version="1.0" encoding="UTF-8"?> |
| 2 | |
| 3 | <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"> |
| 4 | <!-- $Id$ --> |
| 5 | <start> |
| 6 | <element name="layer"> |
| 7 | <optional> |
| 8 | <attribute name="type"> |
| 9 | <a:documentation>As of Sep 2013, this isn't used anywhere.</a:documentation> |
| 10 | <data type="NCName"/> |
| 11 | </attribute> |
| 12 | </optional> |
| 13 | <attribute name="version"> |
| 14 | <value>KorAP-0.4</value> |
| 15 | </attribute> |
| 16 | <attribute name="docid"> |
| 17 | <data type="NCName"/> |
| 18 | </attribute> |
| 19 | <optional> |
| 20 | <attribute name="unit" a:defaultValue="char"> |
| 21 | <documentation xmlns="http://relaxng.org/ns/compatibility/annotations/1.0">Default: character</documentation> |
| 22 | <choice> |
| 23 | <value type="NCName">char</value> |
| 24 | <value type="NCName">msec</value> |
| 25 | <value type="NCName">sec</value> |
| 26 | </choice> |
| 27 | </attribute> |
| 28 | </optional> |
| 29 | <oneOrMore> |
| 30 | <element name="spanList"> |
| 31 | <!-- shouldn't this come straight from XML? |
| 32 | <optional> |
| 33 | <attribute> |
| 34 | <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> |
| 35 | <name ns="http://www.w3.org/XML/1998/namespace">base</name> |
| 36 | <data type="anyURI"/> |
| 37 | </attribute> |
| 38 | </optional>--> |
| 39 | <optional> |
| 40 | <attribute name="fragmented"> |
| 41 | <a:documentation>For spanLists non-exhaustively covered by the spans therein.</a:documentation> |
| 42 | <data type="boolean"/> |
| 43 | </attribute> |
| 44 | </optional> |
| 45 | <optional> |
| 46 | <attribute name="speaker-id"> |
| 47 | <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> |
| 48 | <data type="NCName"/> |
| 49 | </attribute> |
| 50 | </optional> |
| 51 | <optional> |
| 52 | <attribute name="id"> |
| 53 | <data type="ID"/> |
| 54 | </attribute> |
| 55 | </optional> |
| 56 | <optional> |
| 57 | <attribute name="type"> |
| 58 | <data type="NCName"/> |
| 59 | </attribute> |
| 60 | </optional> |
| 61 | <oneOrMore> |
| 62 | <ref name="span"/> |
| 63 | </oneOrMore> |
| 64 | </element> |
| 65 | </oneOrMore> |
| 66 | </element> |
| 67 | </start> |
| 68 | <define name="span"> |
| 69 | <element name="span"> |
| 70 | <optional> |
| 71 | <attribute name="id"> |
| 72 | <data type="ID"/> |
| 73 | </attribute> |
| 74 | </optional> |
| 75 | <!--<optional> |
| 76 | <attribute name="type"> |
| 77 | <data type="NCName"/> |
| 78 | </attribute> |
| 79 | </optional>--> |
Piotr Banski | 06520d3 | 2022-05-30 02:20:00 +0200 | [diff] [blame^] | 80 | <optional> |
| 81 | <attribute name="l"> |
| 82 | <data type="integer"/> |
| 83 | </attribute> |
| 84 | </optional> |
bansp | c3cdcb9 | 2022-03-09 03:25:32 +0100 | [diff] [blame] | 85 | <attribute name="from"> |
| 86 | <choice> |
| 87 | <data type="integer"/> |
| 88 | </choice> |
| 89 | </attribute> |
| 90 | <attribute name="to"> |
| 91 | <choice> |
| 92 | <data type="integer"/> |
| 93 | </choice> |
| 94 | </attribute> |
| 95 | <optional> |
| 96 | <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> |
| 97 | <attribute name="word"> |
| 98 | <data type="string"/> |
| 99 | </attribute> |
| 100 | </optional> |
| 101 | <optional> |
| 102 | <attribute name="prev"> |
| 103 | <data type="integer"/> |
| 104 | </attribute> |
| 105 | </optional> |
| 106 | <optional> |
| 107 | <attribute name="next"> |
| 108 | <data type="integer"/> |
| 109 | </attribute> |
| 110 | </optional> |
| 111 | <optional> |
| 112 | <attribute name="prev_id"> |
| 113 | <data type="IDREF"/> |
| 114 | </attribute> |
| 115 | </optional> |
| 116 | <optional> |
| 117 | <attribute name="next_id"> |
| 118 | <data type="IDREF"/> |
| 119 | </attribute> |
| 120 | </optional> |
| 121 | |
| 122 | <optional> |
| 123 | <ref name="fs"/> |
| 124 | </optional> |
| 125 | |
| 126 | <zeroOrMore> |
| 127 | <ref name="rel"/> |
| 128 | </zeroOrMore> |
| 129 | </element> |
| 130 | </define> |
| 131 | |
| 132 | <define name="rel"> |
| 133 | <element name="rel"> |
| 134 | <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> |
| 135 | <!--<optional> |
| 136 | <attribute name="n"> |
| 137 | <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> |
| 138 | <data type="integer"/> |
| 139 | </attribute> |
| 140 | </optional>--> |
| 141 | <interleave> |
| 142 | <choice> |
| 143 | <attribute name="label"> |
| 144 | <text/> |
| 145 | </attribute> |
| 146 | <ref name="fs"/> |
| 147 | </choice> |
| 148 | <choice> |
| 149 | <choice> |
| 150 | <attribute name="target"> |
| 151 | <data type="IDREF"/> |
| 152 | </attribute> |
| 153 | <attribute name="uri"> |
| 154 | <data type="anyURI"/> |
| 155 | </attribute> |
| 156 | </choice> |
| 157 | <oneOrMore><ref name="span"/></oneOrMore> |
| 158 | <!-- oneOrMore was introduced here for time spans; this could be handled by separate <rel> elements, of course--> |
| 159 | <attribute name="type"> |
| 160 | <choice> |
| 161 | <value type="NCName">unary</value> |
| 162 | <value type="NCName">refl</value> |
| 163 | </choice> |
| 164 | </attribute> |
| 165 | </choice> |
| 166 | </interleave> |
| 167 | </element> |
| 168 | </define> |
| 169 | |
| 170 | <include href="fsr.rng"/> |
| 171 | </grammar> |