Advanced Pointer Events: InkML

InkML is an xml serialization of advanced pointer events, last updated 2006.

Focus on the <channel> and <channelProperty> elements.
http://www.w3.org/TR/InkML/#channel
http://www.w3.org/TR/InkML/#channelProperty

The elements are sufficient for documenting, with high precision
various physical properties obtainable by any number of sensors.

InkML provides an effective streaming mechanism:
http://www.w3.org/TR/InkML/#Streaming

DOM selectors are commonly used over the id and class
attributes of xml elements, and could manage nested or
grouped event sources.

Untrusted coordinates could be restricted to a safe x/y area:
http://www.w3.org/TR/2006/WD-InkML-20061023/#canvasElement

The InkML interchange format extends pointer events to allow replay,
as well as streaming of pointer events across networks; an unlimited
number of event sources, and a high level of flexibility in implementation.

...

An event api based on InkML would bring these kind of uses:

CSS:
<canvas style="ink-source: url(/automatedevents.xml); ink-transform: 
scale(.5,.5);"></canvas>
<div ontouchstart="return ontouchstart(event);" style="ink-source: 
touch/1">Only touch/1 will trigger my events</div>
<body onmousedown="..." style="ink-source: url(http://remote.ink:8080)">

Script:
(inkElement = document.createElement('ink')).
 appendChild(document.createElement('channel'))
 setAttribute('d','X Y');
inkElement.appendChild(document.createElement('trace')).innerHTML = '0 0 
20 20...';

document.body.addEventSelector('touch/[2-4]', function() {}, bubble);
document.body.style.inkSource='touch/[2-3]'; // events from 4 will never 
reach our selector.

We can not do much about the standard "mouse" event, but otherwise, 
there's a lot of room for
extending compatibility backward.

Received on Monday, 22 March 2010 05:51:51 UTC