<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE spec SYSTEM "../shared/xmlspec.dtd" [
	<!ENTITY base.uri "http://www.w3.org/2009/sparql/docs/service-description-1.1/">
	<!ENTITY maturity.level "WD">
	<!ENTITY doc.shortname "sparql11-service-description">
	<!ENTITY draft.year "2009">
	<!ENTITY draft.month.name "October">
	<!ENTITY draft.month "10">
	<!ENTITY draft.day "14">
	<!ENTITY iso6.doc.date "&draft.year;&draft.month;&draft.day;">
	<!ENTITY doc.ident "&maturity.level;-&doc.shortname;-&iso6.doc.date;">
	<!ENTITY this.version "&base.uri;&doc.ident;">
	<!ENTITY xml.version "&doc.ident;.xml">
	<!ENTITY review.version "&doc.ident;-review.html">
	<!ENTITY pdf.version "&doc.ident;.pdf">
	<!ENTITY errataloc "">
	<!ENTITY preverrataloc "">
	<!ENTITY translationloc "http://www.w3.org/2003/03/Translations/byTechnology?technology=&doc.shortname;">
	<!ENTITY impreploc "">
	<!ENTITY versionOfSPARQL "1.1">
	<!ENTITY WebSGML "WebSGML Adaptations Annex to ISO 8879">
	<!ENTITY nbsp "&#160;">
	<!ENTITY mdash "&#x2014;">
	<!ENTITY magicents "<code>amp</code>,
<code>lt</code>,
<code>gt</code>,
<code>apos</code>,
<code>quot</code>">
	<!ENTITY may "may">
	<!ENTITY MAY "<rfc2119>MAY</rfc2119>">
	<!ENTITY SHOULD "<rfc2119>SHOULD</rfc2119>">
	<!ENTITY % local.common.att "xml:lang    CDATA  #IMPLIED">
]>
<?xml-stylesheet type="text/xsl" href="../shared/REC-xml.xsl"?>
<spec w3c-doctype="rec" xml:lang="en">
<!--
Notes on preparation of SPARQL 1.1
	
	@@ Need to add links/references when talking about rdfs:Class, rdfs:domain, rdfs:range, and owl:InverseFunctionalProperty.
	
	@@ Need to add proper links when citing SPARQL/Query
		3.3.6 sd:EntailmentRegime
		3.5.4 sd:extensionFunction
		
-->
	<header>
		<title>SPARQL &versionOfSPARQL; Service Description</title>
		<w3c-designation>&doc.ident;</w3c-designation>
		<w3c-doctype>Editor's Draft</w3c-doctype>
		<pubdate>
			<day>&draft.day;</day>
			<month>&draft.month.name;</month>
			<year>&draft.year;</year>
		</pubdate>
		<publoc>
			<loc href="&this.version;/">&this.version;/</loc>
		</publoc>
        <!--
		<altlocs>
			<loc href="&xml.version;">XML</loc>
			<loc href="&pdf.version;">PDF</loc>
			<loc href="&review.version;">XHTML with color-coded revision indicators</loc>
		</altlocs>-->
		<latestloc>
			<loc href="http://www.w3.org/TR/&doc.shortname;/">http://www.w3.org/TR/&doc.shortname;/</loc>
		</latestloc>
		<prevlocs>
   <!-- @@FPWD loc href="http://www.w3.org/TR/2009/WD-rdf-sparql-query-20090915/">http://www.w3.org/TR/2009/WD-rdf-sparql-query-20090915/</loc -->
