Alph Simple Selectors: Overview
The Alph Project: <http://alph.io>
This document indexed at: <http://alph.io/index.html>
©2019 Adam C. Moore (LÆMEUR) <mailto:firstname.lastname@example.org>
In Alph we use some simple numeric fragment selectors for addressing, linking, and transclusion of "flat" media — text, images, audio, and video streams. A great mess of heterogeneous fragment selectors/schemes already exist for a variety of media types – have a look through Section 4 of the Web Annotation Data Model for a taste of them: <https://www.w3.org/TR/annotation-model/#specific-resources> – but rather than try to implement an ugly handful of nominal "standards", we designed the Alph Simple Selectors to be terse, easy to parse, and to provide a baseline addressing capability for common media types.
There are three fragment types: POINT, RANGE, and and AREA; and each fragment type has three selectors: INTEGER, FLOAT, and NORMAL. Here's the whole list, with examples of what they look like:
- intPoint — ex.: http://host/path/file#123
- floatPoint — ex.: http://host/path/file#123.456
- normalPoint — ex.: http://host/path/file#^0.123
- intRange — ex.: http://host/path/file#12-34
- floatRange — ex.: http://host/path/file#12.34-56.78
- normalRange — ex.: http://host/path/file#^0.0-1.0
- intArea — ex.: http://host/path/file#12,34-56,78
- floatArea — ex.: http://host/path/file#12.34,56.78-91.23,456.78
- normalArea — ex.: http://host/path/file#^0.1,0.2-0.3,0.4
These fragment selectors can all be easily identified by a regular expression match. The testing regexp is provided in the detailed descriptions.
The units represented by the numbers vary, according to media type. For example, an intRange fragment of #0-100 would refer to the first one-hundred FRAMES of a video stream or the first one-hundred CODEPOINTS of a plain-text file. The units for each media type are given in the detailed descriptions of each selector.