RE: SparqlQuery-1G missing schemaLocation

Jonathan,

Adding the catalog doesn't change the WSDL (which seems like cheating to 
me). 

Please do ask the DAWG folks about this. I previously reported a small 
error in their WSDL and they were happy to fix it.

Arthur Ryman,
IBM Software Group, Rational Division

blog: http://ryman.eclipsedevelopersjournal.com/
phone: +1-905-413-3077, TL 969-3077
assistant: +1-905-413-2411, TL 969-2411
fax: +1-905-413-4920, TL 969-4920
mobile: +1-416-939-5063, text: 4169395063@fido.ca



"Jonathan Marsh" <jmarsh@microsoft.com> 
Sent by: www-ws-desc-request@w3.org
05/30/2006 04:14 PM

To
Arthur Ryman/Toronto/IBM@IBMCA, "Youenn Fablet" 
<youenn.fablet@crf.canon.fr>
cc
<www-ws-desc@w3.org>, <www-ws-desc-request@w3.org>
Subject
RE: SparqlQuery-1G missing schemaLocation






In practice I don?t see much difference between augmenting a testcase with 
a schemaLocation attribute, or augmenting it with a catalog file.  Either 
way seems to be a bit intrusive.  This testcase is riddled with 
schemaLocation attributes ? just missing the one I was looking for.  Let?s 
ask the DAWG why it was omitted in this one instance.
 
FWIW, as this testcase involves multiple levels of schema import, I?m 
unlikely to ever pass this test even after implementing support for 
parsing the HTTP binding namespace.
 

From: Arthur Ryman [mailto:ryman@ca.ibm.com] 
Sent: Tuesday, May 30, 2006 11:05 AM
To: Youenn Fablet
Cc: Jonathan Marsh; www-ws-desc@w3.org; www-ws-desc-request@w3.org
Subject: Re: SparqlQuery-1G missing schemaLocation
 

Youenn/Jonathan, 

The sparql test case was taken from their spec and is a "real world" 
example. We shouldn't modify the test cases just to make our processors 
pass. We need to fix our processors. 

Recall that I did include an XML catalog for another test case case, but 
got "shot down". I think we need to revisit this policy. I suggest we 
include realistic test cases that omit schemaLocation or WSDL location 
attributes, but provide an XML catalog for these cases. We don't require 
any processor to support a specific mechanism for locating resources, but 
we can provide the XML catalogs and let the processors use that 
information however they want, possibly with human intervention to 
tranlate the XML catalog into a format that the processor can handle. 

I suggest the following for test cases that omit location attributes: 
1. Provide an XML catalog in the OASIS standard format 
2. Provide related test case with the location attributes included 

Arthur Ryman,
IBM Software Group, Rational Division

blog: http://ryman.eclipsedevelopersjournal.com/
phone: +1-905-413-3077, TL 969-3077
assistant: +1-905-413-2411, TL 969-2411
fax: +1-905-413-4920, TL 969-4920
mobile: +1-416-939-5063, text: 4169395063@fido.ca 


Youenn Fablet <youenn.fablet@crf.canon.fr> 
Sent by: www-ws-desc-request@w3.org 
05/30/2006 12:01 PM 


To
Jonathan Marsh <jmarsh@microsoft.com> 
cc
www-ws-desc@w3.org 
Subject
Re: SparqlQuery-1G missing schemaLocation
 


 
 




I donwloaded the schema document and added schemaLocation information in 
the wsdls & schemas wherever needed.
Please find in attachment all the schemas that I needed to process the 
document correctly.
I do not remember where I get the main schema (result2.xsd) however.
It may be safer to check with the sparql guys.
Regards,
Youenn

