[6704] | 1 | <?xml version="1.0" encoding="UTF-8"?> |
---|
| 2 | <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" |
---|
| 3 | xmlns:h="http://www.w3.org/1999/xhtml" |
---|
| 4 | xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning" |
---|
| 5 | xml:lang="en" vc:minVersion="1.0" vc:maxVersion="1.1" |
---|
| 6 | xmlns:adv="http://clarin.eu/fcs/dataview/advanced" |
---|
| 7 | targetNamespace="http://clarin.eu/fcs/dataview/advanced" elementFormDefault="qualified"> |
---|
| 8 | |
---|
| 9 | <xs:annotation> |
---|
| 10 | <xs:documentation> |
---|
| 11 | <h:p> |
---|
| 12 | This schema defines the structure of a |
---|
| 13 | <h:em>advanced result</h:em> data view. |
---|
| 14 | </h:p> |
---|
| 15 | <h:p> |
---|
| 16 | The value <h:code>application/x-clarin-fcs-adv+xml</h:code> |
---|
| 17 | MUST be used to indicate a <h:em>generic result</h:em> data view. |
---|
| 18 | </h:p> |
---|
| 19 | </xs:documentation> |
---|
| 20 | </xs:annotation> |
---|
| 21 | |
---|
| 22 | <xs:element name="Advanced"> |
---|
| 23 | <xs:annotation> |
---|
| 24 | <xs:documentation> |
---|
| 25 | <h:p> |
---|
| 26 | CLARIN-FCS client MAY |
---|
| 27 | normalize white-space and strip leading and tailing |
---|
| 28 | white-space and collapse all white-space between |
---|
| 29 | tokens to a single #x20 character. |
---|
| 30 | </h:p> |
---|
| 31 | </xs:documentation> |
---|
| 32 | </xs:annotation> |
---|
| 33 | <xs:complexType> |
---|
| 34 | <xs:sequence> |
---|
| 35 | <!-- Segements --> |
---|
| 36 | <xs:element name="Segments"> |
---|
| 37 | <xs:complexType> |
---|
| 38 | <xs:sequence> |
---|
| 39 | <xs:element name="Segment" maxOccurs="unbounded"> |
---|
| 40 | <xs:annotation> |
---|
| 41 | <xs:documentation> |
---|
| 42 | <h:p> |
---|
| 43 | A segment is ... |
---|
| 44 | </h:p> |
---|
| 45 | </xs:documentation> |
---|
| 46 | </xs:annotation> |
---|
| 47 | <xs:complexType> |
---|
| 48 | <xs:attribute name="id" type="adv:referenceType" use="required"> |
---|
| 49 | <xs:annotation> |
---|
| 50 | <xs:documentation> |
---|
| 51 | <h:p> |
---|
| 52 | A local identifier for this segment. Is used in the <Span> element to refer to a segment. |
---|
| 53 | </h:p> |
---|
| 54 | </xs:documentation> |
---|
| 55 | </xs:annotation> |
---|
| 56 | </xs:attribute> |
---|
| 57 | <xs:attribute name="start" type="adv:offsetType" use="required"> |
---|
| 58 | <xs:annotation> |
---|
| 59 | <xs:documentation> |
---|
| 60 | <h:p> |
---|
| 61 | Start offset of the segment. |
---|
| 62 | </h:p> |
---|
| 63 | </xs:documentation> |
---|
| 64 | </xs:annotation> |
---|
| 65 | </xs:attribute> |
---|
| 66 | <xs:attribute name="end" type="adv:offsetType" use="required"> |
---|
| 67 | <xs:annotation> |
---|
| 68 | <xs:documentation> |
---|
| 69 | <h:p> |
---|
| 70 | End offset of the segment. The End offset MUST be larger or equal to the start offset. |
---|
| 71 | </h:p> |
---|
| 72 | </xs:documentation> |
---|
| 73 | </xs:annotation> |
---|
| 74 | </xs:attribute> |
---|
| 75 | <xs:attribute name="ref" type="xs:anyURI"> |
---|
| 76 | <xs:annotation> |
---|
| 77 | <xs:documentation> |
---|
| 78 | <h:p> |
---|
| 79 | An optional URI supplied by Endpoint which (may be) displayed by Tools like the Aggregator. The Endpoint |
---|
| 80 | needs to do something useful, if user follows this URI, i.e. display result in own viewer or |
---|
| 81 | invoke an audio-player, etc. |
---|
| 82 | </h:p> |
---|
| 83 | </xs:documentation> |
---|
| 84 | </xs:annotation> |
---|
| 85 | </xs:attribute> |
---|
| 86 | </xs:complexType> |
---|
| 87 | </xs:element> |
---|
| 88 | </xs:sequence> |
---|
| 89 | <xs:attribute name="unit" use="required"> |
---|
| 90 | <xs:annotation> |
---|
| 91 | <xs:documentation> |
---|
| 92 | <h:p> |
---|
| 93 | This attribute indicates how the start and end offsets are represented. |
---|
| 94 | They can be either enumerated items, like characters or tokens or timestamps. |
---|
| 95 | </h:p> |
---|
| 96 | </xs:documentation> |
---|
| 97 | </xs:annotation> |
---|
| 98 | <xs:simpleType> |
---|
| 99 | <xs:restriction base="xs:string"> |
---|
| 100 | <xs:enumeration value="item"> |
---|
| 101 | <xs:annotation> |
---|
| 102 | <xs:documentation> |
---|
| 103 | <h:p> |
---|
| 104 | The start and end offsets represent enumerated items, e.g. like characters or tokens. |
---|
| 105 | </h:p> |
---|
| 106 | </xs:documentation> |
---|
| 107 | </xs:annotation> |
---|
| 108 | </xs:enumeration> |
---|
| 109 | <xs:enumeration value="timestamp"> |
---|
| 110 | <xs:annotation> |
---|
| 111 | <xs:documentation> |
---|
| 112 | <h:p> |
---|
| 113 | The start and end offsets represent timestamps. |
---|
| 114 | </h:p> |
---|
| 115 | </xs:documentation> |
---|
| 116 | </xs:annotation> |
---|
| 117 | </xs:enumeration> |
---|
| 118 | </xs:restriction> |
---|
| 119 | </xs:simpleType> |
---|
| 120 | </xs:attribute> |
---|
| 121 | </xs:complexType> |
---|
| 122 | </xs:element> |
---|
| 123 | |
---|
| 124 | <!-- Layers--> |
---|
| 125 | <xs:element name="Layers"> |
---|
| 126 | <xs:complexType> |
---|
| 127 | <xs:sequence> |
---|
| 128 | <xs:element name="Layer" maxOccurs="unbounded"> |
---|
| 129 | <xs:complexType> |
---|
| 130 | <xs:sequence> |
---|
| 131 | <xs:element name="Span" maxOccurs="unbounded"> |
---|
| 132 | <xs:complexType> |
---|
| 133 | <xs:simpleContent> |
---|
| 134 | <xs:extension base="xs:string"> |
---|
| 135 | <xs:attribute name="ref" type="adv:referenceType" use="required"> |
---|
| 136 | </xs:attribute> |
---|
| 137 | <xs:attribute name="highlight" type="adv:highlightType"> |
---|
| 138 | |
---|
| 139 | </xs:attribute> |
---|
| 140 | <xs:attribute name="alt-value" type="xs:string"> |
---|
| 141 | |
---|
| 142 | </xs:attribute> |
---|
| 143 | </xs:extension> |
---|
| 144 | </xs:simpleContent> |
---|
| 145 | </xs:complexType> |
---|
| 146 | </xs:element> |
---|
| 147 | </xs:sequence> |
---|
| 148 | <xs:attribute name="id" type="xs:anyURI" use="required"> |
---|
| 149 | </xs:attribute> |
---|
| 150 | </xs:complexType> |
---|
| 151 | <xs:unique name="UniqueSegmentRefInSpan"> |
---|
| 152 | <xs:selector xpath="adv:Span"/> |
---|
| 153 | <xs:field xpath="@ref"/> |
---|
| 154 | </xs:unique> |
---|
| 155 | </xs:element> |
---|
| 156 | </xs:sequence> |
---|
| 157 | </xs:complexType> |
---|
| 158 | </xs:element> |
---|
| 159 | </xs:sequence> |
---|
| 160 | </xs:complexType> |
---|
| 161 | <xs:key name="SegmentId"> |
---|
| 162 | <xs:selector xpath="adv:Segments/adv:Segment"/> |
---|
| 163 | <xs:field xpath="@id"/> |
---|
| 164 | </xs:key> |
---|
| 165 | <xs:keyref refer="adv:SegmentId" name="SegmentRef"> |
---|
| 166 | <xs:selector xpath="adv:Layers/adv:Layer/adv:Span"/> |
---|
| 167 | <xs:field xpath="@ref"/> |
---|
| 168 | </xs:keyref> |
---|
| 169 | </xs:element> |
---|
| 170 | |
---|
| 171 | <xs:simpleType name="referenceType"> |
---|
| 172 | <xs:restriction base="xs:string"> |
---|
| 173 | <xs:pattern value="[a-zA-Z][a-zA-Z0-9]*" /> |
---|
| 174 | </xs:restriction> |
---|
| 175 | </xs:simpleType> |
---|
| 176 | |
---|
| 177 | <xs:simpleType name="offsetType"> |
---|
| 178 | <xs:restriction base="xs:string"> |
---|
| 179 | <xs:pattern value="\d+|\d+:([0-5][0-9]|60):([0-5][0-9]|60)\.\d\d\d" /> |
---|
| 180 | </xs:restriction> |
---|
| 181 | </xs:simpleType> |
---|
| 182 | |
---|
| 183 | <xs:simpleType name="highlightType"> |
---|
| 184 | <xs:restriction base="xs:string"> |
---|
| 185 | <xs:pattern value="[a-zA-Z][a-zA-Z0-9]*" /> |
---|
| 186 | </xs:restriction> |
---|
| 187 | </xs:simpleType> |
---|
| 188 | </xs:schema> |
---|