<!--			<loc href="http://www.w3.org/TR/2008/REC-rdf-sparql-query-20080115/">http://www.w3.org/TR/2008/REC-rdf-sparql-query-20080115/</loc> -->
		</prevlocs>
		<authlist>
			<author role="Editor">
				<name>Gregory Todd Williams</name>
				<affiliation>Rensselaer Polytechnic Institute</affiliation>
				<email href="mailto:greg@evilfunhouse.com">greg@evilfunhouse.com</email>
			</author>
		</authlist>
        <!--
		<errataloc href="&errataloc;"/>
		<preverrataloc href="&preverrataloc;"/>
		<translationloc href="&translationloc;"/>
        -->
		<abstract>
      <p>This document describes SPARQL Service Descriptions, a method for
      discovering and vocabulary for describing SPARQL services made available
      via the SPARQL Protocol. Such descriptions are intended to provide a
      mechanism by which a client or end user can discover information about the
      SPARQL implementation/service such as supported extension functions and
      details about the available dataset.</p>
	</abstract>
	<status>
      <p><em>This section describes the status of this document at the time of its publication. Other documents may supersede this document. A list of current W3C publications and the latest revision of this technical report can be found in the <a href="http://www.w3.org/TR/">W3C technical reports index</a> at http://www.w3.org/TR/.</em></p>

      <p>This is a <a href="http://www.w3.org/2005/10/Process-20051014/tr.html#RecsWD">Editors' Working Draft</a>.</p>

      <p>Comments on this document should be sent to <a href="mailto:public-rdf-dawg-comments@w3.org">public-rdf-dawg-comments@w3.org</a>, a mailing list with a <a href="http://lists.w3.org/Archives/Public/public-rdf-dawg-comments">public archive</a>. Questions and comments about SPARQL that are not related to this specification, including extensions and features, can be discussed on the mailing list <a href="mailto:public-sparql-dev@w3.org">public-sparql-dev@w3.org</a>, (<a href="http://lists.w3.org/Archives/Public/public-sparql-dev">public archive</a>).</p>

      <p>This document was produced by the <a href="http://www.w3.org/2001/sw/DataAccess/">SPARQL Working Group</a>, which is part of the <a href="http://www.w3.org/2001/sw/Activity">W3C Semantic Web Activity</a>.</p>

      <p>This document was produced by a group operating under the <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/">5 February 2004 W3C Patent Policy</a>. W3C maintains a <a rel="disclosure" href="http://www.w3.org/2004/01/pp-impl/35463/status">public list of any patent disclosures</a> made in connection with the deliverables of the group; that page also includes instructions for disclosing a patent. An individual who has actual knowledge of a patent which the individual believes contains <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/#def-essential">Essential Claim(s)</a> must disclose the information in accordance with <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/#sec-Disclosure">section 6 of the W3C Patent Policy</a>.</p>
		</status>
		<pubstmt>
			<p>@@@ Chicago, Vancouver, Mountain View, Edinburgh, et al.: World-Wide Web Consortium, XML