Jonathan Marsh wrote:
>
> Test case SparqlQuery-1G contains the line:
>
> <xs:import 
> namespace="http://www.w3.org/2005/09/sparql-protocol-types/#" />
>
> Which, as you can see, has no schemaLocation attribute. Neither does 
> there seem to be any catalog or anything else mapping this namespace 
> to the intended file, which is presumably ?sparql-protocol-types.xsd?.
>
> My brain-dead implementation can?t find the types, but it doesn?t look 
> like Woden can either. Canon processes it just fine. Youenn, how do 
> you find the schema?
>
> Should we add a schemaLocation=?sparql-protocol-types.xsd? attribute 
> to this test case? I don?t want to test mechanisms for locating schema 
> types, since that?s not the main purpose of my implementation.
>
> ** [ **Jonathan Marsh ** ][ ** jmarsh@microsoft.com 
> <mailto:jmarsh@microsoft.com> ** ][ ** 
> http://spaces.msn.com/auburnmarshes** ]**
>


<?xml version="1.0" encoding="UTF-8"?>
<!--                RELAX NG Schema for SPARQL Query Results XML Format    
      This XML schema is normative.        $Id$                 -->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
                elementFormDefault="qualified"
                targetNamespace="http://www.w3.org/2005/sparql-results#"
                xmlns:res="http://www.w3.org/2005/sparql-results#"
                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                <xs:import namespace="http://www.w3.org/XML/1998/namespace
"
                                 schemaLocation="
http://www.w3.org/2001/xml.xsd" />
                <xs:attributeGroup name="xmlLang">
                                 <xs:attribute ref="xml:lang" 
use="required" />
                </xs:attributeGroup>
                <!--                Using xsi namespaced terms such as 
xsi:schemaLocation                is tricky. as Relax requires them to be 
given when used.  However,                WXS has this knowledge built in 
and validators complain when they                are explicitly listed 
without a schemaLocation (which is forbidden by                the WXS 
spec)..        -->
                <xs:element name="sparql">
                                 <xs:complexType>
                                                  <xs:sequence>
 <xs:element ref="res:head" />
 <xs:choice>
          <xs:element ref="res:results" />
          <xs:element ref="res:boolean" />
 </xs:choice>
                                                  </xs:sequence>
                                 </xs:complexType>
                </xs:element>
                <xs:element name="head">
                                 <xs:complexType>
                                                  <xs:sequence>
 <xs:element minOccurs="0" maxOccurs="unbounded"
          ref="res:variable" />
 <xs:element minOccurs="0" maxOccurs="unbounded"
          ref="res:link" />
                                                  </xs:sequence>
                                 </xs:complexType>
                </xs:element>
                <xs:element name="variable">
                                 <xs:complexType>
                                                  <xs:attributeGroup 
ref="res:nameAttr" />
                                 </xs:complexType>
                </xs:element>
                <xs:attributeGroup name="nameAttr">
                                 <xs:attribute name="name" use="required" 
type="xs:NMTOKEN" />
                </xs:attributeGroup>
                <xs:attributeGroup name="hrefAttr">
                                 <xs:attribute name="href" use="required"
                                                  type="res:URI-reference" 
/>
                </xs:attributeGroup>
                <xs:element name="link">
                                 <xs:complexType>
                                                  <xs:attributeGroup 
ref="res:hrefAttr" />
                                 </xs:complexType>
                </xs:element>
                <xs:attributeGroup name="ordered">
                                 <xs:attribute name="ordered" 
use="required" type="xs:boolean" />
                </xs:attributeGroup>
                <xs:attributeGroup name="distinct">
                                 <xs:attribute name="distinct" 
use="required" type="xs:boolean" />
                </xs:attributeGroup>
                <xs:element name="results">
                                 <xs:complexType>
                                                  <xs:sequence>
 <xs:element minOccurs="0" maxOccurs="unbounded"
          ref="res:result" />
                                                  </xs:sequence>
                                                  <xs:attributeGroup 
ref="res:ordered" />
                                                  <xs:attributeGroup 
ref="res:distinct" />
                                 </xs:complexType>
                </xs:element>
                <!-- ASK -->
                <xs:element name="boolean" type="xs:boolean" />
                <!-- SELECT solution, single match or row -->
                <xs:element name="result">
                                 <xs:complexType>
                                                  <xs:sequence>
 <xs:element minOccurs="0" maxOccurs="unbounded"
          ref="res:binding" />
                                                  </xs:sequence>
                                                  <xs:attribute 
name="index" type="xs:positiveInteger" />
                                 </xs:complexType>
                </xs:element>
                <!-- SELECT binding in a solution -->
                <xs:element name="binding">
                                 <xs:complexType>
                                                  <xs:choice>
 <xs:element ref="res:uri" />
 <xs:element ref="res:bnode" />
 <xs:element ref="res:literal" />
                                                  </xs:choice>
                                                  <xs:attributeGroup 
ref="res:nameAttr" />
                                 </xs:complexType>
                </xs:element>
                <xs:element name="uri" type="xs:string" />
                <xs:element name="bnode" type="xs:string" />
                <xs:element name="literal">
                                 <xs:complexType mixed="true">
                                                  <xs:attribute 
name="datatype" type="res:URI-reference" />
                                                  <xs:attribute 
ref="xml:lang" />
                                 </xs:complexType>
                </xs:element>
                <xs:attributeGroup name="indexAttr">
                                 <xs:attribute name="index" use="required"
 type="xs:positiveInteger" />
                </xs:attributeGroup>
                <xs:attributeGroup name="datatypeAttr">
                                 <xs:attribute name="datatype" 
use="required"
                                                  type="res:URI-reference" 
/>
                </xs:attributeGroup>
                <xs:simpleType name="URI-reference">
                                 <xs:restriction base="xs:anyURI" />
                </xs:simpleType>
</xs:schema>

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
                xmlns:xs="http://www.w3.org/2001/XMLSchema"
                targetNamespace="
http://www.w3.org/1999/02/22-rdf-syntax-ns#"
                version="$Id$">

                <!-- http://www.w3.org/TR/rdf-syntax-grammar/ -->
                <!-- "Define" rdf:RDF -->
                <xs:element name="RDF" type="xs:anyType">
                                 <xs:annotation>
                                                  <xs:documentation 
xml:lang="en">
                                                                   The 
content of the root RDF element must be valid
                                                                   RDF/XML 
as defined in the RDF/XML Syntax Specification
 (Revised): http://www.w3.org/TR/rdf-syntax-grammar/
                                                  </xs:documentation>
                                 </xs:annotation>
                </xs:element>
</xs:schema>

<?xml version='1.0'?>
<xs:schema targetNamespace="http://www.w3.org/XML/1998/namespace" 
xmlns:xs="http://www.w3.org/2001/XMLSchema" xml:lang="en">

<xs:annotation>
 <xs:documentation>
  See http://www.w3.org/XML/1998/namespace.html and
  http://www.w3.org/TR/REC-xml for information about this namespace.

   This schema document describes the XML namespace, in a form
   suitable for import by other schema documents. 

   Note that local names in this namespace are intended to be defined
   only by the World Wide Web Consortium or its subgroups.  The
   following names are currently defined in this namespace and should
   not be used with conflicting semantics by any Working Group,
   specification, or document instance:

   base (as an attribute name): denotes an attribute whose value
        provides a URI to be used as the base for interpreting any
        relative URIs in the scope of the element on which it
        appears; its value is inherited.  This name is reserved
        by virtue of its definition in the XML Base specification.

   id   (as an attribute name): denotes an attribute whose value
        should be interpreted as if declared to be of type ID.
        The xml:id specification is not yet a W3C Recommendation,
        but this attribute is included here to facilitate experimentation
        with the mechanisms it proposes.  Note that it is _not_ included
        in the specialAttrs attribute group.

   lang (as an attribute name): denotes an attribute whose value
        is a language code for the natural language of the content of
        any element; its value is inherited.  This name is reserved
        by virtue of its definition in the XML specification.
 
   space (as an attribute name): denotes an attribute whose
        value is a keyword indicating what whitespace processing
        discipline is intended for the content of the element; its
        value is inherited.  This name is reserved by virtue of its
        definition in the XML specification.

   Father (in any context at all): denotes Jon Bosak, the chair of 
        the original XML Working Group.  This name is reserved by 
        the following decision of the W3C XML Plenary and 
        XML Coordination groups:

            In appreciation for his vision, leadership and dedication
            the W3C XML Plenary on this 10th day of February, 2000
            reserves for Jon Bosak in perpetuity the XML name
            xml:Father
 </xs:documentation>
</xs:annotation>

<xs:annotation>
 <xs:documentation>This schema defines attributes and an attribute group
       suitable for use by
       schemas wishing to allow xml:base, xml:lang, xml:space or xml:id
       attributes on elements they define.

       To enable this, such a schema must import this schema
       for the XML namespace, e.g. as follows:
       &lt;schema . . .>
        . . .
        &lt;import namespace="http://www.w3.org/XML/1998/namespace"
                   schemaLocation="http://www.w3.org/2001/xml.xsd"/>

       Subsequently, qualified reference to any of the attributes
       or the group defined below will have the desired effect, e.g.

       &lt;type . . .>
        . . .
        &lt;attributeGroup ref="xml:specialAttrs"/>

        will define a type which will schema-validate an instance
        element with any of those attributes</xs:documentation>
</xs:annotation>

<xs:annotation>
 <xs:documentation>In keeping with the XML Schema WG's standard versioning
  policy, this schema document will persist at
  http://www.w3.org/2005/08/xml.xsd.
  At the date of issue it can also be found at
  http://www.w3.org/2001/xml.xsd.
  The schema document at that URI may however change in the future,
  in order to remain compatible with the latest version of XML Schema
  itself, or with the XML namespace itself.  In other words, if the XML
  Schema or XML namespaces change, the version of this document at
  http://www.w3.org/2001/xml.xsd will change
  accordingly; the version at
  http://www.w3.org/2005/08/xml.xsd will not change.
 </xs:documentation>
</xs:annotation>

<xs:attribute name="lang">
 <xs:annotation>
  <xs:documentation>Attempting to install the relevant ISO 2- and 3-letter
        codes as the enumerated possible values is probably never
        going to be a realistic possibility.  See
        RFC 3066 at http://www.ietf.org/rfc/rfc3066.txt and the IANA 
registry
        at http://www.iana.org/assignments/lang-tag-apps.htm for
        further information.

        The union allows for the 'un-declaration' of xml:lang with
        the empty string.</xs:documentation>
 </xs:annotation>
 <xs:simpleType>
  <xs:union memberTypes="xs:language">
   <xs:simpleType> 
    <xs:restriction base="xs:string">
     <xs:enumeration value=""/>
    </xs:restriction>
   </xs:simpleType>
  </xs:union>
 </xs:simpleType>
</xs:attribute>

<xs:attribute name="space">
 <xs:simpleType>
  <xs:restriction base="xs:NCName">
   <xs:enumeration value="default"/>
   <xs:enumeration value="preserve"/>
  </xs:restriction>
 </xs:simpleType>
</xs:attribute>

<xs:attribute name="base" type="xs:anyURI">
 <xs:annotation>
  <xs:documentation>See http://www.w3.org/TR/xmlbase/ for
                    information about this attribute.</xs:documentation>
 </xs:annotation>
</xs:attribute>

<xs:attribute name="id" type="xs:ID">
 <xs:annotation>
  <xs:documentation>See http://www.w3.org/TR/xml-id/ for
                    information about this attribute.</xs:documentation>
 </xs:annotation>
</xs:attribute>

<xs:attributeGroup name="specialAttrs">
 <xs:attribute ref="xml:base"/>
 <xs:attribute ref="xml:lang"/>
 <xs:attribute ref="xml:space"/>
</xs:attributeGroup>

</xs:schema>

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema
                version="$Id$"
                targetNamespace="
http://www.w3.org/2005/09/sparql-protocol-types/#"
                xmlns:st="
http://www.w3.org/2005/09/sparql-protocol-types/#"
                xmlns:xs="http://www.w3.org/2001/XMLSchema"
                xmlns:vbr="http://www.w3.org/2005/sparql-results#"
                xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">

                <xs:import namespace="
http://www.w3.org/2005/sparql-results#"
                                 schemaLocation="result2.xsd" />

                <xs:import namespace="
http://www.w3.org/1999/02/22-rdf-syntax-ns#"
                                 schemaLocation="rdf.xsd" />

                <xs:element name="query-request">
                                 <xs:complexType>
                                                  <xs:sequence>
 <xs:element minOccurs="1" maxOccurs="1" name="query"
          type="xs:string">
          <xs:annotation>
                           <xs:documentation>
                                            query is an xs:string 
constrained by the
                                            language definition,
                                            
http://www.w3.org/TR/rdf-sparql-query/#grammar,
                                            as "a sequence of characters 
in the language
                                            defined by the [SPARQL] 
grammar, starting
                                            with the Query production"
                           </xs:documentation>
          </xs:annotation>
 </xs:element>
 <xs:element minOccurs="0" maxOccurs="unbounded"
          name="default-graph-uri" type="xs:anyURI" />
 <xs:element minOccurs="0" maxOccurs="unbounded"
          name="named-graph-uri" type="xs:anyURI" />
                                                  </xs:sequence>
                                 </xs:complexType>
                </xs:element>
                <xs:element name="query-result">
                                 <xs:annotation>
                                                  <xs:documentation>
                                                                   The 
type for serializing query results, either as XML or
 RDF/XML.
                                                  </xs:documentation>
                                 </xs:annotation>
                                 <xs:complexType>
                                                  <xs:choice>
 <xs:element maxOccurs="1" ref="vbr:sparql" />
 <xs:element maxOccurs="1" ref="rdf:RDF" />
                                                  </xs:choice>
                                 </xs:complexType>
                </xs:element>
                <xs:element type="xs:string" name="fault-details">
                                 <xs:annotation>
                                                  <xs:documentation>
                                                                   This 
element contains human-readable information about
                                                                   the 
fault returned by the SPARQL query processing
 service.
                                                  </xs:documentation>
                                 </xs:annotation>
                </xs:element>
                <xs:element name="malformed-query">
                                 <xs:complexType>
                                                  <xs:all>
 <xs:element minOccurs="0" maxOccurs="1"
          ref="st:fault-details" />
                                                  </xs:all>
                                 </xs:complexType>
                </xs:element>
                <xs:element name="query-request-refused">
                                 <xs:complexType>
                                                  <xs:all>
 <xs:element minOccurs="0" maxOccurs="1"
          ref="st:fault-details" />
                                                  </xs:all>
                                 </xs:complexType>
                </xs:element>
</xs:schema>

Received on Tuesday, 30 May 2006 21:06:50 UTC