Abstract

Web content, including XML and HTML documents on the web, have usually a structure that allows identifying parts of the document in many ways. When wanting to point to a specific part of a document, it is useful to be able to make it robust in the face of changes, this way the report of many errors would still be valid as other errors are repaired. This document will contain a framework for representing pointers making use of the Resource Description Framework (RDF), and a number of pointers themselves.

Status of this document

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/.

[Editor's note: describe intent of this working draft and propose feedback questions]

Please send comments to the mailing list of the ERT WG. The archives for this list are publicly available.

This is an Editor's draft of the Pointers Vocabulary in RDF. 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. 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 has been produced by the Evaluation and Repair Tools Working Group as part of the WAI Technical Activity.


Table of Contents

  1. Introduction
  2. Pointers Vocabulary

Appendices

  1. Schema in RDF/XML
  2. Vocabulary Terms
  3. Document Changes
  4. References
  5. Contributors

1. Introduction

This document introduces an RDF vocabulary to enable elements 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.

1.1. Namespaces

The namespace for Pointer Methods in RDF as specified in this draft is http://www.w3.org/2008/pointers# [Editor's note: final namespace decision pending] and uses the ptr prefix. Other namespaces typically used by Pointer Methods in RDF include the following:

cnt
The Representing Content in RDF namespace http://www.w3.org/2007/content# described in [Content]
owl
The OWL namespace http://www.w3.org/2002/07/owl# described in [OWL]
rdf
The RDF namespace http://www.w3.org/1999/02/22-rdf-syntax-ns# described in [RDF]
rdfs
The RDF Schema namespace http://www.w3.org/2000/01/rdf-schema# described in [RDFS]

1.2. Document conventions

The keywords must, required, recommended, should, may, and optional are used in accordance with [RFC2119].

1.3. Use cases

This framework is designed in an open way to facilitate different implementation scenarios and extensibility. The origin of the application comes from vocabularies describing testing scenarios like the Evaluation and Report Language (EARL) [EARL]. Typical applications could be: [Editor's note: need to be completed]

This list is not exclusive.

1.4. Pre-requisites

Pointer Methods in RDF are 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:

2. Pointers Vocabulary

In this section a description of the purpose of all classes and properties included in this vocabulary is presented.

2.1. Pointer Class

The Pointer class is a generic abstract class which is generally intended to be subclassed into more specific ones. A resource of type Pointer represents any pointer method that could be used to point out different elements within documents. Every other type of pointer will be a Pointer subclass, and it is always recommended to use more specific subclasses where suitable.

2.2. PointersGroup Class

Represents a generic container for a group of pointers without any specific relationship between them. There are two subclasses from the PointersGroup class, each of them devoted to an specific kind of relationship between the pointers they contain: RelatedPointers and EquivalentPointers.

The following property must be included in resources of type PointersGroup.

pointer
A PointersGroup will have one pointer 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 pointer property.
<ptr:PointersGroup rdf:about="#group">
  <ptr:pointer rdf:resource="#pointer1"/>
  <ptr:pointer rdf:resource="#pointer2"/>
  ...
</ptr:PointersGroup>

2.2.1. RelatedPointers Class

This is a subclass of the PointersGroup class and represents a group of related pointers you use together for some purpose, that means a group of pointers that point to different elements at different places, but that have some relationship because they have a meaning as a whole.

<ptr:RelatedPointers rdf:about="#relatedGroup">
  <ptr:pointer rdf:resource="#relatedPointer1"/>
  <ptr:pointer rdf:resource="#relatedPointer2"/>
  ...
</ptr:RelatedPointers>

2.2.2. EquivalentPointers Class

This PointersGroup subclass represents a group of pointers that point simoultaneously to the same element at the same place, so they can be considered equivalents.

In order to achieve as much flexibility and interoperability as possible, people is encouraged to provide the biggest number of equivalent pointers that is possible for any element.

<ptr:EquivalentPointers rdf:about="#equivalentGroup">
  <ptr:pointer rdf:resource="#equivalentPointer1"/>
  <ptr:pointer rdf:resource="#equivalentPointer2"/>
  ...
</ptr:EquivalentPointers>

2.3. SinglePointer Class

A SinglePointer is a pointer that is intended to point to a unique element within a document. This is a generic single pointer that could be subclassed for extensibility and it is always recommended to use more specific subclasses where suitable. The vocabulary already provides several subclasses from the SinglePointer class depending on the way the pointer is defined.

The following property must be included in resources of type SinglePointer.

reference
A SinglePointer will have exactly one reference indicating the document scope within the pointer is applicable.
<ptr:SinglePointer rdf:about="#singlePointer">
  <ptr:reference rdf:resource="http://example.org/doc1.html"/>
</ptr:SinglePointer>

2.3.1. ExpressionPointer Class

An ExpressionPointer is a single pointer that makes use of different language expressions to point out elements in a document. This is a generic expression pointer that could be subclassed for extensibility and it is always recommended to use more specific subclasses where suitable. This vocabulary already provides several subclasses from the ExpressionPointer class depending on the language that is used to define the pointer.

[Editor's note: some of the single pointers (e.g. XPointer or CSS pointers) can be used to point to more that one element simultaneously in spite of not been intended to do so. Need to see how this could affect to the overall model; at least we should include a note about potential ambiguity]

The following property must be included in resources of type ExpressionPointer.

expression
An ExpressionPointer will have exactly one expression property containing the language expression used as pointer.

The following property may be included in resources of type ExpressionPointer.

version
An ExpressionPointer will have exactly one version property to indicate the language version used in the pointer expression when necessary.
<ptr:XPathPointer rdf:about="#xPathPointer">
  <ptr:version>x.y</ptr:version>
  <ptr:expression>some expression</ptr:expression>
  <ptr:reference rdf:resource="http://example.org/doc1.html"/> 
</ptr:XPathPointer>
2.3.1.1. XPathPointer Class

An XPathPointer is an expression pointer that makes use of XPath [XPath] expressions to point out elements in a document.

The following property may be included in resources of type XPathPointer.

namespace
This property may be used when necessary to indicate the namespace within the xPath expression operates. [Editor's note: Need to decide if the namespace class definition belongs to the Pointers Methods document]
<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="#nameSpace1"/>
</ptr:XPathPointer>
2.3.1.2. XPointerPointer Class

An XPointerPointer is an expression pointer that makes use of XPointer Framework [XPointer-FRM] expressions to point out elements in a document.

[Editor's note: It is not clear now how to handle namespaces

<ptr:XPointerPointer rdf:about="#xPointerPointer">
  <ptr:expression>/html/body/div[@id='header"]/img[position()=1]</ptr:expression>
  <ptr:reference rdf:resource="http://example.org/doc1.html"/>  
</ptr:XPointerPointer>
2.3.1.3. CSSSelectorPointer Class

A CSSSelectorPointer is an expression pointer that point out elements in a document by means of a CSS expression.

<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>

2.3.2. OffsetPointer Class

An OffsetPointer is a single pointer that point out elements in a document by means of an offset number counting from the start of the reference. This is a generic offset pointer that could be subclassed for extensibility and it is always recommended to use more specific subclasses.

The following property must be included in resources of type OffsetPointer.

offset
An OffsetPointer will have exactly one offset property containing the position of the element counting from the start of the referenced document. The count will start at one in each document.
<ptr:OffsetPointer rdf:about="#offsetPointer">
  <ptr:reference rdf:resource="http://example.org/doc1.html"/>  
  <ptr:offset>33</ptr:offset> 
</ptr:OffsetPointer>
2.3.2.1. CharOffsetPointer Class

An CharOffsetPointer is a single pointer that point out elements in a document by means of a character offset from the start of the reference.

<ptr:CharOffsetPointer rdf:about="#charOffsetPointer">
  <ptr:reference rdf:resource="http://example.org/doc1.html"/>  
  <ptr:offset>335</ptr:offset> 
</ptr:CharOffsetPointer>
2.3.2.2. ByteOffsetPointer Class

An ByteOffsetPointer is a single pointer that point out elements in a document by means of a byte offset from the start of the reference.

<ptr:ByteOffsetPointer rdf:about="#byteOffsetPointer">
  <ptr:reference rdf:resource="http://example.org/doc1.html"/>  
  <ptr:offset>52</ptr:offset> 
</ptr:ByteOffsetPointer>

2.3.3. LineCharPointer Class

A LicheCharPointer is a single pointer that point out elements in a document by means of the line number and character position where the element is localized.

The following properties must be included in resources of type LineCharPointer.

lineNumber
A LineCharPointer will have exactly one lineNumber property containing the line number where the element is localized. The line count will start at one in each document.
charNumber
A LineCharPointer will have exactly one charNumber property containing the character number where the element is localized within the line. The character count will start at one in each line.
<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>

2.3.4. HTMLPointer Class

[Editor's note: This is currently just a placeholder until we decide how to advance on this.]

An HTMLPointer is a single pointer that point out elements in a document by means of a fuzzy pointer specially intended for not well-formed (x)html.

The following property must be included in resources of type CSSSelectorPointer.

htmlPointer
An HTMLPointer pointer will have exactly one htmlPointer property containing the expression that is used to point to.
<ptr:HTMLPointer rdf:about="#htmlPointer">
  <ptr:reference rdf:resource="http://example.org/doc1.html"/>  
  <ptr:htmlPointer>h3[5]</ptr:htmlPointer/>   
</ptr:HTMLPointer>

2.4. RangePointer Class

A RangePointer is a pointer pointing to a range that identifies a well defined section within a document. This is a generic range pointer that could be subclassed for extensibility and it is always recommended to use more specific subclasses where suitable. The vocabulary already provides several subclasses from the RangePointer class depending on the way the range is expressed.

The following property must be included in resources of type RangePointer.

startPointer
A RangePointer will have exactly one startPointer property with the pointer that defines the beginning point for the range.
<ptr:RangePointer rdf:about="#rangePointer"/>
  <ptr:startPointer rdf:resource="#lineCharPointer"/>   
</ptr:RangePointer>

2.4.1. StartEndPointer Class

A StartEndPointer is a range pointer that point out elements in a document by means of a range delimited by a start point and an end point.

The following property must be included in resources of type StartEndPointer.

endPointer
A StartEndPointer will have exactly one endPointer property with the pointer that defines the end point for the range.
<ptr:StartEndPointer rdf:about="#startEndPointer">
  <ptr:startPointer rdf:resource="#lineCharPointer"/>   
  <ptr:endPointer rdf:resource="#charOffsetPointer"/>   
</ptr:StartEndPointer>

2.4.2. CharSnippetRangePointer Class

A CharSnippetRangePointer is a range pointer that point out elements in a document by means of a range delimited by a start point and a character snippet from there.

The following property must be included in resources of type CharSnippetRangePointer.

cnt:chars
A CharSnippetRangePointer will have exactly one cnt:chars containing the character string for the snippet.

The position of the first character in the snippet will be defined by the inherited startPointer property.

<ptr:CharSnippetRangePointer rdf:about="#charSnippetRangePointer">
  <ptr:startPointer rdf:resource="#lineCharPointer"/>   
  <cnt:chars>&lt;p&gt;Some text.&lt;/p&gt;</cnt:chars>   
</ptr:CharSnippetRangePointer>

2.4.3. CharOffsetRangePointer Class

A CharOffsetRangePointer is a range pointer that point out elements in a document by means of a range delimited by a start point and a character offset from there.

The following property must be included in resources of type CharOffsetRangePointer.

charOffset
A CharOffsetRangePointer will have exactly one charOffset containing the position of the end of the range from the 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.
<ptr:CharOffsetRangePointer rdf:about="#charOffsetRangePointer">
  <ptr:startPointer rdf:resource="#lineCharPointer"/>   
  <ptr:charOffset>55</ptr:charOffset>   
</ptr:CharOffsetRangePointer>

2.4.4. ByteSnippetRangePointer Class

A ByteSnippetRangePointer is a range pointer that point out elements in a document by means of a range delimited by a start point and a byte snippet from there.

The following property must be included in resources of type ByteSnippetRangePointer.

cnt:bytes
A ByteSnippetRangePointer will have exactly one cnt:bytes containing the Base64 encoded byte sequence for the snippet.

The position of the first byte in the snippet will be defined by the inherited startPointer property.

<ptr:ByteSnippetRangePointer rdf:about="#byteSnippetRangePointer">
  <ptr:startPointer rdf:resource="#byteOffsetPointer"/>   
  <cnt:bytes>R0lGODlhtQAxAOYAAKynpv3t4v3j1P/59ZuXlveYZ/vDovvMsfBbGWRiYf7+{...}</cnt:bytes>   
</ptr:ByteSnippetRangePointer>

2.4.5. ByteOffsetRangePointer Class

A ByteOffsetRangePointer is a range pointer that point out elements in a document by means of a range delimited by a start point and a byte offset from there.

The following property must be included in resources of type ByteOffsetRangePointer.

byteOffset
A ByteOffsetRangePointer will have exactly one byteOffset containing the position of the end of the range from the 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.
<ptr:ByteOffsetRangePointer rdf:about="#byteOffsetRangePointer"> 
  <ptr:startPointer rdf:resource="#byteOffsetPointer"/>   
  <ptr:byteOffset>255</ptr:charOffset>   
</ptr:ByteOffsetRangePointer>

Appendix A: Schema in RDF/XML


<?xml version="1.0"?>
<rdf:RDF xmlns:owl="http://www.w3.org/2002/07/owl#" 
         xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 
         xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
         
  <!-- Generic Pointer class -->
  <rdfs:Class rdf:about="#Pointer">
    <rdfs:label xml:lang="en">Pointer</rdfs:label>
    <rdfs:comment xml:lang="en">Generic abstract Pointer that could be subclassed for extensibility.</rdfs:comment>
  </rdfs:Class>
  
  <!-- Pointers Group class -->
  <rdfs:Class rdf:about="#PointersGroup">
    <rdfs:label xml:lang="en">Pointers Group</rdfs:label>
    <rdfs:comment xml:lang="en">Generic abstract group of Pointers</rdfs:comment>
    <rdfs:subClassOf rdf:resource="#Pointer"/>
  </rdfs:Class>
  
  <rdf:Property rdf:about="#pointer">
    <rdfs:label xml:lang="en">pointer</rdfs:label>
    <rdfs:comment xml:lang="en">A Pointer that is part of a Group</rdfs:comment>
    <rdfs:domain rdf:resource="#Pointer"/>
    <rdfs:range rdf:resource="#PointersGroup"/>
  </rdf:Property>
  
  <!-- Related Pointers class -->
  <rdfs:Class rdf:about="#RelatedPointers">
    <rdfs:label xml:lang="en">Related Pointers</rdfs:label>
    <rdfs:comment xml:lang="en">Group of related pointers you use together for some purpose.</rdfs:comment>
    <rdfs:subClassOf rdf:resource="#PointersGroup"/>
  </rdfs:Class>
  
  <!-- Equivalent Pointers class -->
  <rdfs:Class rdf:about="#EquivalentPointers">
    <rdfs:label xml:lang="en">Equivalent Pointers</rdfs:label>
    <rdfs:comment xml:lang="en">Group of equivalent pointers that point to the same places.</rdfs:comment>
    <rdfs:subClassOf rdf:resource="#PointersGroup"/>
  </rdfs:Class>
  
  <!-- Single Pointer class -->
  <rdfs:Class rdf:about="#SinglePointer">
    <rdfs:label xml:lang="en">Single Pointer</rdfs:label>
    <rdfs:comment xml:lang="en">Generic abstract single pointer to a single point that could be subclassed for extensibility.</rdfs:comment>
    <rdfs:subClassOf rdf:resource="#Pointer"/>
  </rdfs:Class>
  
  <rdf:Property rdf:about="#reference">
    <rdfs:label xml:lang="en">reference</rdfs:label>
    <rdfs:comment xml:lang="en">Scope within which the pointer operates.</rdfs:comment>
    <rdfs:domain rdf:resource="#SinglePointer"/>
  </rdf:Property>
  
  <!-- Expression Pointer class -->
  <rdfs:Class rdf:about="#ExpressionPointer">
    <rdfs:label xml:lang="en">Expression Pointer</rdfs:label>
    <rdfs:comment xml:lang="en">Generic abstract single pointer that make use of an expression such as xPath, CSS selectors...</rdfs:comment>
    <rdfs:subClassOf rdf:resource="#SinglePointer"/>
  </rdfs:Class>
  
  <rdf:Property rdf:about="#expression">
    <rdfs:label xml:lang="en">expression</rdfs:label>
    <rdfs:comment xml:lang="en">Expression that identify points, such as xPath or CSS selectors.</rdfs:comment>
    <rdfs:domain rdf:resource="#ExpressionPointer"/>
    <rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Literal"/>
  </rdf:Property>
  
  <!-- XPath Pointer class -->
  <rdfs:Class rdf:about="#XPathPointer">
    <rdfs:label xml:lang="en">XPath Pointer</rdfs:label>
    <rdfs:comment xml:lang="en">Single pointer using an xPath expression.</rdfs:comment>
    <rdfs:subClassOf rdf:resource="#ExpressionPointer"/>
  </rdfs:Class>
  
  <rdf:Property rdf:about="#namespace">
    <rdfs:label xml:lang="en">namespace</rdfs:label>
    <rdfs:comment xml:lang="en">The namespace used in the XPath expression.</rdfs:comment>
    <rdfs:domain rdf:resource="#XPathPointer"/>
    <rdfs:range rdf:resource="#Namespace"/>
  </rdf:Property>
  
  <!-- XPointer Pointer class -->
    <rdfs:Class rdf:about="#XPointerPointer">
    <rdfs:label xml:lang="en">XPointer Pointer</rdfs:label>
    <rdfs:comment xml:lang="en">Single pointer using an xPointer expression.</rdfs:comment>
    <rdfs:subClassOf rdf:resource="#ExpressionPointer"/>
  </rdfs:Class>
  
  <!-- CSS Selector Pointer class -->
    <rdfs:Class rdf:about="#CSSSelectorPointer">
    <rdfs:label xml:lang="en">CSS selector Pointer</rdfs:label>
    <rdfs:comment xml:lang="en">Single pointer using a CSS selector.</rdfs:comment>
    <rdfs:subClassOf rdf:resource="#ExpressionPointer"/>
  </rdfs:Class>
	
  <!-- HTML Pointer class -->
  <rdfs:Class rdf:about="#HTMLPointer">
    <rdfs:label xml:lang="en">HTML Pointer</rdfs:label>
    <rdfs:comment xml:lang="en">Placeholder for single pointers using HTML fuzzy pointers.</rdfs:comment>
    <rdfs:subClassOf rdf:resource="#ExpressionPointer"/>
  </rdfs:Class>
  
  <rdf:Property rdf:about="#htmlPointer">
    <rdfs:label xml:lang="en">html pointer</rdfs:label>
    <rdfs:comment xml:lang="en">HTML fuzzy pointer.</rdfs:comment>
    <rdfs:domain rdf:resource="#HTMLPointer"/>
  </rdf:Property>
  
  <!-- Offset Pointer class -->
  <rdfs:Class rdf:about="#OffsetPointer">
    <rdfs:label xml:lang="en">Offset Pointer</rdfs:label>
    <rdfs:comment xml:lang="en">Generic abstract single pointer based on an offset.</rdfs:comment>
    <rdfs:subClassOf rdf:resource="#ExpressionPointer"/>
  </rdfs:Class>	
  
  <rdf:Property rdf:about="#offset">
    <rdfs:label xml:lang="en">offset</rdfs:label>
    <rdfs:comment xml:lang="en">Offset from the start of the reference.</rdfs:comment>
    <rdfs:domain rdf:resource="#OffsetPointer"/>
    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#integer"/>
  </rdf:Property>	
  
  <!-- Char Offset Pointer class -->
  <rdfs:Class rdf:about="#CharOffsetPointer">
    <rdfs:label xml:lang="en">Char Offset Pointer</rdfs:label>
    <rdfs:comment xml:lang="en">Single pointer using a character offset from the start of the reference.</rdfs:comment>
    <rdfs:subClassOf rdf:resource="#OffsetPointer"/>
  </rdfs:Class>	
  
  <!-- Byte Offset Pointer class -->
  <rdfs:Class rdf:about="#ByteOffsetPointer">
    <rdfs:label xml:lang="en">Byte Offset Pointer</rdfs:label>
    <rdfs:comment xml:lang="en">Single pointer using a byte offset from the start of the reference.</rdfs:comment>
    <rdfs:subClassOf rdf:resource="#OffsetPointer"/>
  </rdfs:Class>
  
  <!-- Line Char Pointer class -->
  <rdfs:Class rdf:about="#LineCharPointer">
    <rdfs:label xml:lang="en">Line-Char Pointer</rdfs:label>
    <rdfs:comment xml:lang="en">Single pointer using line and char numbers.</rdfs:comment>
    <rdfs:subClassOf rdf:resource="#SinglePointer"/>
  </rdfs:Class>
  
  <rdf:Property rdf:about="#line">
    <rdfs:label xml:lang="en">line</rdfs:label>
    <rdfs:comment xml:lang="en">Line number within the reference starting at one.</rdfs:comment>
    <rdfs:domain rdf:resource="#LineCharPointer"/>
    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#positiveInteger"/>
  </rdf:Property>
  
  <rdf:Property rdf:about="#char">
    <rdfs:label xml:lang="en">char</rdfs:label>
    <rdfs:comment xml:lang="en">Char number within a line starting at one.</rdfs:comment>
    <rdfs:domain rdf:resource="#LineCharPointer"/>
    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#positiveInteger"/>
  </rdf:Property>
  
  <!-- Range Pointer class -->
  <rdfs:Class rdf:about="#RangePointer">
    <rdfs:label xml:lang="en">Range Pointer</rdfs:label>
    <rdfs:comment xml:lang="en">Generic pointer to a defined range that could be subclassed for extensibility.</rdfs:comment>
    <rdfs:subClassOf rdf:resource="#Pointer"/>
  </rdfs:Class>
  
  <rdf:Property rdf:about="#startPointer">
    <rdfs:label xml:lang="en">start pointer</rdfs:label>
    <rdfs:comment xml:lang="en">Pointer to the start point of the range in a range pointer.</rdfs:comment>
    <rdfs:domain rdf:resource="#RangePointer"/>
    <rdfs:range rdf:resource="#SinglePointer"/>
  </rdf:Property>

  <!-- Start-End Pointer class -->
  <rdfs:Class rdf:about="#StartEndPointer">
    <rdfs:label xml:lang="en">Start-End Pointer</rdfs:label>
    <rdfs:comment xml:lang="en">Range pointer to a range with a start and an end point.</rdfs:comment>
    <rdfs:subClassOf rdf:resource="#RangePointer"/>
  </rdfs:Class>
  
  <rdf:Property rdf:about="#endPointer">
    <rdfs:label xml:lang="en">end pointer</rdfs:label>
    <rdfs:comment xml:lang="en">Pointer to the end point of the range.</rdfs:comment>
    <rdfs:domain rdf:resource="#StartEndPointer"/>
    <rdfs:range rdf:resource="#SinglePointer"/>
  </rdf:Property>
  
  <!-- Char Offset Range Pointer class -->
  <rdfs:Class rdf:about="#CharOffsetRangePointer">
    <rdfs:label xml:lang="en">Char Offset Range Pointer</rdfs:label>
    <rdfs:comment xml:lang="en">Pointer to a char range with a defined start and a char offset from there.</rdfs:comment>
    <rdfs:subClassOf rdf:resource="#RangePointer"/>
  </rdfs:Class>
  
  <rdf:Property rdf:about="#charOffset">
    <rdfs:label xml:lang="en">char offset</rdfs:label>
    <rdfs:comment xml:lang="en">Number of characters counting from the start point.</rdfs:comment>
    <rdfs:domain rdf:resource="#tCharOffsetRangePointer"/>
    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#positiveInteger"/>
  </rdf:Property>
  
  <!-- Byte Offset Range Pointer class -->
  <rdfs:Class rdf:about="#ByteOffsetRangePointer">
    <rdfs:label xml:lang="en">Byte Offset Range Pointer</rdfs:label>
    <rdfs:comment xml:lang="en">Pointer to a byte range with a defined start and a byte offset from there.</rdfs:comment>
    <rdfs:subClassOf rdf:resource="#RangePointer"/>
  </rdfs:Class>
  
  <rdf:Property rdf:about="#byteOffset">
    <rdfs:label>byte offset</rdfs:label>
    <rdfs:comment>Number of bytes counting from the start point.</rdfs:comment>
    <rdfs:domain rdf:resource="#ByteOffsetRangePointer"/>
    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#positiveInteger"/>
  </rdf:Property>
  
  <!-- Char Snippet Range Pointer class -->
  <rdfs:Class rdf:about="#CharSnippetRangePointer">
    <rdfs:label xml:lang="en">Char Snippet Range Pointer</rdfs:label>
    <rdfs:comment xml:lang="en">Pointer to a range with a defined start and a character snippet from there.</rdfs:comment>
    <rdfs:subClassOf rdf:resource="#RangePointer"/>
  </rdfs:Class>
  
  <rdf:Property rdf:about="#charSnippet">
    <rdfs:label xml:lang="en">char snippet</rdfs:label>
    <rdfs:comment xml:lang="en">Character snippet.</rdfs:comment>
    <rdfs:domain rdf:resource="#CharSnippetRangePointer"/>
    <rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Literal"/>
  </rdf:Property>
  
  <!-- Byte Snippet Range Pointer class -->
  <rdfs:Class rdf:about="#StartByteSnippetPointer">
    <rdfs:label xml:lang="en">Byte Snippet Range Pointer</rdfs:label>
    <rdfs:comment xml:lang="en">Pointer to a range with a defined start and a byte snippet from there.</rdfs:comment>
    <rdfs:subClassOf rdf:resource="#StartSnippetPointer"/>
  </rdfs:Class>
  
  <rdf:Property rdf:about="#byteSnippet">
    <rdfs:label xml:lang="en">byte snippet</rdfs:label>
    <rdfs:comment xml:lang="en">Byte snippet.</rdfs:comment>
    <rdfs:domain rdf:resource="#StartByteSnippetPointer"/>
    <rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Literal"/>
  </rdf:Property>
</rdf:RDF>

Appendix B: Vocabulary Terms

The following terms are defined by this specification:

Classes

Classes in the Pointer Methods namespace
Class name Label Allowable types Required properties Optional properties
ptr:ByteOffsetPointer Byte Offset Pointer ptr:offset, ptr:reference
ptr:ByteOffsetRangePointer Byte Offset Range Pointer ptr:byteOffset, ptr:startPointer
ptr:ByteSnippetRangePointer Byte Snippet Range Pointer ptr:byteSnippet, ptr:startPointer
ptr:CharOffsetPointer Char Offset Pointer ptr:offset, ptr:reference
ptr:CharOffsetRangePointer Char Offset Range Pointer ptr:charOffset, ptr:startPointer
ptr:CharSnippetRangePointer Char Snippet Range Pointer ptrt:charSnippet, ptr:startPointer
ptr:CSSSelectorPointer CSS selector Pointer ptr:expression, ptr:reference ptr:version
ptr:EquivalentPointers Equivalent Pointers ptr:pointer
ptr:ExpressionPointer Expression Pointer ptr:CSSSelectorPointer, ptr:XPathPointer, ptr:XPointerPointer ptr:expression ptr:version
ptr:HTMLPointer HTML Pointer ptr:htmlPointer, ptr:reference
ptr:LineCharPointer Line-Char Pointer ptr:charNumber, ptr:lineNumber, ptr:reference
ptr:OffsetPointer Offset Pointer ptr:ByteOffsetPointer, ptr:CharOffsetPointer ptr:offset
ptr:Pointer Pointer ptr:PointersGroup, ptr:RangePointer, ptr:SinglePointer
ptr:PointersGroup Pointers Group ptr:EquivalentPointers, ptr:RelatedPointers ptr:pointer
ptr:RangePointer Range Pointer ptr:startPointer
ptr:RelatedPointers Related Pointers ptr:pointer
ptr:SinglePointer Single Pointer ptr:ByteOffsetPointer, ptr:CharOffsetPointer, ptr:ExpressionPointer, ptr:HTMLPointer, 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:version

Properties

Properties in the Pointers namespace
Property name Label Domain Range Restriction
ptr:byteOffset char offset ptr:ByteOffsetRangePointer Positive Integer Exactly one per ptr:ByteOffsetRangePointer
ptr:charNumber char number ptr:LineCharPointer Positive Integer Exactly one per ptr:LineCharPointer
ptr:charOffset char offset ptr:CharOffsetRangePointer Positive Integer Exactly one per ptr:CharOffsetRangePointer
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:htmlPointer html pointer ptr:HTMLPointer Exactly one per ptr:HTMLPointer
ptr:lineNumber line number ptr:LineCharPointer Positive Integer Exactly one per ptr:LineCharPointer
ptr:namespace namespace ptr:XPathPointer Exactly one per ptr:XPathPointer
ptr:offset offset ptr:OffsetPointer Positive Integer Exactly one per ptr:OffsetPointer and ptr:StartOffsetPointer
ptr:pointer pointer ptr:Pointer ptr:PointersGroup At least one per ptr:Pointer
ptr:reference reference ptr:SinglePointer Exactly one per ptr:SinglePointer
ptr:startPointer start pointer ptr:RangePointer ptr:SinglePointer Exactly one per ptr:RangePointer
ptr:version version ptr:ExpressionPointer Literal Exactly one per ptr:ExpressionPointer

Appendix C: Document Changes

Not applicable.

Appendix D: References

[Content]
Representing Content in RDF - W3C Working Draft, 27 March 2008. J. Koch, C.A. Velasco eds.
http://www.w3.org/WAI/ER/Content/WD-Content-in-RDF-20080327
[EARL]
Evaluation and Report Language (EARL) 1.0 Schema - W3C Working Draft, 23 March 2007. S. Abou-Zahra ed.
http://www.w3.org/TR/2007/WD-EARL10-Schema-20070323
[OWL]
OWL Web Ontology Language - W3C Recommendation, 10 February 2004. D.L. McGuinness, F. van Harmelen eds.
http://www.w3.org/TR/owl-features/
[RDF]
RDF/XML Syntax Specification (Revised) - W3C Recommendation, 10 February 2004. D. Beckett ed.
http://www.w3.org/TR/2004/REC-rdf-syntax-grammar-20040210/
[RDF-PRIMER]
RDF Primer - W3C Recommendation, 10 February 2004. F. Manola, E.Miller eds.
http://www.w3.org/TR/rdf-primer/
[RDFS]
RDF Vocabulary Description Language 1.0: RDF Schema - W3C Recommendation, 10 February 2004. D. Brickley, R.V. Guha eds.
http://www.w3.org/TR/rdf-schema/
[RDF-XML-DIFFS]
Why RDF model is different from the XML model - Paper, September 1998. T. Berners-Lee.
http://www.w3.org/DesignIssues/RDF-XML
[RFC2119]
Key words for use in RFCs to Indicate Requirement Levels - IETF RFC, March 1997.
http://www.ietf.org/rfc/rfc2119.txt
[XML]
Extensible Markup Language (XML) 1.0 (Fourth Edition). W3C Recommendation 16 August 2006, edited in place 29 September 2006. T. Bray, J. Paoli, C.M. Sperberg-McQueen, E. Maler, F. Yergeau eds.
http://www.w3.org/TR/xml/
[XPath]
XML Path Language (XPath) 1.0. W3C Recommendation 16 November 1999. J. Clark, S. DeRose eds.
http://www.w3.org/TR/1999/REC-xpath-19991116
[XPointer-FRM]
XPointer Framework. W3C Recommendation 25 March 2003. P. Grosso, E. Maler, J. Marsh, N. Walsh eds.
http://www.w3.org/TR/2003/REC-xptr-framework-20030325/

Appendix E: Contributors