[1930] | 1 | <?xml version="1.0" encoding="UTF-8"?> |
---|
[2428] | 2 | <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" |
---|
[4486] | 3 | xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning" |
---|
| 4 | xmlns:fcs="http://clarin.eu/fcs/1.0" |
---|
| 5 | xmlns:h="http://www.w3.org/1999/xhtml" |
---|
[4503] | 6 | xml:lang="en" vc:minVersion="1.0" vc:maxVersion="1.1" |
---|
[4486] | 7 | targetNamespace="http://clarin.eu/fcs/1.0" elementFormDefault="qualified"> |
---|
[1930] | 8 | <xs:annotation> |
---|
[2428] | 9 | <xs:documentation> |
---|
[4486] | 10 | <h:p> |
---|
| 11 | This XML schema defines the inner structure of a hit within the |
---|
[2453] | 12 | search result in the CLARIN federated content search (CLARIN-FCS). |
---|
[4486] | 13 | </h:p> |
---|
| 14 | <h:p> |
---|
| 15 | Every hit in the result set must be represented as one |
---|
| 16 | <h:code><sru:record></h:code> element in the |
---|
| 17 | <h:code><sru:searchRetrieveResponse;gt;</h:code> response |
---|
| 18 | document. |
---|
| 19 | </h:p> |
---|
| 20 | <h:p> |
---|
| 21 | This schema allows Endpoint to return: |
---|
| 22 | </h:p> |
---|
| 23 | <h:ul> |
---|
| 24 | <h:li>metadata about the matched record, including |
---|
| 25 | reference to a CMDI record</h:li> |
---|
| 26 | <h:li>separate (metadata) description of full |
---|
[2428] | 27 | Resource and ResourceFragment (matching part of the |
---|
[4486] | 28 | resource, i.e. an addressable sentence)</h:li> |
---|
| 29 | <h:li>various views on the data delivered (HITS, text-snippet, |
---|
| 30 | image, individual annotation-layers, ...)</h:li> |
---|
| 31 | <h:li>providing links (either as PID or as |
---|
| 32 | simple URLs) to any of: Resource, ResourceFragment, |
---|
| 33 | Metadata (CMDI record), Data Views</h:li> |
---|
| 34 | <h:li>Endpoint specific extensions through an |
---|
| 35 | extension mechanism</h:li> |
---|
| 36 | </h:ul> |
---|
[1930] | 37 | </xs:documentation> |
---|
| 38 | </xs:annotation> |
---|
| 39 | |
---|
[2428] | 40 | <xs:element name="Resource" type="fcs:ResourceType"> |
---|
| 41 | <xs:annotation> |
---|
| 42 | <xs:documentation> |
---|
[4486] | 43 | <h:p> |
---|
| 44 | A one hit in a resource in one or more representations. |
---|
| 45 | </h:p> |
---|
[2428] | 46 | </xs:documentation> |
---|
| 47 | </xs:annotation> |
---|
| 48 | </xs:element> |
---|
[1930] | 49 | |
---|
| 50 | <xs:complexType name="ResourceType"> |
---|
| 51 | <xs:sequence> |
---|
[4486] | 52 | <!-- |
---|
| 53 | As long as there is no clear use-case, don't allow recursive Resources |
---|
| 54 | <xs:element name="Resource" minOccurs="0" maxOccurs="unbounded" type="fcs:ResourceType"/> |
---|
| 55 | --> |
---|
| 56 | <xs:element name="DataView" type="fcs:DataViewType" minOccurs="0" maxOccurs="unbounded" /> |
---|
[2428] | 57 | <xs:element name="ResourceFragment" minOccurs="0" maxOccurs="unbounded"> |
---|
| 58 | <xs:annotation> |
---|
| 59 | <xs:documentation> |
---|
[4486] | 60 | <h:p> |
---|
[2428] | 61 | A one hit in a resource in one or more representations. |
---|
[4486] | 62 | Use this instead of a plain <h:code><Resource></h:code>, if the |
---|
[2428] | 63 | fragment can be addresses directly, e.g. a sentence in |
---|
| 64 | a corpus that can be addressed via a PID (with fragment) |
---|
[4486] | 65 | or a regular URI. |
---|
| 66 | </h:p> |
---|
[2428] | 67 | </xs:documentation> |
---|
| 68 | </xs:annotation> |
---|
| 69 | <xs:complexType> |
---|
| 70 | <xs:sequence> |
---|
| 71 | <xs:element maxOccurs="unbounded" minOccurs="0" name="DataView" type="fcs:DataViewType"/> |
---|
| 72 | </xs:sequence> |
---|
| 73 | <xs:attribute name="pid" type="fcs:PidType"/> |
---|
| 74 | <xs:attribute name="ref" type="fcs:ReferenceType"/> |
---|
| 75 | </xs:complexType> |
---|
| 76 | </xs:element> |
---|
[4486] | 77 | <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"> |
---|
| 78 | <xs:annotation> |
---|
| 79 | <xs:documentation> |
---|
| 80 | <h:p> |
---|
| 81 | Extension point to allow Endpoints to add custom data to a resource. |
---|
| 82 | CLARIN-FCS clients SHOULD ignore any data they do not understand. |
---|
| 83 | </h:p> |
---|
| 84 | <h:p> |
---|
| 85 | This extension mechanism can for example be used to provide hints |
---|
| 86 | to an (XSLT/XQuery) application that works directly on CLARIN-FCS, |
---|
| 87 | e.g. to allow it to generate back and forward links to |
---|
| 88 | navigate in the result set. |
---|
| 89 | </h:p> |
---|
| 90 | </xs:documentation> |
---|
| 91 | </xs:annotation> |
---|
| 92 | </xs:any> |
---|
[1930] | 93 | </xs:sequence> |
---|
[2428] | 94 | <xs:attribute name="pid" type="fcs:PidType"/> |
---|
| 95 | <xs:attribute name="ref" type="fcs:ReferenceType"/> |
---|
[1930] | 96 | </xs:complexType> |
---|
| 97 | |
---|
| 98 | <xs:complexType name="DataViewType"> |
---|
| 99 | <xs:annotation> |
---|
| 100 | <xs:documentation> |
---|
[4486] | 101 | <h:p> |
---|
| 102 | A representation of a hit, e.g. a HITS, a Geolocation, |
---|
| 103 | an image, etc. |
---|
| 104 | </h:p> |
---|
| 105 | <h:p> |
---|
| 106 | A HITS Data View is mandatory for every hit in the result set. |
---|
| 107 | </h:p> |
---|
[1930] | 108 | </xs:documentation> |
---|
| 109 | </xs:annotation> |
---|
| 110 | <xs:sequence> |
---|
| 111 | <xs:any namespace="##other" processContents="strict"/> |
---|
| 112 | </xs:sequence> |
---|
[2428] | 113 | <xs:attribute name="type" use="required"> |
---|
| 114 | <xs:annotation> |
---|
| 115 | <xs:documentation> |
---|
[4486] | 116 | <h:p> |
---|
| 117 | The type of the content of the Data View as a MIME type. |
---|
| 118 | </h:p> |
---|
| 119 | <h:p> |
---|
| 120 | For the mandatory HITS Data View, use the MIME type |
---|
| 121 | <h:code>application/x-clarin-fcs-hits+xml</h:code>. |
---|
| 122 | </h:p> |
---|
[2428] | 123 | </xs:documentation> |
---|
| 124 | </xs:annotation> |
---|
| 125 | <xs:simpleType> |
---|
| 126 | <xs:restriction base="xs:string"> |
---|
| 127 | <xs:pattern value="\w+/\w([\.\-]{0,1}\w)*(\+\w+){0,1}"/> |
---|
| 128 | </xs:restriction> |
---|
| 129 | </xs:simpleType> |
---|
| 130 | </xs:attribute> |
---|
| 131 | <xs:attribute name="pid" type="fcs:PidType"/> |
---|
| 132 | <xs:attribute name="ref" type="fcs:ReferenceType"/> |
---|
[1930] | 133 | </xs:complexType> |
---|
| 134 | |
---|
[2428] | 135 | <xs:simpleType name="PidType"> |
---|
[1930] | 136 | <xs:annotation> |
---|
| 137 | <xs:documentation> |
---|
[4486] | 138 | <h:p> |
---|
[2428] | 139 | A persistent identifier of given entity. This attribute |
---|
| 140 | should be used, if a PID is available for the given entity. |
---|
[4486] | 141 | </h:p> |
---|
| 142 | <h:p> |
---|
| 143 | An Endpoint SHOULD also make the PID available tough the |
---|
| 144 | <h:code><sru:recordIdentifier></h:code> element of |
---|
| 145 | the <h:code><sru:record>/</h:code> element. |
---|
[2428] | 146 | If more PIDs are available for one record (i.e. Resource, |
---|
[4486] | 147 | Metadata, the individual Data View), the Endpoint is MUST |
---|
| 148 | to put the "most important" (e.g. the primary) PID into the |
---|
| 149 | <h:code><sru:recordIdentifier></h:code> element. |
---|
| 150 | </h:p> |
---|
[1930] | 151 | </xs:documentation> |
---|
| 152 | </xs:annotation> |
---|
| 153 | <xs:restriction base="xs:anyURI"/> |
---|
| 154 | </xs:simpleType> |
---|
| 155 | |
---|
[2428] | 156 | <xs:simpleType name="ReferenceType"> |
---|
[1930] | 157 | <xs:annotation> |
---|
[2428] | 158 | <xs:documentation> |
---|
[4486] | 159 | <h:p> |
---|
| 160 | A regular URI for the given entity, that can be retrieved |
---|
| 161 | directly (via HTTP or HTTPS). |
---|
| 162 | </h:p> |
---|
| 163 | <h:p> |
---|
| 164 | This URI may include custom Endpoint specific query strings |
---|
| 165 | to implement features like hit highlighting. |
---|
| 166 | </h:p> |
---|
[2428] | 167 | </xs:documentation> |
---|
[1930] | 168 | </xs:annotation> |
---|
| 169 | <xs:restriction base="xs:anyURI"/> |
---|
| 170 | </xs:simpleType> |
---|
| 171 | </xs:schema> |
---|