Working Group, 1996, 1997, 2000, 2006, 2008.</p>
		</pubstmt>
		<sourcedesc>
			<p>Created in electronic form.</p>
		</sourcedesc>
		<langusage>
			<language id="EN">English</language>
		</langusage>
		<revisiondesc>
			<p role="cvsid">$Id: xmlspec.xml,v 1.9 2009/10/21 03:29:49 lfeigenb Exp $</p>
		</revisiondesc>
	</header>
	
	
	
	<body>
	
	<div1 id="sec-intro"><head>Introduction</head>
		<p>SPARQL Service Descriptions are a way of describing the features of a SPARQL service made available via the SPARQL Protocol. This document describes both a method for discovering service descriptions from a specific SPARQL service, and an RDF schema for encoding such descriptions in RDF.</p>    
	</div1>
	
	
	
	<div1><head>Accessing Service Descriptions</head>
		<p>SPARQL services made available via the SPARQL Protocol &SHOULD; return a service description document at the service URL. This service description &SHOULD; be made available in an RDF serialization, but &MAY; also be provided embedded in HTML by RDFa, or other RDF representations by using content negotiation.</p>
	</div1>
	
	
	<div1><head>Service Description Vocabulary</head>
		<div2><head>SPARQL Service Description Namespace</head>
			<p>The SPARQL Service Description namespace IRI is:</p>
            <p>http://www.w3.org/ns/sparql-service-description#</p>
			<p>The prefix used in this document for this namespace is sd:.</p>
		</div2>
		
		<div2><head>Classes</head>
			<div3><head>sd:Service</head>
			<p>An instance of sd:Service represents a SPARQL service made available via the SPARQL Protocol.</p>
			<p>sd:Service is an instance of rdfs:Class.</p>
			</div3>
			
			<div3><head>sd:Language</head>
			<p>An instance of sd:Language represents a subset of the SPARQL language that may be provided by an sd:Service. @@ Better word than "subset" to describe this?</p>
			<p>sd:Language is an instance of rdfs:Class.</p>
			</div3>
			
			<div3><head>sd:Function</head>
			<p>sd:Function is an instance of rdfs:Class.</p>
			</div3>
			
			<div3><head>sd:ScalarFunction</head>
			<p>An instance of sd:ScalarFunction represents an extension function that may be used in a SPARQL FILTER/HAVING clause or a project expression.</p>
			<p>sd:ScalarFunction is a subclass of sd:Function.</p>
			</div3>
			
			<div3><head>sd:AggregateFunction</head>
			<p>An instance of sd:AggregateFunction represents an extension function that may be used in a SPARQL aggregate query HAVING clause or project expression.</p>
			<p>sd:AggregateFunction is a subclass of sd:Function</p>
			</div3>
			
			<div3><head>sd:EntailmentRegime</head>
			<p>An instance of sd:EntailmentRegime represents an entailment regime used in basic graph pattern matching (as described in SPARQL 12.6 @@ old sparql spec reference).</p>
			<p>sd:EntailmentRegime is an instance of rdfs:Class.</p>
			</div3>
		</div2>
		
		<div2><head>Instances</head>
			<p>@@ Need to update list of instances with defined entailment regimes and supported functions.</p>
			
			<div3><head>sd:SPARQLQuery</head>
			</div3>
			
			<div3><head>sd:SPARQLUpdate</head>
			</div3>
		</div2>
		
		<div2><head>Properties</head>
			<div3><head>sd:url</head>
			<p>The service URL of an sd:Service supporting the SparqlQuery interface. @@ this is language from the protocol document. Is it appropriate here?</p>
			<p>sd:url is an instance of owl:InverseFunctionalProperty. The rdfs:domain of sd:url is sd:Service.</p>
			</div3>
			
			
			<div3><head>sd:feature</head>
			<p>Releates an instance of sd:Service with a resource representing a supported feature.</p>
			<p>The rdfs:domain of sd:feature is sd:Service.</p>
			</div3>
			
			<div3><head>sd:supportedEntailment</head>
			<p>Releates an instance of sd:Service with a resource representing a supported entailment regime for basic graph pattern matching. This property is intended for use when a single entailment regime applies to every graph in the dataset. If different entailment regimes apply to different graphs in the dataset, another property should be used to indicate this fact in the description of the dataset.</p>
			<p>sd:supportedEntailment is an rdfs:subPropertyOf sd:feature. The rdfs:domain of sd:supportedEntailment is sd:Service. The rdfs:range of sd:supportedEntailment is sd:EntailmentRegime.</p>
			</div3>
			
			<div3><head>sd:extensionFunction</head>
			<p>Releates an instance of sd:Service to a function that is supported as either a scalar, value testing function (as described in SPARQL 11.6 @@ old sparql spec reference) or an aggregate function. The rdf:type of the function may be used to indicate which of these function types apply, being either sd:ScalarFunction or sd:AggregateFunction.</p>
			<p>sd:extensionFunction is an rdfs:subPropertyOf sd:feature. The rdfs:domain of sd:extensionFunction is sd:Service. The rdfs:range of sd:extensionFunction is sd:Function.</p>
			</div3>
			
			<div3><head>sd:languageExtension</head>
			<p>Releates an instance of sd:Service to a resource representing an implemented extension to the SPARQL Query or Update language.</p>
			<p>sd:languageExtension is an rdfs:subPropertyOf sd:feature. The rdfs:domain of sd:languageExtension is sd:Service.</p>
			</div3>
			
			<div3><head>sd:supportedLanguage</head>
			<p>Releates an instance of sd:Service to a SPARQL language subset (e.g. Query and Update) that it implements.</p>
			<p>sd:supportedLanguage is an rdfs:subPropertyOf sd:feature. The rdfs:domain of sd:supportedLanguage is sd:Service. The rdfs:range of sd:supportedLanguage is sd:Language.</p>
			</div3>
			
			<div3><head>sd:datasetDescription</head>
			<p>Releates an instance of sd:Service to a description of its available dataset. Depending on the implementation, this may describe the default dataset available when no explicit dataset is specified, or may describe graphs availble for explicit inclusion in the dataset via protocol or query level features. (@@ fix wording as per AndyS's email)</p>
			<p>The rdfs:domain of sd:datasetDescription is sd:Service.</p>
			</div3>
			
			<div3><head>sd:datasetDescriptionURL</head>
			<p>Releates an instance of sd:Service to a URL from which a dataset description can be retrieved. If retrieved, the dataset description has the same meaning as if it had been referened directly with sd:datasetDescription.</p>
			<p>The rdfs:domain of sd:datasetDescriptionURL is sd:Service.</p>
			</div3>
		</div2>
	</div1>

	<div1><head>Example</head>
		<p>The following HTTP trace illustrates the retrieval of a service description from the SPARQL service http://www.example/sparql/.</p>
		<pre>
GET /sparql/ HTTP/1.1
Host: www.example
</pre>

			<p>The SPARQL service responds with an RDF/XML encoded service description (no content negotiation or RDFa encoding is used):</p>
			
			<pre>
HTTP/1.1 200 OK
Date: Fri, 09 Oct 2009 17:31:12 GMT
Server: Apache/1.3.29 (Unix) PHP/4.3.4 DAV/1.0.3
Connection: close
Content-Type: application/rdf+xml

&lt;?xml version="1.0" encoding="utf-8"?>
&lt;rdf:RDF
   xmlns:ex="http://example/"
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:scovo="http://purl.org/NET/scovo#"
   xmlns:sd="http://www.w3.org/ns/sparql-service-description#"
   xmlns:void="http://rdfs.org/ns/void#">
  &lt;sd:Service>
    &lt;sd:url rdf:resource="http://www.example/sparql/"/>
    &lt;sd:extensionFunction>
      &lt;sd:ScalarFunction rdf:about="java:com.ldodds.sparql.Distance"/>
    &lt;/sd:extensionFunction>
    &lt;sd:datasetDescription>
      &lt;rdf:Description>
        &lt;ex:defaultGraph>
          &lt;void:Dataset rdf:about="http://www.example/default-graph/">
            &lt;void:statItem>
              &lt;rdf:Description>
                &lt;scovo:dimension rdf:resource="http://rdfs.org/ns/void#numberOfTriples"/>
                &lt;rdf:value rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">100&lt;/rdf:value>
              &lt;/rdf:Description>
            &lt;/void:statItem>
          &lt;/void:Dataset>
        &lt;/ex:defaultGraph>
        &lt;ex:namedGraph>
          &lt;void:Dataset rdf:about="http://www.example/named-graph/">
            &lt;void:statItem>
              &lt;rdf:Description>
                &lt;scovo:dimension rdf:resource="http://rdfs.org/ns/void#numberOfTriples"/>
                &lt;rdf:value rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">2000&lt;/rdf:value>
              &lt;/rdf:Description>
            &lt;/void:statItem>
          &lt;/void:Dataset>
        &lt;/ex:namedGraph>
      &lt;/rdf:Description>
    &lt;/sd:datasetDescription>
  &lt;/sd:Service>
&lt;/rdf:RDF>
</pre>
			
		<p>This RDF describes a SPARQL service available at the URL http://www.example/sparql/ that supports the java:com.ldodds.sparql.Distance extension function, and has a dataset with a default graph and one named graph, both described using the voiD vocabulary. The default graph contains 100 triples while the graph named http://www.example/named-graph/ contains 2000 triples.</p>
	</div1>

	</body>

	<back>
		<!-- &SGML; -->
		<!-- &Biblio; -->
		<div1 id="sec-bibliography">
			<head>References</head>
			<div2 id="sec-existing-stds">
				<head>Normative References</head>
				<blist>
					<bibl id="SPARQL11" href="http://www.w3.org/TR/rdf-sparql-query/" key="SPARQL/Query 1.0"> 
					<titleref>SPARQL Query Language for RDF</titleref>, ed. Eric Prud'hommeaux, Andy Seaborne. W3C Recommendation 15 January 2008. </bibl>
				</blist>
			</div2>
		</div1>
		<div1 id="sec-cvsLog">
			<head>CVS History</head>
			<div2 id="sec-cvsLog-meat">
				<pre>
					$Log: xmlspec.xml,v $
					Revision 1.9  2009/10/21 03:29:49  lfeigenb
					pubrules fixes
					
					Revision 1.8  2009/10/21 03:19:15  lfeigenb
					publication prep
					
					Revision 1.7  2009/10/20 20:47:23  lfeigenb
					validation errors
					
					Revision 1.6  2009/10/20 19:45:51  lfeigenb
					small fixes for naming and cleanup
					
					Revision 1.5  2009/10/20 18:03:06  lfeigenb
					move to using the shared XML spec materials
					
					Revision 1.4  2009/10/20 15:53:20  lfeigenb
					updated NS URI as per Oct-20 meeting
					
					Revision 1.3  2009/10/20 14:25:47  gwilliam
					Fixed base.uri.
					Commented out TURTLE reference.
					
					Revision 1.2  2009/10/20 13:59:34  gwilliam
					Removed duplicate namespace section.
					
					Revision 1.1  2009/10/20 04:21:12  gwilliam
					CREATED
					
				</pre>
			</div2>
		</div1>
	</back>
</spec>
