Index: FederatedSearch/schema/Core_2/DataView-Advanced.xsd
===================================================================
--- FederatedSearch/schema/Core_2/DataView-Advanced.xsd	(revision 6704)
+++ FederatedSearch/schema/Core_2/DataView-Advanced.xsd	(revision 6704)
@@ -0,0 +1,188 @@
+<?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"
+    xml:lang="en" vc:minVersion="1.0" vc:maxVersion="1.1"
+    xmlns:adv="http://clarin.eu/fcs/dataview/advanced"
+    targetNamespace="http://clarin.eu/fcs/dataview/advanced" elementFormDefault="qualified">
+
+    <xs:annotation>
+        <xs:documentation>
+            <h:p>
+                This schema defines the structure of a
+                <h:em>advanced result</h:em> data view.
+            </h:p>
+            <h:p>
+                The value <h:code>application/x-clarin-fcs-adv+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="Advanced">
+        <xs:annotation>
+            <xs:documentation>
+                <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>
+            <xs:sequence>
+                <!-- Segements -->
+                <xs:element name="Segments">
+                    <xs:complexType>
+                        <xs:sequence>
+                            <xs:element name="Segment" maxOccurs="unbounded">
+                                <xs:annotation>
+                                    <xs:documentation>
+                                        <h:p>
+                                            A segment is ...
+                                        </h:p>
+                                    </xs:documentation>
+                                </xs:annotation>
+                                <xs:complexType>
+                                    <xs:attribute name="id" type="adv:referenceType" use="required">
+                                        <xs:annotation>
+                                            <xs:documentation>
+                                                <h:p>
+                                                    A local identifier for this segment. Is used in the &lt;Span&gt; element to refer to a segment.
+                                                </h:p>
+                                            </xs:documentation>
+                                        </xs:annotation>
+                                    </xs:attribute>
+                                    <xs:attribute name="start" type="adv:offsetType" use="required">
+                                        <xs:annotation>
+                                            <xs:documentation>
+                                                <h:p>
+                                                    Start offset of the segment.
+                                                </h:p>
+                                            </xs:documentation>
+                                        </xs:annotation>
+                                    </xs:attribute>
+                                    <xs:attribute name="end" type="adv:offsetType" use="required">
+                                        <xs:annotation>
+                                            <xs:documentation>
+                                                <h:p>
+                                                    End offset of the segment. The End offset MUST be larger or equal to the start offset.
+                                                </h:p>
+                                            </xs:documentation>
+                                        </xs:annotation>
+                                    </xs:attribute>
+                                    <xs:attribute name="ref" type="xs:anyURI">
+                                        <xs:annotation>
+                                            <xs:documentation>
+                                                <h:p>
+                                                    An optional URI supplied by Endpoint which (may be) displayed by Tools like the Aggregator. The Endpoint
+                                                    needs to do something useful, if user follows this URI, i.e. display result in own viewer or
+                                                    invoke an audio-player, etc.
+                                                </h:p>
+                                            </xs:documentation>
+                                        </xs:annotation>
+                                    </xs:attribute>
+                                </xs:complexType>
+                            </xs:element>
+                        </xs:sequence>
+                        <xs:attribute name="unit" use="required">
+                            <xs:annotation>
+                                <xs:documentation>
+                                    <h:p>
+                                        This attribute indicates how the start and end offsets are represented.
+                                        They can be either enumerated items, like characters or tokens or timestamps.
+                                    </h:p> 
+                                </xs:documentation>
+                            </xs:annotation>
+                            <xs:simpleType>
+                                <xs:restriction base="xs:string">
+                                    <xs:enumeration value="item">
+                                        <xs:annotation>
+                                            <xs:documentation>
+                                                <h:p>
+                                                    The start and end offsets represent enumerated items, e.g. like characters or tokens.
+                                                </h:p>
+                                            </xs:documentation>
+                                        </xs:annotation>
+                                    </xs:enumeration>
+                                    <xs:enumeration value="timestamp">
+                                        <xs:annotation>
+                                            <xs:documentation>
+                                                <h:p>
+                                                    The start and end offsets represent timestamps.
+                                                </h:p>
+                                            </xs:documentation>
+                                        </xs:annotation>
+                                    </xs:enumeration>
+                                </xs:restriction>
+                            </xs:simpleType>
+                        </xs:attribute>
+                    </xs:complexType>
+                </xs:element>
+
+                <!-- Layers-->
+                <xs:element name="Layers">
+                    <xs:complexType>
+                        <xs:sequence>
+                            <xs:element name="Layer" maxOccurs="unbounded">
+                                <xs:complexType>
+                                    <xs:sequence>
+                                        <xs:element name="Span" maxOccurs="unbounded">
+                                            <xs:complexType>
+                                                <xs:simpleContent>
+                                                    <xs:extension base="xs:string">
+                                                        <xs:attribute name="ref" type="adv:referenceType" use="required">
+                                                        </xs:attribute>
+                                                        <xs:attribute name="highlight" type="adv:highlightType">
+                                                            
+                                                        </xs:attribute>
+                                                        <xs:attribute name="alt-value" type="xs:string">
+                                                            
+                                                        </xs:attribute>
+                                                    </xs:extension>
+                                                </xs:simpleContent>                                                
+                                            </xs:complexType>
+                                        </xs:element>
+                                    </xs:sequence>
+                                    <xs:attribute name="id" type="xs:anyURI" use="required">
+                                    </xs:attribute>
+                                </xs:complexType>
+                                <xs:unique name="UniqueSegmentRefInSpan">
+                                    <xs:selector xpath="adv:Span"/>
+                                    <xs:field xpath="@ref"/>
+                                </xs:unique>
+                            </xs:element>
+                        </xs:sequence>
+                    </xs:complexType>                    
+                </xs:element>
+            </xs:sequence>
+        </xs:complexType>
+        <xs:key name="SegmentId">
+            <xs:selector xpath="adv:Segments/adv:Segment"/>
+            <xs:field xpath="@id"/>
+        </xs:key>
+        <xs:keyref refer="adv:SegmentId" name="SegmentRef">
+            <xs:selector xpath="adv:Layers/adv:Layer/adv:Span"/>
+            <xs:field xpath="@ref"/>
+        </xs:keyref>
+    </xs:element>
+    
+    <xs:simpleType name="referenceType">
+        <xs:restriction base="xs:string">
+            <xs:pattern value="[a-zA-Z][a-zA-Z0-9]*" />
+        </xs:restriction>
+    </xs:simpleType>
+
+    <xs:simpleType name="offsetType">
+        <xs:restriction base="xs:string">
+            <xs:pattern value="\d+|\d+:([0-5][0-9]|60):([0-5][0-9]|60)\.\d\d\d" />
+        </xs:restriction>
+    </xs:simpleType>
+
+    <xs:simpleType name="highlightType">
+        <xs:restriction base="xs:string">
+            <xs:pattern value="[a-zA-Z][a-zA-Z0-9]*" />
+        </xs:restriction>
+    </xs:simpleType>
+</xs:schema>
Index: FederatedSearch/schema/Core_2/DataView-Hits.xsd
===================================================================
--- FederatedSearch/schema/Core_2/DataView-Hits.xsd	(revision 6704)
+++ FederatedSearch/schema/Core_2/DataView-Hits.xsd	(revision 6704)
@@ -0,0 +1,57 @@
+<?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"
+    xml:lang="en" vc:minVersion="1.0" vc:maxVersion="1.1"
+    targetNamespace="http://clarin.eu/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="xs:string" maxOccurs="unbounded">
+                    <xs:annotation>
+                        <xs:documentation>
+                            <h:p>
+                                A hit highlight. 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:schema>
Index: FederatedSearch/schema/Core_2/Endpoint-Description.xsd
===================================================================
--- FederatedSearch/schema/Core_2/Endpoint-Description.xsd	(revision 6704)
+++ FederatedSearch/schema/Core_2/Endpoint-Description.xsd	(revision 6704)
@@ -0,0 +1,433 @@
+<?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:ed="http://clarin.eu/fcs/endpoint-description" 
+    xml:lang="en"
+    vc:minVersion="1.0" vc:maxVersion="1.1"
+    elementFormDefault="qualified"
+    targetNamespace="http://clarin.eu/fcs/endpoint-description">
+    <xs:import namespace="http://www.w3.org/XML/1998/namespace"
+               schemaLocation="http://www.w3.org/2001/xml.xsd" />
+
+    <xs:annotation>
+        <xs:documentation>
+            <h:p>
+                This schema defines the structure of an extension to SRU/CQL
+                used by CLARIN-FCS.
+                </h:p>
+            <h:p>
+                An Endpoint MUST provide this information in the
+                <h:code>&lt;extraResponseData&gt;</h:code> element of the result
+                to an <h:em>explain</h:em> operation, if (and only if) a
+                CLARIN-FCS client performed the request with the
+                <h:code>x-clarin-fcs-endpoint-description</h:code> extra
+                request parameter with a value of <h:code>true</h:code>.  
+            </h:p>
+        </xs:documentation>    
+    </xs:annotation>
+    
+    <xs:element name="EndpointDescription">
+        <xs:annotation>
+            <xs:documentation>
+                <h:p>
+                    The root element of the Endpoint description extension for
+                    CLARIN-FCS extension.
+                </h:p>
+                <h:p>
+                    An Endpoint MUST provide this information in the
+                    <h:code>&lt;extraResponseData&gt;</h:code>
+                    element of the result to an <h:em>explain</h:em> operation,
+                    if (and only if) a CLARIN-FCS client performed the request
+                    with the <h:code>x-clarin-fcs-endpoint-description</h:code>
+                    extra request parameter with a value of <h:code>true</h:code>.
+                </h:p>
+            </xs:documentation>
+        </xs:annotation>
+        <xs:complexType>
+            <xs:sequence>
+                <!-- Capabilities -->
+                <xs:element name="Capabilities">
+                    <xs:annotation>
+                        <xs:documentation>
+                            <h:p>A list of Capabilities, that are supported by this Endpoint.</h:p>
+                        </xs:documentation>
+                    </xs:annotation>
+                    <xs:complexType>
+                        <xs:sequence>
+                            <xs:element name="Capability" maxOccurs="unbounded">
+                                <xs:annotation>
+                                    <xs:documentation>
+                                        A Capability, encoded by an URI, that is supported by this Endpoint.
+                                        For valid URIs, consult the CLARIN-FCS specification.
+                                    </xs:documentation>
+                                </xs:annotation>
+                                <xs:simpleType>
+                                    <xs:restriction base="xs:anyURI">
+                                        <xs:pattern value="http://clarin.eu/fcs/capability/\w([\.\-]{0,1}\w)*" />
+                                    </xs:restriction>
+                                </xs:simpleType>
+                            </xs:element>
+                        </xs:sequence>
+                    </xs:complexType>
+                </xs:element>
+
+                <!-- SupportedDataViews -->
+                <xs:element name="SupportedDataViews">
+                    <xs:annotation>
+                        <xs:documentation>
+                            <h:p>
+                                A list of Data Views, that are supported by this Endpoint.
+                            </h:p>
+                        </xs:documentation>
+                    </xs:annotation>
+                    <xs:complexType>
+                        <xs:sequence>
+                            <xs:element name="SupportedDataView" maxOccurs="unbounded">
+                                <xs:annotation>
+                                    <xs:documentation>
+                                        The MIME type of a supported Data View.
+                                    </xs:documentation>
+                                </xs:annotation>
+                                <xs:complexType>
+                                    <xs:simpleContent>
+                                        <xs:extension base="ed:mimetypeString">
+                                            <xs:attribute name="id" type="xs:ID" use="required">
+                                                <xs:annotation>
+                                                    <xs:documentation>
+                                                        <h:p>
+                                                            An unique ID for this support Data View. This value will be used,
+                                                            when referencing it in the &lt;AvailableDataViews&gt; element in
+                                                            the &lt;Resource&gt; description. 
+                                                        </h:p>
+                                                    </xs:documentation>
+                                                </xs:annotation>
+                                            </xs:attribute>
+                                            <xs:attribute name="delivery-policy" use="required">
+                                                <xs:annotation>
+                                                    <xs:documentation>
+                                                        <h:p>
+                                                            This attribute indicates the <h:em>delivery policy</h:em> of this supported Data View.
+                                                        </h:p> 
+                                                    </xs:documentation>
+                                                </xs:annotation>
+                                                <xs:simpleType>
+                                                    <xs:restriction base="xs:string">
+                                                        <xs:enumeration value="send-by-default">
+                                                            <xs:annotation>
+                                                                <xs:documentation>
+                                                                    <h:p>
+                                                                        This Data View is automatically sent by the Endpoint for supported Resources.
+                                                                    </h:p>
+                                                                </xs:documentation>
+                                                            </xs:annotation>
+                                                        </xs:enumeration>
+                                                        <xs:enumeration value="need-to-request">
+                                                            <xs:annotation>
+                                                                <xs:documentation>
+                                                                    <h:p>
+                                                                        This Data View needs to be explicatively requested by the Client.
+                                                                    </h:p>
+                                                                </xs:documentation>
+                                                            </xs:annotation>
+                                                        </xs:enumeration>
+                                                    </xs:restriction>
+                                                </xs:simpleType>
+                                            </xs:attribute>
+                                        </xs:extension>
+                                    </xs:simpleContent>
+                                </xs:complexType>
+                            </xs:element>
+                        </xs:sequence>
+                    </xs:complexType>
+                </xs:element>
+                
+                <!-- SupportedLayers -->
+                <xs:element name="SupportedLayers" minOccurs="0">
+                    <xs:annotation>
+                        <xs:documentation>
+                            <h:p>
+                                A list of Layers, that are supported by this Endpoint.
+                            </h:p>
+                        </xs:documentation>
+                    </xs:annotation>
+                    <xs:complexType>
+                        <xs:sequence>
+                            <xs:element name="SupportedLayer" maxOccurs="unbounded">
+                                <xs:annotation>
+                                    <xs:documentation>
+                                        The Layer identifier of a supported layer.
+                                    </xs:documentation>
+                                </xs:annotation>
+                                <xs:complexType>
+                                    <xs:simpleContent>
+                                        <xs:extension base="xs:string">
+                                            <xs:attribute name="id" type="xs:ID" use="required">
+                                                <xs:annotation>
+                                                    <xs:documentation>
+                                                        <h:p>
+                                                            An unique ID for this support Layer. This value will be used,
+                                                            when referencing it in the &lt;AvailableLayers&gt; element in
+                                                            the &lt;Resource&gt; description. 
+                                                        </h:p>
+                                                    </xs:documentation>
+                                                </xs:annotation>
+                                            </xs:attribute>
+                                            <xs:attribute name="result-id" type="xs:anyURI" use="required">
+                                                <xs:annotation>
+                                                    <xs:documentation>
+                                                        <h:p>
+                                                            Endpoint specific URI that will be used in Advanced Data View results to identify this layer.
+                                                        </h:p> 
+                                                    </xs:documentation>
+                                                </xs:annotation>
+                                            </xs:attribute>
+                                            <xs:attribute name="type" use="optional" default="value">
+                                                <xs:annotation>
+                                                    <xs:documentation>
+                                                        <h:p>
+                                                            This attribute indicates the <h:em>content type</h:em> for Advanced Data View results.
+                                                        </h:p>
+                                                    </xs:documentation>
+                                                </xs:annotation>
+                                                <xs:simpleType>
+                                                    <xs:restriction base="xs:string">
+                                                        <xs:enumeration value="value">
+                                                            <xs:annotation>
+                                                                <xs:documentation>
+                                                                    <h:p>
+                                                                        Value information is encoded as element content in this Layer.
+                                                                    </h:p>
+                                                                </xs:documentation>
+                                                            </xs:annotation>
+                                                        </xs:enumeration>
+                                                        <xs:enumeration value="empty">
+                                                            <xs:annotation>
+                                                                <xs:documentation>
+                                                                    <h:p>
+                                                                        No additional value information is encoded for this Layer.
+                                                                    </h:p>
+                                                                </xs:documentation>
+                                                            </xs:annotation>
+                                                        </xs:enumeration>
+                                                  </xs:restriction>
+                                                </xs:simpleType>
+                                            </xs:attribute>
+                                        </xs:extension>
+                                    </xs:simpleContent>
+                                </xs:complexType>
+                            </xs:element>
+                        </xs:sequence>
+                    </xs:complexType>
+                </xs:element>
+
+                <!-- Resources -->
+                <xs:element ref="ed:Resources">
+                    <xs:annotation>
+                        <xs:documentation>
+                            <h:p>
+                                A list of top-level resources, that are available
+                                at an Endpoint. An Endpoint MUST
+                                declare at least one top-level resource.
+                            </h:p>
+                        </xs:documentation>
+                    </xs:annotation>
+                </xs:element>
+
+                <!-- extension point -->
+                <xs:any namespace="##other" processContents="skip" minOccurs="0" maxOccurs="unbounded">
+                    <xs:annotation>
+                        <xs:documentation>
+                            <h:p>
+                                Extension point to allow Endpoints to embed custom data in the Endpoint Description.
+                                CLARIN-FCS clients SHOULD ignore any data they do not understand.  
+                            </h:p>
+                        </xs:documentation>
+                    </xs:annotation>
+                </xs:any>
+            </xs:sequence>
+            <xs:attribute name="version" type="xs:nonNegativeInteger" use="required">
+                <xs:annotation>
+                    <xs:documentation>
+                        <h:p>
+                            Version used for Endpoint Description. Endpoints MUST use the value "2".
+                        </h:p>
+                    </xs:documentation>
+                </xs:annotation>
+            </xs:attribute>
+        </xs:complexType>
+    </xs:element>
+
+    <xs:element name="Resources">
+        <xs:annotation>
+            <xs:documentation>
+                <h:p>
+                    A list of resources, that are available
+                    at an Endpoint. An Endpoint MUST
+                    declare at least one resource.
+                </h:p>
+            </xs:documentation>
+        </xs:annotation>
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element ref="ed:Resource" maxOccurs="unbounded"/>
+            </xs:sequence>                            
+        </xs:complexType>
+    </xs:element>
+
+    <xs:element name="Resource">
+        <xs:annotation>
+            <xs:documentation>
+                <h:p>
+                    Detailed description of a resource that is available at an
+                    Endpoint. A resource is a searchable
+                    entity at an Endpoint, e.g. a single corpus.
+                </h:p>
+            </xs:documentation>
+        </xs:annotation>
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element name="Title" type="ed:i18nString" maxOccurs="unbounded">
+                    <xs:annotation>
+                        <xs:documentation>
+                            <h:p>
+                                A human readable title for the resource. An English version is
+                                mandatory.
+                            </h:p>
+                        </xs:documentation>
+                    </xs:annotation>
+                </xs:element>
+                
+                <xs:element name="Description" type="ed:i18nString" minOccurs="0" maxOccurs="unbounded">
+                    <xs:annotation>
+                        <xs:documentation>
+                            <h:p>
+                                An optional human-readable description of the resource. Is should
+                                be at most one sentence. If supplied, an English version is
+                                mandatory.
+                            </h:p>
+                        </xs:documentation>
+                    </xs:annotation>
+                </xs:element>
+                
+                <xs:element name="LandingPageURI" type="xs:anyURI" minOccurs="0">
+                    <xs:annotation>
+                        <xs:documentation>
+                            <h:p>
+                                A link to a website for the resource, e.g. a landing page for a corpus. 
+                            </h:p>
+                        </xs:documentation>
+                    </xs:annotation>
+                </xs:element>
+                
+                <xs:element name="Languages">
+                    <xs:annotation>
+                        <xs:documentation>
+                            <h:p>
+                                The (relevant) languages available <h:em>within</h:em> the resource.
+                            </h:p>
+                        </xs:documentation>
+                    </xs:annotation>
+                    <xs:complexType>
+                        <xs:sequence>
+                            <xs:element name="Language" maxOccurs="unbounded">
+                                <xs:annotation>
+                                    <xs:documentation>
+                                        <p>
+                                            A ISO 639-3 three letter language code. This
+                                            element should be repeated for all languages
+                                            (relevant) available <h:em>within</h:em> the resource.
+                                        </p>
+                                    </xs:documentation>
+                                </xs:annotation>
+                                <xs:simpleType>
+                                    <xs:restriction base="xs:string">
+                                        <xs:pattern value="[a-zA-Z]{3}"/>
+                                    </xs:restriction>
+                                </xs:simpleType>
+                            </xs:element>
+                        </xs:sequence>
+                    </xs:complexType>
+                </xs:element>
+                
+                <xs:element name="AvailableDataViews">
+                    <xs:annotation>
+                        <xs:documentation>
+                            <h:p>
+                                This element contains a reference to all Data Views that are
+                                supported by this resource in the <h:code>@ref</h:code> attribute.
+                            </h:p>
+                        </xs:documentation>
+                    </xs:annotation>
+                    <xs:complexType>
+                        <xs:attribute name="ref" type="xs:IDREFS" use="required"/>
+                    </xs:complexType>
+                </xs:element>
+
+                <xs:element name="AvailableLayers" minOccurs="0">
+                    <xs:annotation>
+                        <xs:documentation>
+                            <h:p>
+                                This element contains a reference to all Layers that are
+                                supported by this resource in the <h:code>@ref</h:code> attribute.
+                            </h:p>
+                        </xs:documentation>
+                    </xs:annotation>
+                    <xs:complexType>
+                        <xs:attribute name="ref" type="xs:IDREFS" use="required" />
+                    </xs:complexType>
+                </xs:element>
+
+                <xs:element ref="ed:Resources" minOccurs="0">
+                    <xs:annotation>
+                        <xs:documentation>
+                            <h:p>
+                                If a resource has searchable sub-resources
+                                the Endpoint MUST supply additional finer grained
+                                &lt;Resource&gt; elements. A sub-resource is a
+                                searchable entity within a resource, e.g. a sub-corpus.
+                            </h:p>
+                        </xs:documentation>
+                    </xs:annotation>
+                </xs:element>
+
+                <!-- extension point -->
+                <xs:any namespace="##other" processContents="skip" minOccurs="0" maxOccurs="unbounded">
+                    <xs:annotation>
+                        <xs:documentation>
+                            <h:p>
+                                Extension point to allow Endpoints to embed custom data in the Endpoint Description
+                                for a specific resource. CLARIN-FCS clients SHOULD ignore any data they do not understand.  
+                            </h:p>
+                        </xs:documentation>
+                    </xs:annotation>
+                </xs:any>
+            </xs:sequence>
+            <xs:attribute name="pid" type="xs:anyURI" use="required">
+                <xs:annotation>
+                    <xs:documentation>
+                        <h:p>
+                            The persistent identifier of this resource. This
+                            value MUST be the same as the <h:code>MdSelfLink</h:code>
+                            of the CMDI record describing the collection.
+                        </h:p>
+                    </xs:documentation>
+                </xs:annotation>
+            </xs:attribute>
+        </xs:complexType>
+    </xs:element>
+
+    <xs:simpleType name="mimetypeString">
+        <xs:restriction base="xs:string">
+            <xs:pattern value="\w+/\w([\.\-]{0,1}\w)*(\+\w+){0,1}" />
+        </xs:restriction>
+    </xs:simpleType>
+
+    <xs:complexType name="i18nString">
+        <xs:simpleContent>
+            <xs:extension base="xs:string">
+                <xs:attribute ref="xml:lang" use="required" />
+            </xs:extension>
+        </xs:simpleContent>
+    </xs:complexType>
+</xs:schema>
Index: FederatedSearch/schema/Core_2/Resource.xsd
===================================================================
--- FederatedSearch/schema/Core_2/Resource.xsd	(revision 6704)
+++ FederatedSearch/schema/Core_2/Resource.xsd	(revision 6704)
@@ -0,0 +1,168 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+    xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning"
+    xmlns:h="http://www.w3.org/1999/xhtml"
+    xmlns:fcs="http://clarin.eu/fcs/resource"
+    xml:lang="en" vc:minVersion="1.0" vc:maxVersion="1.1"
+    targetNamespace="http://clarin.eu/fcs/resource" elementFormDefault="qualified">
+
+    <xs:annotation>
+        <xs:documentation>
+            <h:p>
+                This XML schema defines the inner structure of a hit within the
+                search result in the CLARIN federated content search (CLARIN-FCS).
+            </h:p>
+            <h:p>
+                Every hit in the result set must be represented as one
+                <h:code>&lt;sru:record&gt;</h:code> element in the
+                <h:code>&lt;sru:searchRetrieveResponse;gt;</h:code> response
+                document.
+            </h:p>
+            <h:p>
+                This schema allows Endpoint to return:
+            </h:p>
+            <h:ul>
+                <h:li>metadata about the matched record, including
+                    reference to a CMDI record</h:li>
+                <h:li>separate (metadata) description of full
+                    Resource and ResourceFragment (matching part of the
+                    resource, i.e. an addressable sentence)</h:li>
+                <h:li>various views on the data delivered (HITS, text-snippet,
+                    image, individual annotation-layers, ...)</h:li>
+                <h:li>providing links (either as PID or as
+                    simple URLs) to any of: Resource, ResourceFragment,
+                    Metadata (CMDI record), Data Views</h:li>
+                <h:li>Endpoint specific extensions through an
+                    extension mechanism</h:li>
+            </h:ul>
+         </xs:documentation>
+    </xs:annotation>
+
+    <xs:element name="Resource" type="fcs:ResourceType">
+        <xs:annotation>
+            <xs:documentation>
+                <h:p>
+                    A one hit in a resource in one or more representations.
+                </h:p> 
+            </xs:documentation>
+        </xs:annotation>
+    </xs:element>
+
+    <xs:complexType name="ResourceType">
+        <xs:sequence>
+            <xs:element name="DataView" type="fcs:DataViewType" minOccurs="0" maxOccurs="unbounded" />
+            <xs:element name="ResourceFragment" minOccurs="0" maxOccurs="unbounded">
+                <xs:annotation>
+                    <xs:documentation>
+                        <h:p>
+                            A one hit in a resource in one or more representations.
+                            Use this instead of a plain <h:code>&lt;Resource&gt;</h:code>, if the
+                            fragment can be addresses directly, e.g. a sentence in
+                            a corpus that can be addressed via a PID (with fragment)
+                            or a regular URI.
+                        </h:p>
+                    </xs:documentation>
+                </xs:annotation>
+                <xs:complexType>
+                    <xs:sequence>
+                        <xs:element maxOccurs="unbounded" minOccurs="0" name="DataView" type="fcs:DataViewType"/>
+                    </xs:sequence>
+                    <xs:attribute name="pid" type="fcs:PidType"/>
+                    <xs:attribute name="ref" type="fcs:ReferenceType"/>
+                </xs:complexType>
+            </xs:element>
+            <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded">
+                <xs:annotation>
+                    <xs:documentation>
+                        <h:p>
+                            Extension point to allow Endpoints to add custom data to a resource.
+                            CLARIN-FCS clients SHOULD ignore any data they do not understand.  
+                        </h:p>
+                        <h:p>
+                            This extension mechanism can for example be used to provide hints
+                            to an (XSLT/XQuery) application that works directly on CLARIN-FCS,
+                            e.g. to allow it to generate back and forward links to
+                            navigate in the result set. 
+                        </h:p>
+                    </xs:documentation>
+                </xs:annotation>
+            </xs:any>
+        </xs:sequence>
+        <xs:attribute name="pid" type="fcs:PidType"/>
+        <xs:attribute name="ref" type="fcs:ReferenceType"/>
+    </xs:complexType>
+
+    <xs:complexType name="DataViewType">
+        <xs:annotation>
+            <xs:documentation>
+                <h:p>
+                    A representation of a hit, e.g. a HITS, a Geolocation,
+                    an image, etc.
+                </h:p>
+                <h:p>
+                    A HITS Data View is mandatory for every hit in the result set.
+                </h:p>
+            </xs:documentation>
+        </xs:annotation>
+        <xs:sequence>
+            <xs:any namespace="##other" processContents="strict"/>
+        </xs:sequence>
+        <xs:attribute name="type" use="required">
+            <xs:annotation>
+                <xs:documentation>
+                    <h:p>
+                        The type of the content of the Data View as a MIME type.
+                    </h:p>
+                    <h:p>
+                        For the mandatory HITS Data View, use the MIME type
+                        <h:code>application/x-clarin-fcs-hits+xml</h:code>.
+                    </h:p>
+                </xs:documentation>
+            </xs:annotation>
+            <xs:simpleType>
+                <xs:restriction base="xs:string">
+                    <xs:pattern value="\w+/\w([\.\-]{0,1}\w)*(\+\w+){0,1}"/>
+                </xs:restriction>
+            </xs:simpleType>
+        </xs:attribute>
+        <xs:attribute name="pid" type="fcs:PidType"/>
+        <xs:attribute name="ref" type="fcs:ReferenceType"/>
+    </xs:complexType>
+
+    <xs:simpleType name="PidType">
+        <xs:annotation>
+            <xs:documentation>
+                <h:p>
+                    A persistent identifier of given entity. This attribute
+                    should be used, if a PID is available for the given entity.
+                </h:p>
+                <h:p>
+                    An Endpoint SHOULD also make the PID available tough the
+                    <h:code>&lt;sru:recordIdentifier&gt;</h:code> element of
+                    the <h:code>&lt;sru:record&gt;/</h:code> element.
+                    If more PIDs are available for one record (i.e. Resource,
+                    Metadata, the individual Data View), the Endpoint is MUST
+                    to put the "most important" (e.g. the primary) PID into the
+                    <h:code>&lt;sru:recordIdentifier&gt;</h:code> element.
+                </h:p>
+            </xs:documentation>
+        </xs:annotation>
+        <xs:restriction base="xs:anyURI"/>
+    </xs:simpleType>
+
+    <xs:simpleType name="ReferenceType">
+        <xs:annotation>
+            <xs:documentation>
+                <h:p>
+                    A regular URI for the given entity, that can be retrieved
+                    directly (via HTTP or HTTPS). 
+                </h:p>
+                <h:p>
+                    This URI may include custom Endpoint specific query strings
+                    to implement features like hit highlighting.
+                </h:p>
+            </xs:documentation>
+        </xs:annotation>
+        <xs:restriction base="xs:anyURI"/>
+    </xs:simpleType>
+</xs:schema>
