Ignore:
Timestamp:
02/10/14 13:39:00 (10 years ago)
Author:
oschonef
Message:
  • some schema tweaks
  • revamped Resource.xsd
  • adjust example
File:
1 edited

Legend:

Unmodified
Added
Removed
  • FederatedSearch/schema/Resource.xsd

    r4485 r4486  
    11<?xml version="1.0" encoding="UTF-8"?>
    22<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
    3     xmlns:fcs="http://clarin.eu/fcs/1.0" xmlns="http://www.w3.org/1999/xhtml"
    4     targetNamespace="http://clarin.eu/fcs/1.0" elementFormDefault="qualified" xml:lang="en">
     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"
     6    xml:lang="en" vc:minVersion="1.0"
     7    targetNamespace="http://clarin.eu/fcs/1.0" elementFormDefault="qualified">
    58    <xs:annotation>
    69        <xs:documentation>
    7             <p>
    8                 This XML schema defined the inner structure of a hit within the
     10            <h:p>
     11                This XML schema defines the inner structure of a hit within the
    912                search result in the CLARIN federated content search (CLARIN-FCS).
    10             </p>
    11             <p>
    12                 Every hit in the result set must be represented at one
    13                 &lt;sru:record&gt; in the &lt;sru:searchRetrieveResponse;gt;.
    14             </p>
    15             <p>
    16                 It allows endpoint to return:
    17             </p>
    18             <ul>
    19                 <li>metadata about the matched record, including
    20                     reference to a CMDI record</li>
    21                 <li>separate (metadata) description of full
     13            </h:p>
     14            <h:p>
     15                Every hit in the result set must be represented as one
     16                <h:code>&lt;sru:record&gt;</h:code> element in the
     17                <h:code>&lt;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
    2227                    Resource and ResourceFragment (matching part of the
    23                     resource, i.e. an addressable sentence)</li>
    24                 <li>providing metadata and content</li>
    25                 <li>various views on the data delivered (KWIC, text-snippet,
    26                     image, individual annotation-layers, ...)</li>
    27                 <li>providing links (either as PID or as simple URLs) to any of:
    28                     Resource, ResourceFragment, Metadata (CMDI record), DataViews</li>
    29             </ul>
     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>
    3037         </xs:documentation>
    3138    </xs:annotation>
     
    3441        <xs:annotation>
    3542            <xs:documentation>
    36                 A one hit in a resource in one or more representations.
     43                <h:p>
     44                    A one hit in a resource in one or more representations.
     45                </h:p>
    3746            </xs:documentation>
    3847        </xs:annotation>
     
    4150    <xs:complexType name="ResourceType">
    4251        <xs:sequence>
    43             <xs:element name="Resource" minOccurs="0" maxOccurs="unbounded" type="fcs:ResourceType"/>
    44             <xs:element name="DataView" minOccurs="0" maxOccurs="unbounded" type="fcs:DataViewType"/>
     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" />
    4557            <xs:element name="ResourceFragment" minOccurs="0" maxOccurs="unbounded">
    4658                <xs:annotation>
    4759                    <xs:documentation>
    48                         <p>
     60                        <h:p>
    4961                            A one hit in a resource in one or more representations.
    50                             Use this instead of a plain &lt;Resource&gt;, if the
     62                            Use this instead of a plain <h:code>&lt;Resource&gt;</h:code>, if the
    5163                            fragment can be addresses directly, e.g. a sentence in
    5264                            a corpus that can be addressed via a PID (with fragment)
    53                             and/or a unique URI.
    54                         </p>
     65                            or a regular URI.
     66                        </h:p>
    5567                    </xs:documentation>
    5668                </xs:annotation>
     
    6375                </xs:complexType>
    6476            </xs:element>
     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>
    6593        </xs:sequence>
    6694        <xs:attribute name="pid" type="fcs:PidType"/>
     
    7199        <xs:annotation>
    72100            <xs:documentation>
    73                 <p>
    74                     A representation of a hit, e.g. a KWIC, a geo location, an image, etc.
    75                 </p>
    76                 <p>
    77                     A KWIC DataView is mandatory.
    78                 </p>
     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>
    79108            </xs:documentation>
    80109        </xs:annotation>
     
    85114            <xs:annotation>
    86115                <xs:documentation>
    87                     <p>
    88                         The type of the content of the DataView as a MIME type.
    89                         For the mandatory KWIC view, use "application/x-clarin-fcs-kwic+xml".
    90                     </p>
     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>
    91123                </xs:documentation>
    92124            </xs:annotation>
     
    104136        <xs:annotation>
    105137            <xs:documentation>
    106                 <p>
     138                <h:p>
    107139                    A persistent identifier of given entity. This attribute
    108140                    should be used, if a PID is available for the given entity.
    109                 </p>
    110                 <p>
    111                     An FCS endpoint should also &lt;sru:record&gt;/&lt;sru:recordIdentifier&gt; element.
     141                </h:p>
     142                <h:p>
     143                    An Endpoint SHOULD also make the PID available tough the
     144                    <h:code>&lt;sru:recordIdentifier&gt;</h:code> element of
     145                    the <h:code>&lt;sru:record&gt;/</h:code> element.
    112146                    If more PIDs are available for one record (i.e. Resource,
    113                     Metadata, DataView), the endpoint is supposed to put the
    114                     "most important" (e.g. the primary) PID into &lt;sru:recordIdentifier&gt;
    115                 </p>
     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>&lt;sru:recordIdentifier&gt;</h:code> element.
     150                </h:p>
    116151            </xs:documentation>
    117152        </xs:annotation>
     
    122157        <xs:annotation>
    123158            <xs:documentation>
    124                 <p>
    125                     A URI for the given entity, that can be retrieved directly
    126                     (via HTTP or HTTPS).
    127                 </p>
     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>
    128167            </xs:documentation>
    129168        </xs:annotation>
Note: See TracChangeset for help on using the changeset viewer.