source: FederatedSearch/Resource.xsd @ 2427

Last change on this file since 2427 was 1930, checked in by oschonef, 12 years ago
  • added proper "elementFormDefault" attribute
  • dropped "schema" attribute from ResourceType?
File size: 4.0 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fcs="http://clarin.eu/fcs/1.0"
3    targetNamespace="http://clarin.eu/fcs/1.0" elementFormDefault="qualified">
4    <xs:annotation>
5        <xs:documentation>This schema shall define the generic inner structure
6            of one record within the (federated) CLARIN content search.
7            This means it would validate the xml-fragment inside sru:record/sru:recordData
8            and would be referenced in sru:record/sru:recordSchema
9            of the sru:searchRetrieveResponse.
10           
11            It shall allow:
12            a) any metadata about the matched record, including reference to a CMD-record
13            b) separate (metadata) description of full Resource and ResourceFragment (matching part of the resource)
14            c) providing metadata AND content
15            d) various views on the data delivered (text-snippet, image, individual annotation-layers, ...)
16            e) providing links (either as PID or as simple URLs) to any of:
17               Resource, ResourceFragment, Metadata (CMD-record), DataViews           
18         </xs:documentation>
19    </xs:annotation>
20
21    <xs:element name="Resource" type="fcs:ResourceType"/>
22
23    <xs:complexType name="ResourceType">
24        <xs:sequence>
25            <xs:element maxOccurs="unbounded" minOccurs="0" name="Resource" type="fcs:ResourceType"/>
26            <xs:element maxOccurs="unbounded" minOccurs="0" name="DataView" type="fcs:DataViewType"/>
27            <xs:element maxOccurs="unbounded" minOccurs="0" name="ResourceFragment" type="fcs:ResourceFragmentType"/>
28        </xs:sequence>
29        <xs:attribute name="pid" type="fcs:pidType" use="optional"/>
30        <xs:attribute name="ref" type="fcs:refType" use="optional"/>
31    </xs:complexType>
32
33
34    <xs:complexType name="ResourceFragmentType">
35        <xs:sequence>
36            <xs:element maxOccurs="unbounded" minOccurs="0" name="DataView" type="fcs:DataViewType"/>
37        </xs:sequence>
38        <xs:attribute name="pid" type="fcs:pidType" use="optional"/>
39        <xs:attribute name="ref" type="fcs:refType" use="optional"/>
40    </xs:complexType>
41
42    <xs:complexType name="DataViewType">
43        <xs:annotation>
44            <xs:documentation>
45                The content expressed in XML that complies with another XML Schema (namespace=#other).
46            </xs:documentation>
47        </xs:annotation>
48        <xs:sequence>
49            <xs:any namespace="##other" processContents="strict"/>
50        </xs:sequence>
51        <xs:attribute name="type" type="fcs:DataViewTypeType"/>
52        <xs:attribute name="pid" type="fcs:pidType"/>
53        <xs:attribute name="ref" type="fcs:refType"/>
54    </xs:complexType>
55
56    <xs:simpleType name="DataViewTypeType">
57        <xs:annotation>
58            <xs:documentation>
59                This is obviously not exhaustive. Could this be a superset of of MIME-type?
60            </xs:documentation>
61        </xs:annotation>
62        <xs:restriction base="xs:string">
63            <xs:enumeration value="kwic"/>
64            <xs:enumeration value="fulltext"/>
65            <xs:enumeration value="image"/>
66        </xs:restriction>
67    </xs:simpleType>
68
69    <xs:simpleType name="pidType">
70        <xs:annotation>
71            <xs:documentation>a persistent! identifier of given entity. This should be really only used, when a PID is available. Provider should also fill the sru:record/sru:recordIdentifier-element. If there are more PIDs in one record (for Resource, Metadata, DataView), provider selects the "most important"/primary PID to put into sru:recordIdentifier</xs:documentation>
72        </xs:annotation>
73        <xs:restriction base="xs:anyURI"/>
74    </xs:simpleType>
75
76    <xs:simpleType name="refType">
77        <xs:annotation>
78            <xs:documentation>a URL to given entity, that can be invoked directly (via HTTP)</xs:documentation>
79        </xs:annotation>
80        <xs:restriction base="xs:anyURI"/>
81    </xs:simpleType>
82
83</xs:schema>
Note: See TracBrowser for help on using the repository browser.