[contents]
The terms defined by this document are also provided in RDF Schema format.
Copyright © 2009 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C liability, trademark and document use rules apply.
This specification contains a framework for representing pointers - entities that permit identifying a portion or segment of a piece of content - making use of the Resource Description Framework (RDF). It also describes a number of specific types of pointers that permit portions of a document to be referred to in different ways. When referring to a specific part of, say, a piece of Web content, it is useful to be able to have a consistent manner by which to refer to a particular segment of a Web document, to have a variety of ways by which to refer to that same segment, and to make the reference robust in the face of changes to that document. This specification is part of the W3C Evaluation And Report Language (EARL) but can be reused in other contexts too.
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 29 October 2009 Working Draft of the Pointer Methods in RDF 1.0 vocabulary is an update of the previous Pointer Methods in RDF Working Draft of 10 March 2009 and it incorporates all comments received since the previous Working Draft. This document is part of the W3C Evaluation And Report Language (EARL) but can be reused in other contexts too. This document is intended to be published and maintained as a W3C Working Group Note after review and refinement.
The Evaluation and Repair Tools Working Group (ERT WG) believes to have addressed all issues brought forth through previous Working Draft iterations. The Working Group encourages feedback about this document, Pointer Methods in RDF 1.0, by developers and researchers who have interest in software-supported evaluation and validation of Web sites, and by developers and researchers who have interest in Semantic Web technologies for content description, annotation, and adaptation. In particular, feedback from the groups involved in the W3C Semantic Web Activity, especially the Semantic Web Coordination Group, the Semantic Web Deployment Working Group, the Semantic Web Interest Group, and the POWDER Working Group, would be greatly appreciated.
Please send comments on this Pointer Methods in RDF 1.0 document by 30 November 2009 to public-earl10-comments@w3.org (publicly visible mailing list archive).
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 has been produced by the Evaluation and Repair Tools Working Group (ERT WG) as part of the Web Accessibility Initiative (WAI) Technical Activity.
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 specification introduces a vocabulary constructed using the Resource Description Framework (RDF), to enable certain parts within a document, particularly HTML and XML documents, to be pointed to in an accurate way. The document introduces a series of RDF classes and properties that can be used to point to parts of a document in different ways.
Note that some pointers may be more appropriated to operate on the character or byte serialization of the resources and others for structured documents, such as XML documents, where character or byte based pointing mechanisms may be considered a bad practice.
The namespace for Pointer Methods in RDF as specified in this draft is http://www.w3.org/2009/pointers# and uses the ptr prefix. Other namespaces typically used by Pointer Methods in RDF include the following:
cnthttp://www.w3.org/2008/content# described in [Content]rdfhttp://www.w3.org/1999/02/22-rdf-syntax-ns# described in [RDF]rdfshttp://www.w3.org/2000/01/rdf-schema# described in [RDFS]The keywords must, required, recommended, should, may, and optional are used in accordance with [RFC 2119].
One motivation for this vocabulary stems from methods for reporting test results such as the Evaluation and Report Language (EARL) [EARL] but this need not be its only application. Other typical applications could include:
This list is not meant to be exhaustive. This vocabulary is extensible, providing for alternative or enhanced methods for referring to portions of content and for referring to a variety of content types.
Pointer Methods in RDF is defined as an RDF vocabulary. The Resource Description Framework (RDF) is a general-purpose language for describing information in a way that is machine-understandable. The examples will be serialized with the abbreviated RDF/XML notation.
This document assumes the following background knowledge:
Pointer - a method that could be used to point out different parts of electronic documents. It is an abstract class which is intended to be subclassed into more specific ones, and every other type of pointer must be a ptr:Pointer subclass.
This abstract class can not be used directly, one of the more specific refinements contained in this document must be used instead.
Properties defined by this document:
Pointers Group - a generic container for a group of pointers without any specific relationship between them.
Properties defined by this document:
While the generic PointersGroup class can be used directly, one of the following more specific refinements should be used instead to provide more information about the existing relationship between the group members:
ptr:RelatedPointersptr:EquivalentPointersRelated Pointers - a group of pointers to be grouped together for some purpose, indicating that the group members (presumably pointing to different parts of the document) have some relationship because they have a meaning as a whole. This is a subclass of the PointersGroup class
Properties defined by this document:
Example 1: A group of related pointers.
<ptr:RelatedPointers rdf:about="#relatedGroup"> <ptr:groupPointer rdf:resource="#relatedPointer1"/> <ptr:groupPointer rdf:resource="#relatedPointer2"/> ... </ptr:RelatedPointers>
Equivalent Pointers - a group of pointers that point simultaneously to the same part of the document, so that they can be considered equivalent. Put another way, each pointer in a set of pointers that are identified as equivalent must identify or pick out the same piece of content. This is a subclass of the PointersGroup class
In order to achieve the maximum level of flexibility and interoperability, it is recommended to provide as much equivalent pointers as possible for any case.
Properties defined by this document:
Example 2: A series of equivalent pointers.
<ptr:EquivalentPointers rdf:about="#equivalentGroup"> <ptr:groupPointer rdf:resource="#equivalentPointer1"/> <ptr:groupPointer rdf:resource="#equivalentPointer2"/> <ptr:groupPointer rdf:resource="#equivalentPointer3"/> ... </ptr:EquivalentPointers>
Single Pointer - a pointing method made up of a unique pointer. This is an abstract single pointer that provides the necessary framework, but it does not provide any kind of pointer, so more specific subclasses must be used.
Properties defined by this document:
This vocabulary already provides several subclasses that refine the SinglePointer class in relation to the way the pointer is defined.
ptr:ExpressionPointerptr:OffsetPointerptr:LineCharPointerExpression Pointer - a single pointer that makes use of expression languages to point out parts of a document. This is a generic expression pointer that could be subclassed for extensibility, more specific subclasses should be used where suitable.
Properties defined by this document:
This vocabulary already provides several subclasses of the ExpressionPointer class depending on the language that is used to define the pointer expression.
ptr:XPathPointerptr:CSSSelectorPointerXPath Pointer - An expression pointer that makes use of XPath [XPath] expressions to point out parts of a document.
Properties defined by this document:
ptr:NamespaceMappingptr:XPointerPointerExample 3: An XPathPointer resource with namespace reference.
<ptr:XPathPointer rdf:about="#xPathPointer"> <ptr:version>2.0</ptr:version> <ptr:expression>/html/body/div[@id='header']/img[1]</ptr:expression> <ptr:reference rdf:resource="http://example.org/doc1.html"/> <ptr:namespace rdf:resource="#NamespaceMapping1"/> </ptr:XPathPointer>
Namespace Mapping - an XML namespace mapping as defined by [Namespaces].
[Editor's note: This class has been renamed from XMLNamespace to NamespaceMapping to avoid the use of XML reserved strings http://www.w3.org/TR/xml/#dt-name. Feedback on the properness of the new denomination is welcome.]
Properties defined by this document:
Example 4: A NamespaceMapping resource indicating prefix and name.
<ptr:NamespaceMapping rdf:about="#NamespaceMapping1"> <ptr:prefix>eg</ptr:prefix> <ptr:namespaceName>http://example.org/ns/</ptr:namespaceName> </ptr:NamespaceMapping>
XPointer Pointer - an expression pointer that makes use of xpointer() scheme [XPointer-SCH] expressions to point out parts of a document.
Properties defined by this document:
Example 5: An XPointerPointer resource.
<ptr:XPointerPointer rdf:about="#xPointerPointer"> <ptr:expression>string-range(//P,"Thomas Pynchon")[3],"P",1,0)</ptr:expression> <ptr:reference rdf:resource="http://example.org/doc1.html"/> </ptr:XPointerPointer>
CSS Selector Pointer - an expression pointer that points out parts of a document by means of a CSS expression.
Properties defined by this document:
Example 6: A CSSSelector resource with version information.
<ptr:CSSSelectorPointer rdf:about="#cssSelectorPointer"> <ptr:reference rdf:resource="http://example.org/doc1.html"/> <ptr:expression>body > p#important</ptr:expression> <ptr:version>2.1</ptr:version> </ptr:CSSSelectorPointer>
Offset Pointer - a single pointer that points out parts of a document by means of an offset number counting from the start of the reference.
Properties defined by this document:
While the generic OffsetPointer class can be used directly, one of the following more specific refinements should be used instead to provide more information about the type of offset that is being used.
ptr:CharOffsetPointerptr:ByteOffsetPointerChar Offset Pointer - a single pointer that points out parts of a document by means of a character offset from the start of the reference.
Properties defined by this document:
Example 7: A CharOffsetPointer resource.
<ptr:CharOffsetPointer rdf:about="#charOffsetPointer"> <ptr:reference rdf:resource="http://example.org/doc1.html"/> <ptr:offset>335</ptr:offset> </ptr:CharOffsetPointer>
Byte Offset Pointer - a single pointer that points out parts of a document by means of a byte offset from the start of the reference.
Properties defined by this document:
Example 8: A ByteOffsetPointer resource.
<ptr:ByteOffsetPointer rdf:about="#byteOffsetPointer"> <ptr:reference rdf:resource="http://example.org/doc1.html"/> <ptr:offset>52</ptr:offset> </ptr:ByteOffsetPointer>
Line Char Pointer - a single pointer that points out parts of a document by means of the line number and character position where the target is localized.
Properties defined by this document:
Example 9: A LineCharPointer resource.
<ptr:LineCharPointer rdf:about="#lineCharPointer"> <ptr:reference rdf:resource="http://example.org/doc1.html"/> <ptr:lineNumber>5</ptr:lineNumber> <ptr:charNumber>18</ptr:charNumber> </ptr:LineCharPointer>
Compound Pointer - a pointing method made up of a pair of pointers that identify a well defined section within a document delimited by a begin and an end.
This is an abstract compound pointer that provides the necessary framework, but it does not constitute a complete compound pointer, as it only defines the start point of the section. One of the more specific subclasses must be used instead.
Properties defined by this document:
ptr:StartEndPointerptr:CharSnippetCompoundPointerptr:CharOffsetCompoundPointerptr:ByteSnippetCompoundPointerptr:ByteOffsetCompoundPointerStart End Pointer - a compound pointer pointing out parts of a document by means of a range delimited by a pair of single pointers that define the start point and the end point.
Properties defined by this document:
Example 10: A StartEndPointer resource making use of the CharOffsetPointer from example 7 and the LineCharPointer from example 9.
<ptr:StartEndPointer rdf:about="#startEndPointer"> <ptr:startPointer rdf:resource="#lineCharPointer"/> <ptr:endPointer rdf:resource="#charOffsetPointer"/> </ptr:StartEndPointer>
Char Snippet Compound Pointer - a compound pointer pointing out parts of a document by means of a range delimited by a single pointer that defines the start point and a character snippet from there.
Properties defined by this document:
Properties not defined by this document:
cnt:chars 
Example 11: A CharSnippetCompoundPointer resource.
<ptr:CharSnippetCompoundPointer rdf:about="#charSnippetCompoundPointer"> <ptr:startPointer rdf:resource="#charOffsetPointer"/> <cnt:chars><p>Some text.</p></cnt:chars> </ptr:CharSnippetCompoundPointer>
Char Offset Compound Pointer - a compound pointer pointing out parts of a document by means of a range delimited by a single pointer that defines the start point and a character offset from there.
Properties defined by this document:
Example 12: A CharOffsetCompoundPointer resource.
<ptr:CharOffsetCompoundPointer rdf:about="#charOffsetCompoundPointer"> <ptr:startPointer rdf:resource="#XPathPointer"/> <ptr:charOffset>55</ptr:charOffset> </ptr:CharOffsetCompoundPointer>
Byte Snippet Compound Pointer - a compound pointer pointing out parts of a document by means of a range delimited by a single pointer that defines the start point and a byte snippet from there.
Properties defined by this document:
Properties not defined by this document:
cnt:bytes 
Example 13: A ByteSnippetCompoundPointer resource.
<ptr:ByteSnippetCompoundPointer rdf:about="#byteSnippetCompoundPointer">
<ptr:startPointer rdf:resource="#byteOffsetPointer"/>
<cnt:bytes>R0lGODlhtQAxAOYAAKynpv3t4v3j1P/59ZuXlveYZ/vDovvMsfBbGWRiYf7+{...}</cnt:bytes>
</ptr:ByteSnippetCompoundPointer>
Byte Offset Compound Pointer - a compound pointer pointing out parts of a document by means of a range delimited by a single pointer that defines the start point and a byte offset from there.
Properties defined by this document:
Example 14: A ByteOffsetCompoundPointer resource.
<ptr:ByteOffsetCompoundPointer rdf:about="#byteOffsetCompoundPointer"> <ptr:startPointer rdf:resource="#byteOffsetPointer"/> <ptr:byteOffset>255</ptr:byteOffset> </ptr:ByteOffsetCompoundPointer>
A reference to a specific pointer.
A PointersGroup will have one groupPointer property per each of the pointers it contains. As any group of pointers must have one or more pointers, instances of the PointersGroup class must have at least one instance of the groupPointer property.
ptr:PointersGroupptr:PointerThe document within which the pointer is applicable or meaningful.
A SinglePointer must have exactly one reference.
ptr:SinglePointerThe language expression used as pointer.
An ExpressionPointer must have exactly one expression.
ptr:ExpressionPointerThe language version used in the pointer expression.
An ExpressionPointer must have at most one version.
ptr:ExpressionPointerThe namespace within an XPath expression operates.
ptr:XPathPointerptr:NamespaceMappingAssociates element and attribute names with a namespace URI.
An NamespaceMapping must have exactly one prefix
ptr:NamespaceMappingIdentifies the namespace.
A NamespaceMapping must have exactly one namespace
ptr:NamespaceMappingThe target position counting from the start of the referenced document. The count will start at one in each document.
An OffsetPointer must have exactly one offset
ptr:OffsetPointerThe line number where the target is localized. The line count will start at one in each document.
A LineCharPointer must have exactly one lineNumber.
ptr:LineCharPointerThe character number where the target is localized within a line. The character count will start at one in each line.
A LineCharPointer must have at most one charNumber.
ptr:LineCharPointerReference to the pointer that defines the beginning point for a range.
A CompoundPointer must have exactly one startPointer.
ptr:CompoundPointerptr:SinglePointerReference to the pointer that defines the end point for a range.
A StartEndPointer must have exactly one endPointer.
ptr:StartEndPointerptr:SinglePointerThe position of the end of a range from a startPointer, expressed by the number of characters that conform the range, and being the first character of the range that one indicated by the startPointer.
A CharOffsetCompoundPointer must have exactly one charOffset.
ptr:CharOffsetCompoundPointerThe position of the end of a range from a startPointer, expressed by the number of bytes that conform the range, and being the first byte of the range that one indicated by the startPointer.
A ByteOffsetCompoundPointer must have exactly one byteOffset.
ptr:ByteOffsetCompoundPointerThe following terms are defined by this specification:
| Class name | Label | Suggested types | Required properties | Optional properties |
|---|---|---|---|---|
ptr:ByteOffsetPointer |
Byte Offset Pointer | ptr:offset, ptr:reference |
||
ptr:ByteOffsetCompoundPointer |
Byte Offset Compound Pointer | ptr:byteOffset, ptr:startPointer |
||
ptr:ByteSnippetCompoundPointer |
Byte Snippet Compound Pointer | cnt:bytes ptr:startPointer |
||
ptr:CharOffsetPointer |
Char Offset Pointer | ptr:offset, ptr:reference |
||
ptr:CharOffsetCompoundPointer |
Char Offset Compound Pointer | ptr:charOffset, ptr:startPointer |
||
ptr:CharSnippetCompoundPointer |
Char Snippet Compound Pointer | cnt:chars ptr:startPointer |
||
ptr:CSSSelectorPointer |
CSS selector Pointer | ptr:expression, ptr:reference |
ptr:version |
|
ptr:EquivalentPointers |
Equivalent Pointers | ptr:groupPointer |
||
ptr:ExpressionPointer |
Expression Pointer | ptr:CSSSelectorPointer, ptr:XPathPointer, ptr:XPointerPointer | ptr:expression, ptr:reference |
ptr:version |
ptr:LineCharPointer |
Line-Char Pointer | ptr:lineNumber, ptr:reference |
ptr:charNumber |
|
ptr:NamespaceMapping |
NamespaceMapping | ptr:namespaceURI, ptr:prefix |
||
ptr:OffsetPointer |
Offset Pointer | ptr:ByteOffsetPointer, ptr:CharOffsetPointer | ptr:offset |
|
ptr:Pointer |
Pointer | ptr:PointersGroup, ptr:CompoundPointer, ptr:SinglePointer | ||
ptr:PointersGroup |
Pointers Group | ptr:EquivalentPointers, ptr:RelatedPointers | ptr:groupPointer |
|
ptr:CompoundPointer |
Compound Pointer | ptr:StartEndPointer, ptr:CharSnippetCompoundPointer, ptr:CharOffsetCompoundPointer, ptr:ByteSnippetCompoundPointer, ptr:ByteOffsetCompoundPointer | ptr:startPointer |
|
ptr:RelatedPointers |
Related Pointers | ptr:groupPointer |
||
ptr:SinglePointer |
Single Pointer | ptr:OffsetPointer, ptr:ExpressionPointer, ptr:LineCharPointer, | ptr:reference |
|
ptr:StartEndPointer |
Start-End Pointer | ptr:endPointer, ptr:startPointer |
||
ptr:XPathPointer |
XPath Pointer | ptr:expression, ptr:reference |
ptr:namespace, ptr:version |
|
ptr:XPointerPointer |
XPointer Pointer | ptr:expression, ptr:reference |
ptr:namespace, ptr:version |
| Property name | Label | Domain | Range | Restriction |
|---|---|---|---|---|
ptr:byteOffset |
char offset | ptr:ByteOffsetCompoundPointer |
Positive Integer | Exactly one per ptr:ByteOffsetCompoundPointer |
ptr:charNumber |
char number | ptr:LineCharPointer |
Positive Integer | At most one per ptr:LineCharPointer |
ptr:charOffset |
char offset | ptr:CharOffsetCompoundPointer |
Positive Integer | Exactly one per ptr:CharOffsetCompoundPointer |
ptr:endPointer |
end pointer | ptr:StartEndPointer |
ptr:SinglePointer |
Exactly one per ptr:StartEndPointer |
ptr:expression |
expression | ptr:ExpressionPointer |
Literal | Exactly one per ptr:ExpressionPointer |
ptr:lineNumber |
line number | ptr:LineCharPointer |
Positive Integer | Exactly one per ptr:LineCharPointer |
ptr:namespace |
namespace | ptr:XPathPointer |
ptr:namespaceMapping |
|
ptr:namespaceURI |
namespace URI | ptr:NamespaceMapping |
Exactly one per ptr:NamespaceMapping |
|
ptr:offset |
offset | ptr:OffsetPointer |
Positive Integer | Exactly one per ptr:OffsetPointer and ptr:StartOffsetPointer |
ptr:groupPointer |
group pointer | ptr:PointersGroup |
ptr:Pointer |
At least one per ptr:PointerGroup |
ptr:prefix |
prefix | ptr:NamespaceMapping |
Literal | Exactly one per ptr:NamespaceMapping |
ptr:reference |
reference | ptr:SinglePointer |
Exactly one per ptr:SinglePointer |
|
ptr:startPointer |
start pointer | ptr:CompoundPointer |
ptr:SinglePointer |
Exactly one per ptr:CompoundPointer |
ptr:version |
version | ptr:ExpressionPointer |
Literal | At most one per ptr:ExpressionPointer |
http://www.w3.org/WAI/ER/Content/WD-Content-in-RDF-20080327http://www.w3.org/TR/2007/WD-EARL10-Schema-20070323/http://www.w3.org/TR/2006/REC-xml-names11-20060816http://www.w3.org/TR/2004/REC-rdf-syntax-grammar-20040210/http://www.w3.org/TR/rdf-primer/http://www.w3.org/TR/rdf-schema/http://www.w3.org/DesignIssues/RDF-XMLhttp://www.ietf.org/rfc/rfc2119.txthttp://www.w3.org/TR/xml/http://www.w3.org/TR/1999/REC-xpath-19991116http://www.w3.org/TR/2002/WD-xptr-xpointer-20021219/Contributors to this Working Draft: Shadi Abou-Zahra, Sandor Herramhof, Carlos Iglesias, Nick Kew, Johannes Koch, Jim Ley, Charles McCathieNevile, Chris Ridpath, Christophe Strobbe, Michael Squillace and Carlos Velasco.
In addition to several editorial changes, the following is a list of substantial changes since 10 March, 2009 Working Draft: