-
Notifications
You must be signed in to change notification settings - Fork 1
/
DataView-LexHits.xsd
85 lines (81 loc) · 3.54 KB
/
DataView-LexHits.xsd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:h="http://www.w3.org/1999/xhtml"
xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning"
xmlns:hits="http://textplus.org/fcs/dataview/hits"
xml:lang="en" vc:minVersion="1.0" vc:maxVersion="1.1"
targetNamespace="http://textplus.org/fcs/dataview/hits" elementFormDefault="qualified">
<xs:annotation>
<xs:documentation>
<h:p>
This schema defines the structure of a
<h:em>generic result</h:em> data view. All CLARIN-FCS endpoints
MUST support this data view.
</h:p>
<h:p>
The value <h:code>application/x-clarin-fcs-hits+xml</h:code>
MUST be used to indicate a <h:em>generic result</h:em> data view.
</h:p>
</xs:documentation>
</xs:annotation>
<xs:element name="Result">
<xs:annotation>
<xs:documentation>
<h:p>
A single result line with one or more marked hits.
White-space is considered <h:em>non-signification</h:em>,
except for delimiting tokens.
</h:p>
<h:p>
CLARIN-FCS client MAY
normalize white-space and strip leading and tailing
white-space and collapse all white-space between
tokens to a single #x20 character.
</h:p>
</xs:documentation>
</xs:annotation>
<xs:complexType mixed="true">
<xs:sequence>
<xs:element name="Hit" type="hits:hitType" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>
<h:p>
A hit highlight or a field type annotation. It SHALL not be empty.
</h:p>
<h:p>
One <h:code>Result</h:code> element MUST
one <h:code>Hit</h:code> element, but MAY
contain more than one.
</h:p>
</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:complexType name="hitType" mixed="true">
<!-- nested content (highlighting?)
<xs:sequence>
<xs:element name="Hit" type="xs:string" minOccurs="0" maxOccurs="unbounded"></xs:element>
</xs:sequence>
-->
<xs:attribute name="kind" type="hits:fieldType" use="optional">
<xs:annotation>
<xs:documentation>
<h:p>
Field type identifier for this annotation. Is used in the <Hit> element to determine which function the annotated text has.
</h:p>
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
<xs:simpleType name="fieldType">
<xs:restriction base="xs:string">
<!-- <xs:pattern value="[a-zA-Z][a-zA-Z0-9]*" /> -->
<xs:enumeration value="lex-lemma"/>
<xs:enumeration value="lex-pos"/>
<xs:enumeration value="lex-def"/>
<!-- <xs:enumeration value="query"/> -->
</xs:restriction>
</xs:simpleType>
</xs:schema>