Copyright © 2006 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C liability, trademark and document use rules apply.
Web content, including XML and HTML documents on the web, have a strong structure that allows identifying parts of the document in many ways. When wanting to point to a part of a Document, it is useful to be able to make it robust in the face of changes, this is very useful in the context of Evaluation and Report Language (EARL), where the report of many errors would still be valid as other errors are repaired. This document will contain a framework for representing pointers in Resource Description Framework (RDF), and a number of pointers themselves.
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 W3C technical reports index at http://www.w3.org/TR/.
This an Editor's Draft [W3C First Public Working Draft] of the HTTP Vocabulary in RDF document. It was published on 1 December 2006 by the Evaluation and Repair Tools Working Group (ERT WG). This document is expected to be published as a W3C Working Group Note after review and refinement, potentially upon the next publication.
The working group encourages feedback about the approach, as well as about the completeness and maturity of this document by developers and researchers who have interest in a representation of the HTTP vocabulary in RDF format. Feedback from the W3C Quality Assurance Interest Group (QA IG), the W3C Semantic Web Interest Group (SWIG), and the W3C Mobile Web Best Practices Working Group (BPWG) is particularly welcome. Please send comments on this document to the public mailing list of the working group public-wai-ert@w3.org. The archives of the working group mailing list are publicly available.
Publication as a Working Draft does not imply endorsement by the W3C Membership. This is a draft document and may be updated, replaced or obsoleted by other documents at any time. It is inappropriate to cite this document as other than work in progress.
This document was produced by a group operating under the 5 February 2004 W3C Patent Policy. The group does not expect this document to become a W3C Recommendation. W3C maintains a public list of any patent disclosures 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 Essential Claim(s) must disclose the information in accordance with section 6 of the W3C Patent Policy.
This document introduces an RDF vocabulary to enable elements within a document, particularly HTML and XML documents to be pointed to. The document introduces an RDF class and properties, these can be used to point to parts of a document in many ways, using either line and character of the source, or byte offsets, or more complicated pointers defined elsewhere such as XPointer, or CSS Selectors.
The RDF representation of the Pointer vocabulary defined by this document uses the namespace http://www.w3.org/WAI/ER/EARL/pointers#
The following (non-exhaustive) list of use cases aims to highlight some of the different usages of this vocabulary:
This section defines RDF the generic Pointer and PointerCollection classes.
The Pointer
class represents a pointer to some part of the document or web resource, it is a generic class, generally subClassed to be more specific.
The PointerCollection
class is a collection of pointers, all pointing to the same thing in the document, within the limits of the individual pointers.
The PointerCollection has many properties, in this document we define the following, but others appropriate to specific uses could be used:
pointer:xpointer
representing an XPointer [] to some part of an XML document, the XPointer is represented as an XML String.pointer:htmlpointer
representing an HTML Pointer to some part of an HTML document, an HTML Pointer is similar in syntax to an XPointer, however it works over HTML documents, the HTML Pointer is represented as an XML String.pointer:linecharlength
representing a line, a character and length to denote the range, the range of this property is the LineCharLengthPointer Class.pointer:xpath
representing an XPath expression identifying part of a document, the range of the property is an XPathPointer class.pointer:charsnippet
representing a character snippet from the document, and an offset into it, the range is a CharSnippetPointer.pointer:bytesnippet
representing a byte-based snippet from the document, and an offset into it, the range is a ByteSnippetPointer.pointer:selector
representing a CSS Selector to the content, the range is a string.Line/character and optionally the length of a region within the Test Subject.
It has the following properties:
pointer:line
representing the line in the document, this must be present.pointer:char
representing the character in the line identified by pointer:line
, this must be present.pointer:length
representing the length of the region, this is optionalA Pointer representing an XPath location into a document
It has the following properties:
pointer:expression
representing the XPath Expression, this must be present.pointer:namespace
representing a Namespace used in the XPath Expression, it's range is the pointer:Namespace
Class.A Namespace used in the XPath expression
It has the following properties:
pointer:prefix
representing the prefix used for the namespace in the XPath expression.pointer:namespaceURI
A namespace URI matching the prefix.A Pointer representing a character snippet and a location within it from the original document.
It has the following properties:
pointer:charContent
The character content from the original document.pointer:charOffset
The character offset within the snippet that is being identified.A Base64 encoded snippet from the original resource, and an offset within that, like the CharSnippetPointer Class but useful for byte based content, rather than character based..
It has the following properties:
pointer:byteContent
The byte content from the original document, a base64 encoded string.pointer:byteOffset
The byte offset within the snippet that is being identified.<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:owl="http://www.w3.org/2002/07/owl#"> <!--// GENERIC POINTER CLASS //--> <rdfs:Class rdf:about="http://www.w3.org/WAI/ER/EARL/pointers#Pointer"> <rdfs:label xml:lang="en">Pointer</rdfs:label> <rdfs:comment xml:lang="en">A pointer to a location within the Test Subject</rdfs:comment> </rdfs:Class> <rdf:Property rdf:about="http://www.w3.org/WAI/ER/EARL/pointers#instance"> <rdfs:label xml:lang="en">Instance Location</rdfs:label> <rdfs:comment xml:lang="en">An individual place where a result occurs within the Test Subject</rdfs:comment> <rdfs:domain rdf:resource="http://www.w3.org/WAI/ER/EARL/pointers#TestResult"/> <rdfs:range rdf:resource="http://www.w3.org/WAI/ER/EARL/pointers#PointerCollection"/> </rdf:Property> <!--// POINTER COLLECTION //--> <rdfs:Class rdf:about="http://www.w3.org/WAI/ER/EARL/pointers#PointerCollection"> <rdfs:label xml:lang="en">Pointer Collection</rdfs:label> <rdfs:comment xml:lang="en">A collection of pointers, all pointing to the same thing</rdfs:comment> <rdfs:subClassOf rdf:resource="http://www.w3.org/WAI/ER/EARL/pointers#Pointer"/> <!--// @@@ EDITORS' NOTE: Min/Max cardinality restrictions can be applied here //--> </rdfs:Class> <!--// SIMPLE POINTERS //--> <rdf:Property rdf:about="http://www.w3.org/WAI/ER/EARL/pointers#xpointer"> <rdfs:label xml:lang="en">XPointer</rdfs:label> <rdfs:comment xml:lang="en">XPointer expression pointing into the Test Subject</rdfs:comment> <rdfs:domain rdf:resource="http://www.w3.org/WAI/ER/EARL/pointers#PointerCollection"/> <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/> </rdf:Property> <rdf:Property rdf:about="http://www.w3.org/WAI/ER/EARL/pointers#htmlpointer"> <rdfs:label xml:lang="en">HTML Pointer</rdfs:label> <rdfs:comment xml:lang="en">HTML Pointer expression pointing into the Test Subject</rdfs:comment> <rdfs:domain rdf:resource="http://www.w3.org/WAI/ER/EARL/pointers#PointerCollection"/> <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/> </rdf:Property> <rdf:Property rdf:about="http://www.w3.org/WAI/ER/EARL/pointers#selectorpointer"> <rdfs:label xml:lang="en">CSS Selector Pointer</rdfs:label> <rdfs:comment xml:lang="en">CSS Selector pointing into the part of the document</rdfs:comment> <rdfs:domain rdf:resource="http://www.w3.org/WAI/ER/EARL/pointers#PointerCollection"/> <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/> </rdf:Property> <!--// LINE/CHAR/LENGTH POINTERS //--> <rdf:Property rdf:about="http://www.w3.org/WAI/ER/EARL/pointers#linecharlength"> <rdfs:label xml:lang="en">Line Char Length</rdfs:label> <rdfs:domain rdf:resource="http://www.w3.org/WAI/ER/EARL/pointers#PointerCollection"/> <rdfs:range rdf:resource="http://www.w3.org/WAI/ER/EARL/pointers#LineCharLengthPointer"/> </rdf:Property> <rdfs:Class rdf:about="http://www.w3.org/WAI/ER/EARL/pointers#LineCharLengthPointer"> <rdfs:label xml:lang="en">Line Char Length Pointer</rdfs:label> <rdfs:comment xml:lang="en">Line/character and optionally the length of a region within the Document</rdfs:comment> <rdfs:subClassOf rdf:resource="http://www.w3.org/WAI/ER/EARL/pointers#Pointer"/> <rdfs:subClassOf rdf:parseType="Collection"> <owl:Restriction> <owl:onProperty rdf:resource="http://www.w3.org/WAI/ER/EARL/pointers#line"/> <!--// @@@ EDITORS' NOTE: Min/Max cardinality restrictions have been commented out until a decision is made <owl:minCardinality rdf:datatype="http://www.w3.org/2001/XMLSchema#nonNegativeInteger">1</owl:minCardinality> <owl:maxCardinality rdf:datatype="http://www.w3.org/2001/XMLSchema#nonNegativeInteger">1</owl:maxCardinality> //--> </owl:Restriction> <owl:Restriction> <owl:onProperty rdf:resource="http://www.w3.org/WAI/ER/EARL/pointers#char"/> <!--// @@@ EDITORS' NOTE: Min/Max cardinality restrictions have been commented out until a decision is made <owl:minCardinality rdf:datatype="http://www.w3.org/2001/XMLSchema#nonNegativeInteger">1</owl:minCardinality> <owl:maxCardinality rdf:datatype="http://www.w3.org/2001/XMLSchema#nonNegativeInteger">1</owl:maxCardinality> //--> </owl:Restriction> <owl:Restriction> <owl:onProperty rdf:resource="http://www.w3.org/WAI/ER/EARL/pointers#length"/> <!--// @@@ EDITORS' NOTE: Min/Max cardinality restrictions have been commented out until a decision is made <owl:minCardinality rdf:datatype="http://www.w3.org/2001/XMLSchema#nonNegativeInteger">0</owl:minCardinality> <owl:maxCardinality rdf:datatype="http://www.w3.org/2001/XMLSchema#nonNegativeInteger">1</owl:maxCardinality> //--> </owl:Restriction> </rdfs:subClassOf> </rdfs:Class> <rdf:Property rdf:about="http://www.w3.org/WAI/ER/EARL/pointers#line"> <rdfs:label xml:lang="en">Line</rdfs:label> <rdfs:comment xml:lang="en">Line number within the Test Subject</rdfs:comment> <rdfs:domain rdf:resource="http://www.w3.org/WAI/ER/EARL/pointers#LineCharLength"/> <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#integer"/> </rdf:Property> <rdf:Property rdf:about="http://www.w3.org/WAI/ER/EARL/pointers#char"> <rdfs:label xml:lang="en">Char</rdfs:label> <rdfs:comment xml:lang="en">Char or column number within the Test Subject</rdfs:comment> <rdfs:domain rdf:resource="http://www.w3.org/WAI/ER/EARL/pointers#LineCharLength"/> <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#integer"/> </rdf:Property> <rdf:Property rdf:about="http://www.w3.org/WAI/ER/EARL/pointers#length"> <rdfs:label xml:lang="en">Length</rdfs:label> <rdfs:comment xml:lang="en">Length of a region within the Test Subject</rdfs:comment> <rdfs:domain rdf:resource="http://www.w3.org/WAI/ER/EARL/pointers#LineCharLength"/> <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#integer"/> </rdf:Property> <!--// XPath POINTERS //--> <rdf:Property rdf:about="http://www.w3.org/WAI/ER/EARL/pointers#xpath"> <rdfs:label xml:lang="en">XPath</rdfs:label> <rdfs:domain rdf:resource="http://www.w3.org/WAI/ER/EARL/pointers#PointerCollection"/> <rdfs:range rdf:resource="http://www.w3.org/WAI/ER/EARL/pointers#LineCharLengthPointer"/> </rdf:Property> <rdfs:Class rdf:about="http://www.w3.org/WAI/ER/EARL/pointers#XPathPointer"> <rdfs:label xml:lang="en">XPath Pointer</rdfs:label> <rdfs:comment xml:lang="en">XPath expression (including namespace) pointing into the Test Subject</rdfs:comment> <rdfs:subClassOf rdf:resource="http://www.w3.org/WAI/ER/EARL/pointers#Pointer"/> <rdfs:subClassOf rdf:parseType="Collection"> <owl:Restriction> <owl:onProperty rdf:resource="http://www.w3.org/WAI/ER/EARL/pointers#expression"/> <!--// @@@ EDITORS' NOTE: Min/Max cardinality restrictions have been commented out until a decision is made <owl:minCardinality rdf:datatype="http://www.w3.org/2001/XMLSchema#nonNegativeInteger">1</owl:minCardinality> <owl:maxCardinality rdf:datatype="http://www.w3.org/2001/XMLSchema#nonNegativeInteger">1</owl:maxCardinality> //--> </owl:Restriction> <owl:Restriction> <owl:onProperty rdf:resource="http://www.w3.org/WAI/ER/EARL/pointers#namespace"/> <!--// @@@ EDITORS' NOTE: Min/Max cardinality restrictions have been commented out until a decision is made <owl:minCardinality rdf:datatype="http://www.w3.org/2001/XMLSchema#nonNegativeInteger">0</owl:minCardinality> //--> </owl:Restriction> </rdfs:subClassOf> </rdfs:Class> <rdf:Property rdf:about="http://www.w3.org/WAI/ER/EARL/pointers#expression"> <rdfs:label xml:lang="en">Pointer Expression</rdfs:label> <rdfs:comment xml:lang="en">String based pointer expression such as HTML Pointer, XPointer, or XPath</rdfs:comment> <rdfs:domain rdf:resource="http://www.w3.org/WAI/ER/EARL/pointers#Pointer"/> <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/> </rdf:Property> <rdf:Property rdf:about="http://www.w3.org/WAI/ER/EARL/pointers#namespace"> <rdfs:label xml:lang="en">XPath Namespace</rdfs:label> <rdfs:comment xml:lang="en">A namespace used in a particular XPath expression</rdfs:comment> <rdfs:domain rdf:resource="http://www.w3.org/WAI/ER/EARL/pointers#XPath"/> <rdfs:range rdf:resource="http://www.w3.org/WAI/ER/EARL/pointers#Namespace"/> </rdf:Property> <rdfs:Class rdf:about="http://www.w3.org/WAI/ER/EARL/pointers#Namespace"> <rdfs:label xml:lang="en">Namespace</rdfs:label> <rdfs:comment xml:lang="en">Prefix and namespace URI for an XPath expression</rdfs:comment> <rdfs:subClassOf rdf:resource="http://www.w3.org/WAI/ER/EARL/pointers#Pointer"/> <rdfs:subClassOf rdf:parseType="Collection"> <owl:Restriction> <owl:onProperty rdf:resource="http://www.w3.org/WAI/ER/EARL/pointers#prefix"/> <!--// @@@ EDITORS' NOTE: Min/Max cardinality restrictions have been commented out until a decision is made <owl:minCardinality rdf:datatype="http://www.w3.org/2001/XMLSchema#nonNegativeInteger">1</owl:minCardinality> <owl:maxCardinality rdf:datatype="http://www.w3.org/2001/XMLSchema#nonNegativeInteger">1</owl:maxCardinality> //--> </owl:Restriction> <owl:Restriction> <owl:onProperty rdf:resource="http://www.w3.org/WAI/ER/EARL/pointers#namespaceURI"/> <!--// @@@ EDITORS' NOTE: Min/Max cardinality restrictions have been commented out until a decision is made <owl:minCardinality rdf:datatype="http://www.w3.org/2001/XMLSchema#nonNegativeInteger">1</owl:minCardinality> <owl:maxCardinality rdf:datatype="http://www.w3.org/2001/XMLSchema#nonNegativeInteger">1</owl:maxCardinality> //--> </owl:Restriction> </rdfs:subClassOf> </rdfs:Class> <rdf:Property rdf:about="http://www.w3.org/WAI/ER/EARL/pointers#prefix"> <rdfs:label xml:lang="en">Namespace Prefix</rdfs:label> <rdfs:comment xml:lang="en">A namespace prefix</rdfs:comment> <rdfs:domain rdf:resource="http://www.w3.org/WAI/ER/EARL/pointers#Namespace"/> <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/> </rdf:Property> <rdf:Property rdf:about="http://www.w3.org/WAI/ER/EARL/pointers#namespaceURI"> <rdfs:label xml:lang="en">Namespace URI</rdfs:label> <rdfs:comment xml:lang="en">A namespace URI</rdfs:comment> <rdfs:domain rdf:resource="http://www.w3.org/WAI/ER/EARL/pointers#Namespace"/> <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/> </rdf:Property> <!--// SNIPPET POINTERS //--> <rdf:Property rdf:about="http://www.w3.org/WAI/ER/EARL/pointers#charsnippet"> <rdfs:label xml:lang="en">Char Snippet</rdfs:label> <rdfs:domain rdf:resource="http://www.w3.org/WAI/ER/EARL/pointers#PointerCollection"/> <rdfs:range rdf:resource="http://www.w3.org/WAI/ER/EARL/pointers#CharSnippetPointer"/> </rdf:Property> <rdf:Property rdf:about="http://www.w3.org/WAI/ER/EARL/pointers#bytesnippet"> <rdfs:label xml:lang="en">Byte Snippet</rdfs:label> <rdfs:domain rdf:resource="http://www.w3.org/WAI/ER/EARL/pointers#PointerCollection"/> <rdfs:range rdf:resource="http://www.w3.org/WAI/ER/EARL/pointers#ByteSnippetPointer"/> </rdf:Property> <rdfs:Class rdf:about="http://www.w3.org/WAI/ER/EARL/pointers#CharSnippetPointer"> <rdfs:label xml:lang="en">Char Snippet Pointer</rdfs:label> <rdfs:comment xml:lang="en">Character based part of the Test Subject</rdfs:comment> <rdfs:subClassOf rdf:resource="http://www.w3.org/WAI/ER/EARL/pointers#Pointer"/> <rdfs:subClassOf rdf:parseType="Collection"> <owl:Restriction> <owl:onProperty rdf:resource="http://www.w3.org/WAI/ER/EARL/pointers#charContent"/> <!--// @@@ EDITORS' NOTE: Min/Max cardinality restrictions have been commented out until a decision is made <owl:minCardinality rdf:datatype="http://www.w3.org/2001/XMLSchema#nonNegativeInteger">0</owl:minCardinality> <owl:maxCardinality rdf:datatype="http://www.w3.org/2001/XMLSchema#nonNegativeInteger">1</owl:maxCardinality> //--> </owl:Restriction> <owl:Restriction> <owl:onProperty rdf:resource="http://www.w3.org/WAI/ER/EARL/pointers#charOffset"/> <!--// @@@ EDITORS' NOTE: Min/Max cardinality restrictions have been commented out until a decision is made <owl:minCardinality rdf:datatype="http://www.w3.org/2001/XMLSchema#nonNegativeInteger">0</owl:minCardinality> <owl:maxCardinality rdf:datatype="http://www.w3.org/2001/XMLSchema#nonNegativeInteger">1</owl:maxCardinality> //--> </owl:Restriction> </rdfs:subClassOf> </rdfs:Class> <rdf:Property rdf:about="http://www.w3.org/WAI/ER/EARL/pointers#charContent"> <rdfs:label xml:lang="en">Char Content</rdfs:label> <rdfs:comment xml:lang="en">Character content that is part of the Test Subject</rdfs:comment> <rdfs:domain rdf:resource="http://www.w3.org/WAI/ER/EARL/pointers#charSnippet"/> <!--// @@@ EDITORS' NOTE: range here could be a string or a parsed XML document... //--> </rdf:Property> <rdf:Property rdf:about="http://www.w3.org/WAI/ER/EARL/pointers#charOffset"> <rdfs:label xml:lang="en">Char Offset</rdfs:label> <rdfs:comment xml:lang="en">Number of characters into the Char Content</rdfs:comment> <rdfs:domain rdf:resource="http://www.w3.org/WAI/ER/EARL/pointers#charSnippet"/> <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#integer"/> </rdf:Property> <rdfs:Class rdf:about="http://www.w3.org/WAI/ER/EARL/pointers#ByteSnippetPointer"> <rdfs:label xml:lang="en">Byte Snippet Pointer</rdfs:label> <rdfs:comment xml:lang="en">Byte based part of the Test Subject (encoded in Base64)</rdfs:comment> <rdfs:subClassOf rdf:resource="http://www.w3.org/WAI/ER/EARL/pointers#Pointer"/> <rdfs:subClassOf rdf:parseType="Collection"> <owl:Restriction> <owl:onProperty rdf:resource="http://www.w3.org/WAI/ER/EARL/pointers#byteContent"/> <!--// @@@ EDITORS' NOTE: Min/Max cardinality restrictions have been commented out until a decision is made <owl:minCardinality rdf:datatype="http://www.w3.org/2001/XMLSchema#nonNegativeInteger">0</owl:minCardinality> <owl:maxCardinality rdf:datatype="http://www.w3.org/2001/XMLSchema#nonNegativeInteger">1</owl:maxCardinality> //--> </owl:Restriction> <owl:Restriction> <owl:onProperty rdf:resource="http://www.w3.org/WAI/ER/EARL/pointers#byteOffset"/> <!--// @@@ EDITORS' NOTE: Min/Max cardinality restrictions have been commented out until a decision is made <owl:minCardinality rdf:datatype="http://www.w3.org/2001/XMLSchema#nonNegativeInteger">0</owl:minCardinality> <owl:maxCardinality rdf:datatype="http://www.w3.org/2001/XMLSchema#nonNegativeInteger">1</owl:maxCardinality> //--> </owl:Restriction> </rdfs:subClassOf> </rdfs:Class> <rdf:Property rdf:about="http://www.w3.org/WAI/ER/EARL/pointers#byteContent"> <rdfs:label xml:lang="en">Byte Content</rdfs:label> <rdfs:comment xml:lang="en">Byte content that is part of the Test Subject (encoded in Base64)</rdfs:comment> <rdfs:domain rdf:resource="http://www.w3.org/WAI/ER/EARL/pointers#byteSnippet"/> <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/> </rdf:Property> <rdf:Property rdf:about="http://www.w3.org/WAI/ER/EARL/pointers#byteOffset"> <rdfs:label xml:lang="en">Byte Offset</rdfs:label> <rdfs:comment xml:lang="en">Number of bytes into the Byte Content</rdfs:comment> <rdfs:domain rdf:resource="http://www.w3.org/WAI/ER/EARL/pointers#byteSnippet"/> <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#integer"/> </rdf:Property> </rdf:RDF>