You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
5855 lines
200 KiB
5855 lines
200 KiB
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<meta name="generator" content="HTML Tidy, see www.w3.org" />
|
|
<meta http-equiv="Content-Type"
|
|
content="text/html; charset=utf-8" />
|
|
<title>Ink Markup Language (InkML)</title>
|
|
<style type="text/css" xml:space="preserve">
|
|
/*<![CDATA[*/
|
|
/**/
|
|
.menu { text-align: center }
|
|
.ex { color: green; font-size: 115%}
|
|
.schema { color: #cc3333 }
|
|
.attrs td { background-color: #ccffcc }
|
|
.attrs th { background-color: #99ffcc }
|
|
.reqs td { background-color: #ccffff }
|
|
.reqs th { background-color: #99ffff }
|
|
.trace th { background-color: #99ffcc }
|
|
.trace td { background-color: #ccffcc }
|
|
.channels th { background-color: #99ffcc }
|
|
.channels td { background-color: #ccffcc }
|
|
.channelproperties th { background-color: #99ffcc }
|
|
.channelproperties td { background-color: #ccffcc }
|
|
.units th { background-color: #99ffcc }
|
|
.units td { background-color: #ccffcc }
|
|
.units { background-color: #ccffcc }
|
|
/*.contents th { background-color: #99ffcc; text-align: left }*/
|
|
.contents { background-color: #dddddd; width: 95%; padding: 0.5em;
|
|
margin-left: 2.5%; }
|
|
/*.contents dt { background-color: #dddddd; }*/
|
|
.nlcontents { background-color: #dddddd; width: 95%; padding: 0.5em;
|
|
margin-left: 2.5%; }
|
|
td.trace { background-color: #99ff99 }
|
|
div.content ul {list-style: none }
|
|
div.content li li { margin-top: 0 }
|
|
dl.toc { margin-left: 5% }
|
|
.toc a { text-decoration: none}
|
|
table { margin-left: 5%}
|
|
li { margin-top: 0.5em}
|
|
|
|
div.issues {
|
|
border-width: thin;
|
|
border-style: solid;
|
|
border-color: maroon;
|
|
background-color: #ffcc99;
|
|
width: 95%; padding: 0.5em; }
|
|
.issues h4 { margin-top: 0px; font-size: larger}
|
|
|
|
div.units {
|
|
background-color: #dddddd;
|
|
padding: 0.5em;
|
|
margin-left: 2.5%;
|
|
width: 95% }
|
|
|
|
div.attr {
|
|
background-color: #dddddd;
|
|
padding: 0.5em;
|
|
margin-left: 2.5%;
|
|
width: 95% }
|
|
|
|
div.attrdef {
|
|
margin-left: 2% }
|
|
.obsolete { text-decoration: line-through; }
|
|
.figure { text-align: center }
|
|
.caption { text-align: center }
|
|
|
|
code { font-size: 120%; font-weight: bold }
|
|
|
|
.diff-add { background-color: #FFFF99}
|
|
.diff-del { background-color: #FF9999; text-decoration: line-through }
|
|
.diff-chg { background-color: #99FF99 }
|
|
/**/
|
|
/*]]>*/
|
|
|
|
.style1 {
|
|
font-family: monospace;
|
|
font-size: 110%;
|
|
}
|
|
|
|
.style2 {
|
|
margin-left: 40px;
|
|
}
|
|
|
|
* {
|
|
line-height: 1.25;
|
|
}
|
|
|
|
.style4 {
|
|
font-size: 110%;
|
|
}
|
|
|
|
|
|
|
|
.tocline { list-style-type: none }
|
|
|
|
|
|
|
|
</style>
|
|
|
|
<link href="http://www.w3.org/StyleSheets/TR/W3C-REC.css"
|
|
type="text/css" rel="stylesheet" />
|
|
<!-- <link href="http://www.w3.org/StyleSheets/TR/base.css" type=
|
|
"text/css" rel="stylesheet" /> -->
|
|
</head>
|
|
<body>
|
|
<div class="head">
|
|
<p><a href="http://www.w3.org/"><img height="48" width="72"
|
|
alt="W3C" src="http://www.w3.org/Icons/w3c_home" /></a></p>
|
|
|
|
<h1>Ink Markup Language (InkML)</h1>
|
|
|
|
<h2>W3C Recommendation 20 September 2011</h2>
|
|
|
|
<dl>
|
|
<dt>This version:</dt>
|
|
|
|
<dd><a href="http://www.w3.org/TR/2011/REC-InkML-20110920/">
|
|
http://www.w3.org/TR/2011/REC-InkML-20110920/</a></dd>
|
|
|
|
<dt>Latest version:</dt>
|
|
|
|
<dd><a href="http://www.w3.org/TR/InkML">http://www.w3.org/TR/InkML</a></dd>
|
|
|
|
<dt>Previous version:</dt>
|
|
|
|
<dd><a href="http://www.w3.org/TR/2011/PR-InkML-20110510/">
|
|
http://www.w3.org/TR/2011/PR-InkML-20110510/</a></dd>
|
|
|
|
<dt>Editors:</dt>
|
|
|
|
<dd>Stephen M. Watt, University of Western Ontario and Maplesoft</dd>
|
|
<dd>Tom Underhill, Microsoft</dd>
|
|
|
|
<dt>Authors:</dt>
|
|
<dd>Yi-Min Chee (until 2006 while at IBM)</dd>
|
|
<dd>Katrin Franke (until 2004 while at Fraunhofer Gesellschaft)</dd>
|
|
<dd>Max Froumentin (until 2006 while at W3C)</dd>
|
|
<dd>Sriganesh Madhvanath (until 2009 while at HP)</dd>
|
|
<dd>Jose-Antonio Magaña (until 2006 while at HP)</dd>
|
|
<dd>Grégory Pakosz (until 2007 while at Vision Objects)</dd>
|
|
<dd>Gregory Russell (until 2005 while at IBM)</dd>
|
|
<dd>Muthuselvam Selvaraj (until 2009 while at HP)</dd>
|
|
<dd>Giovanni Seni (until 2003 while at Motorola)</dd>
|
|
<dd>Christopher Tremblay (until 2003 while at Corel)</dd>
|
|
<dd>Larry Yaeger (until 2004 while at Apple)</dd>
|
|
</dl>
|
|
|
|
<p>Please refer to the <a href="http://www.w3.org/2011/06/InkML-errata.html"> <strong>errata</strong></a> for this document, which may include some normative corrections.</p>
|
|
|
|
<p>See also <a href="http://www.w3.org/2003/03/Translations/byTechnology?technology=InkML"> <strong>translations</strong></a>.</p>
|
|
|
|
<p class="copyright"><a
|
|
href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a>
|
|
©2003-2011 <a href="http://www.w3.org/" shape="rect"><acronym
|
|
title="World Wide Web Consortium">W3C</acronym></a><sup>®</sup> (<a
|
|
href="http://www.csail.mit.edu/"><acronym
|
|
title="Massachusetts Institute of Technology">MIT</acronym></a>, <a
|
|
href="http://www.ercim.eu/"><acronym
|
|
title="European Research Consortium for Informatics and Mathematics">
|
|
ERCIM</acronym></a>, <a href="http://www.keio.ac.jp/">Keio</a>),
|
|
All Rights Reserved. W3C <a
|
|
href="http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">
|
|
liability</a>, <a
|
|
href="http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks"
|
|
shape="rect">trademark</a> and <a
|
|
href="http://www.w3.org/Consortium/Legal/copyright-documents">document
|
|
use</a> rules apply.</p>
|
|
</div>
|
|
|
|
<hr title="Separator from Header" />
|
|
<div class="abstract">
|
|
<h2 id="abstract">Abstract</h2>
|
|
|
|
<p>This document describes the syntax and semantics for the Ink Markup Language. The Ink Markup Language serves as the data format for
|
|
representing ink entered with an electronic pen or stylus. The
|
|
markup allows for the input and processing of handwriting,
|
|
gestures, sketches, music and other notational languages in
|
|
applications. It provides a common format for the exchange of ink
|
|
data between components such as handwriting and gesture
|
|
recognizers, signature verifiers, and other ink-aware modules. It may be
|
|
used in the <a
|
|
href="http://www.w3.org/TR/mmi-framework/">W3C Multimodal
|
|
Interaction Framework</a> as proposed by the <a
|
|
href="http://www.w3.org/2002/mmi/">W3C Multimodal Interaction
|
|
Activity</a>. </p>
|
|
</div>
|
|
|
|
<div class="status">
|
|
<h2 id="status">Status of this document</h2>
|
|
|
|
<p><em>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 <a href=
|
|
"http://www.w3.org/TR/">W3C technical reports index</a> at
|
|
http://www.w3.org/TR/.</em></p>
|
|
|
|
<p>This is the
|
|
<a href="http://www.w3.org/2005/10/Process-20051014/tr.html#RecsW3C">
|
|
Recommendation
|
|
</a>
|
|
of "Ink Markup Language (InkML)".
|
|
|
|
It has been produced by the
|
|
<a href="http://www.w3.org/2002/mmi/">Multimodal Interaction Working Group</a>,
|
|
which is part of the
|
|
<a href="http://www.w3.org/2002/mmi/Activity.html">Multimodal Interaction Activity</a>.
|
|
</p>
|
|
|
|
<p>Comments are welcome on <a href="mailto:www-multimodal@w3.org">www-multimodal@w3.org</a>
|
|
(<a href="http://lists.w3.org/Archives/Public/www-multimodal/">archive</a>).
|
|
|
|
See <a href="http://www.w3.org/Mail/">W3C mailing list and archive
|
|
usage guidelines</a>.</p>
|
|
|
|
<p>The design of InkML has been widely reviewed
|
|
(see the <a href="http://www.w3.org/TR/2011/CR-InkML-20110111/inkml-disp.html"> disposition of comments</a>)
|
|
and satisfies the Working Group's technical requirements.
|
|
|
|
A list of implementations is included in the
|
|
<a href="http://www.w3.org/2002/mmi/2011/inkml-ir/">InkML 1.0 Implementation Report</a>.
|
|
|
|
There are no substantial changes from the
|
|
<a href="http://www.w3.org/TR/2011/PR-InkML-20110510/">
|
|
10 May 2011 Proposed Recommendation</a>.
|
|
</p>
|
|
|
|
<p>This document has been reviewed by W3C Members, by software
|
|
developers, and by other W3C groups and interested parties, and is
|
|
endorsed by the Director as a W3C Recommendation. It is a stable
|
|
document and may be used as reference material or cited from another
|
|
document. W3C's role in making the Recommendation is to draw
|
|
attention to the specification and to promote its widespread
|
|
deployment. This enhances the functionality and interoperability of
|
|
the Web.</p>
|
|
|
|
<p>This specification describes markup for representing ink entered with an
|
|
electronic pen or stylus and forms part of the proposals for the
|
|
<a href="http://www.w3.org/TR/mmi-framework/"></a>
|
|
<a href=
|
|
"http://www.w3.org/TR/mmi-framework/">W3C Multimodal Interaction
|
|
Framework</a>.</p>
|
|
|
|
<p> This document was produced by a group operating under the <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/">5 February 2004 W3C Patent Policy</a>. W3C maintains a <a rel="disclosure" href="http://www.w3.org/2004/01/pp-impl/34607/status">public list of any patent disclosures</a> made in connection with the deliverables of the group; that page also includes instructions for disclosing a patent. </p>
|
|
</div>
|
|
|
|
<hr />
|
|
<div class="content">
|
|
<h2 class="notoc" id="contents">Table of Contents</h2>
|
|
|
|
<ul>
|
|
<li>1 <a href="#Overview">Overview</a>
|
|
|
|
<ul>
|
|
<li>1.1 <a href="#OverviewUses">Uses of InkML</a></li>
|
|
|
|
<li>1.2 <a href="#OverviewElements">Elements</a></li>
|
|
|
|
<li>1.3 <a href="#OverviewModes">Exchange Modes</a></li>
|
|
|
|
<li>1.4 <a href="#conventions">Conventions used in this
|
|
document</a></li>
|
|
</ul>
|
|
</li>
|
|
|
|
<li>2 <a href="#structure" name="3.1.1">Structure</a>
|
|
|
|
<ul>
|
|
<li>2.1 <a href="#inkElement"><code><ink></code>
|
|
element</a></li>
|
|
</ul>
|
|
</li>
|
|
|
|
<li>3 <a href="#TraceIntro">Traces and Trace Formatting</a>
|
|
|
|
<ul>
|
|
<li>3.1 <a href="#traceFormats">Trace Formats</a>
|
|
|
|
<ul>
|
|
<li>3.1.1 <a href="#traceFormat"><code><traceFormat></code>
|
|
element</a></li>
|
|
|
|
<li>3.1.2 <a href="#channel"><code><channel></code>
|
|
element</a></li>
|
|
|
|
<li>3.1.3 <a
|
|
href="#intermittentChannels"><code><intermittentChannels></code>
|
|
element</a></li>
|
|
|
|
<li>3.1.4 <a href="#orientation">Orientation Channels</a></li>
|
|
|
|
<li>3.1.5 <a href="#color">Color Channels</a></li>
|
|
|
|
<li>3.1.6 <a href="#width">Width Channel</a></li>
|
|
|
|
<li>3.1.7 <a href="#time">Time Channel</a></li>
|
|
|
|
<li>3.1.8 <a href="#user">User Defined Channels</a></li>
|
|
|
|
<li>3.1.9 <a href="#specifying">Specifying Trace Formats</a></li>
|
|
</ul>
|
|
</li>
|
|
|
|
<li>3.2 <a href="#traces">Traces</a>
|
|
|
|
<ul>
|
|
<li>3.2.1 <a href="#trace"><code><trace></code>
|
|
element</a></li>
|
|
</ul>
|
|
</li>
|
|
|
|
<li>3.3 <a href="#traceCollections">Trace Collections</a>
|
|
|
|
<ul>
|
|
<li>3.3.1 <a href="#traceGroup"><code><traceGroup></code>
|
|
element</a></li>
|
|
|
|
<li>3.3.2 <a
|
|
href="#traceViewElement"><code><traceView></code>
|
|
element</a></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
|
|
<li>4 <a href="#ContextIntro">Contexts</a>
|
|
|
|
<ul>
|
|
<li>4.1 <a href="#contextElement">The <code><context></code>
|
|
element</a></li>
|
|
|
|
<li>4.2 <a href="#inkSource">Ink Sources</a>
|
|
|
|
<ul>
|
|
<li>4.2.1 <a
|
|
href="#inkSourceElement"><code><inkSource></code>
|
|
element</a></li>
|
|
|
|
<li>4.2.2 <a href="#sampleRate"><code><sampleRate></code>
|
|
element</a></li>
|
|
|
|
<li>4.2.3 <a href="#latency"><code><latency></code>
|
|
element</a></li>
|
|
|
|
<li>4.2.4 <a href="#activeArea"><code><activeArea></code>
|
|
element</a></li>
|
|
|
|
<li>4.2.5 <a
|
|
href="#srcProperty"><code><sourceProperty></code>
|
|
element</a></li>
|
|
|
|
<li>4.2.6 <a
|
|
href="#channelProperties"><code><channelProperties></code>
|
|
element</a></li>
|
|
|
|
<li>4.2.7 <a
|
|
href="#channelProperty"><code><channelProperty></code>
|
|
element</a></li>
|
|
</ul>
|
|
</li>
|
|
|
|
<li>4.3 <a href="#brushes">Brushes</a>
|
|
|
|
<ul>
|
|
<li>4.3.1 <a href="#brushElement"><code><brush></code>
|
|
element</a></li>
|
|
|
|
<li>4.3.2 <a
|
|
href="#brushPropertyElement"><code><brushProperty></code>
|
|
element</a></li>
|
|
</ul>
|
|
</li>
|
|
|
|
<li>4.4 <a href="#timestamps">Timestamps</a>
|
|
|
|
<ul>
|
|
<li>4.4.1 <a href="#timestamp"><code><timestamp></code>
|
|
element</a></li>
|
|
</ul>
|
|
</li>
|
|
|
|
<li>4.5 <a href="#defaultContext">The Default Context</a></li>
|
|
|
|
<li>4.6 <a href="#contextPriority">Context Priority</a></li>
|
|
</ul>
|
|
</li>
|
|
|
|
<li>5 <a href="#canvas">Canvases</a>
|
|
|
|
<ul>
|
|
<li>5.1 <a href="#canvasElement"><code><canvas></code>
|
|
element</a></li>
|
|
|
|
<li>5.2 <a
|
|
href="#canvasTransformElement"><code><canvasTransform></code>
|
|
element</a></li>
|
|
|
|
<li>5.3 <a href="#DefaultCanvas">The Default Canvas</a></li>
|
|
</ul>
|
|
</li>
|
|
|
|
<li>6 <a href="#generics">Generics</a>
|
|
|
|
<ul>
|
|
<li>6.1 <a href="#mappings">Mappings</a>
|
|
|
|
<ul>
|
|
<li>6.1.1 <a href="#mappingElement"><code><mapping></code>
|
|
element</a></li>
|
|
|
|
<li>6.1.2 <a href="#bindElement"><code><bind></code>
|
|
element</a></li>
|
|
|
|
<li>6.1.3 <a href="#tableElement"><code><table></code>
|
|
element</a></li>
|
|
|
|
<li>6.1.4 <a href="#affineElement"><code><affine></code>
|
|
element</a></li>
|
|
</ul>
|
|
</li>
|
|
|
|
<li>6.2 <a href="#definitions">Definitions</a>
|
|
|
|
<ul>
|
|
<li>6.2.1 <a
|
|
href="#definitionsElement"><code><definitions></code>
|
|
element</a></li>
|
|
</ul>
|
|
</li>
|
|
|
|
<li>6.3 <a href="#annotations">Annotations</a>
|
|
|
|
<ul>
|
|
<li>6.3.1 <a
|
|
href="#annotationElement"><code><annotation></code>
|
|
element</a></li>
|
|
|
|
<li>6.3.2 <a
|
|
href="#annotationXMLElement"><code><annotationXML></code>
|
|
element</a></li>
|
|
</ul>
|
|
</li>
|
|
|
|
<li>6.4 <a href="#units">Units</a></li>
|
|
</ul>
|
|
</li>
|
|
|
|
<li>7 <a href="#streamsAndArchives">Archives and Streams</a>
|
|
|
|
<ul>
|
|
<li>7.1 <a href="#Archival">Archival Applications</a></li>
|
|
|
|
<li>7.2 <a href="#Streaming">Streaming Applications</a></li>
|
|
|
|
<li>7.3 <a href="#Equivalence">Archival and Streaming
|
|
Equivalence</a></li>
|
|
</ul>
|
|
</li>
|
|
|
|
<li>8 <a href="#s8">Conformance</a>
|
|
<ul class="tocline">
|
|
<li>8.1 <a href="#s8.1">Conforming InkML Documents</a></li>
|
|
<li>8.2 <a href="#s8.2">Using InkML with other Namespaces</a></li>
|
|
<li>8.3 <a href="#s8.3">Conforming InkML Processors</a></li>
|
|
</ul>
|
|
</li>
|
|
|
|
<li>A <a href="#acknowledgements">Acknowledgements</a></li>
|
|
|
|
<li>B <a href="#guidelines">Implementation Guidelines</a></li>
|
|
|
|
<li>C <a href="#references">References</a></li>
|
|
|
|
<li>D <a href="#mime-definition">The InkML Media Type</a>
|
|
|
|
<ul>
|
|
<li>D.1 <a href="#media-type-registration">Registration of MIME
|
|
media type application/inkml+xml</a></li>
|
|
|
|
<li>D.2 <a href="#media-type-fragid">Fragment Identifiers</a></li>
|
|
</ul>
|
|
</li>
|
|
|
|
<li>E <a href="#xsd">XML Schema</a></li>
|
|
|
|
</ul>
|
|
</div>
|
|
|
|
<hr />
|
|
<h2 id="Overview">1 Overview</h2>
|
|
|
|
<p>As more electronic devices with pen interfaces have and continue
|
|
to become available for entering and manipulating information,
|
|
applications need to be more effective at using this method of
|
|
input. Handwriting is a powerful and versatile input modality that
|
|
is very familiar for most users since everyone learns to write in
|
|
school. Hence, users will tend to use this as a mode of input and
|
|
control when available.</p>
|
|
|
|
<p>A pen-based interface is enabled by a device that allows
|
|
movements of the pen to be captured as digital ink. A number of
|
|
methods may be used for ink capture, including those based on radio
|
|
frequency, optical tracking, physical pressure, or other
|
|
technologies. Digital ink can be passed on to recognition software
|
|
that will convert the pen input into appropriate computer actions.
|
|
Alternatively, the handwritten input can be organized into ink
|
|
documents, notes or messages that can be stored for later retrieval
|
|
or exchanged through telecommunications means. Such ink documents
|
|
are appealing because they capture information as the user composed
|
|
it, including text in any mix of languages and drawings such as
|
|
equations and graphs.</p>
|
|
|
|
<p>Hardware and software vendors have typically stored and
|
|
represented digital ink using proprietary or restrictive formats.
|
|
The lack of a public and comprehensive digital ink format has
|
|
severely limited the capture, transmission, processing, and
|
|
presentation of digital ink across heterogeneous devices developed
|
|
by multiple vendors. In response to this need, the Ink Markup
|
|
Language (InkML) provides a simple and platform-neutral data format
|
|
to promote the interchange of digital ink between software
|
|
applications.</p>
|
|
|
|
<p>InkML supports a complete and accurate representation of digital
|
|
ink. In addition to the pen position over time, InkML allows
|
|
recording of information about device characteristics and detailed
|
|
dynamic behavior to support applications such as handwriting
|
|
recognition and authentication. For example, there is support to
|
|
record additional information such as pen tilt and pen tip force
|
|
(often referred to as "pressure") and information about the
|
|
recording device such as accuracy and dynamic distortion. InkML
|
|
also provides features to support rendering of digital ink captured
|
|
optically to approximate the original appearance. For example,
|
|
stroke width and color information can be recorded.</p>
|
|
|
|
<p>It is not within the design of InkML to describe and store
|
|
semantic information, such as the plain text of ink recognized as
|
|
handwriting. Nor is it a goal of InkML to store the
|
|
contextual information about the ink, such as what kind of field in
|
|
a form where ink was written. However, InkML provides means
|
|
for extension. InkML can include XML from other schemas at
|
|
specific locations in a file or stream (see <code><a
|
|
href="#annotationXMLElement"><annotationXML></a></code>.)
|
|
Additionally, InkML could be embedded within other XML
|
|
documents.</p>
|
|
|
|
<h3 id="OverviewUses">1.1 Uses of InkML</h3>
|
|
|
|
<p>With the establishment of a non-proprietary ink standard, a
|
|
number of applications, old and new, are expanded where the pen can
|
|
be used as a very convenient and natural form of input. Here are a
|
|
few examples.</p>
|
|
|
|
<ul>
|
|
<li><b>Ink Messaging</b>
|
|
|
|
<p>Two-way transmission of digital ink, possibly wireless, offers
|
|
mobile-device users a compelling new way to communicate. Users can
|
|
draw or write with a pen on the device's screen to compose a note
|
|
in their own handwriting. Such an ink note can then be addressed
|
|
and delivered to other mobile users, desktop users, or fax
|
|
machines. The recipient views the message as the sender composed
|
|
it, including text in any mix of languages and drawings.</p>
|
|
</li>
|
|
|
|
<li><b>Ink and SMIL</b>
|
|
|
|
<p>A photo taken with a digital camera can be annotated with a pen;
|
|
the digital ink can be coordinated with a spoken commentary. The
|
|
ink annotation could be used for indexing the photo (for example,
|
|
one could assign different handwritten glyphs to different
|
|
categories of pictures).</p>
|
|
</li>
|
|
|
|
<li><b>Ink Archiving and Retrieval</b>
|
|
|
|
<p>A software application may allow users to archive handwritten
|
|
notes and later retrieve them by a variety of mechanisms.</p>
|
|
</li>
|
|
|
|
<li><b>Electronic Form-Filling</b>
|
|
|
|
<p>In support of natural and robust data entry for electronic forms
|
|
on a wide spectrum of keyboard-less devices, a developer may define an API that takes InkML as
|
|
input for fields of the form.</p>
|
|
</li>
|
|
|
|
<li><b>Pen Input and Multimodal Systems</b>
|
|
|
|
<p>Robust and flexible user interfaces can be created that
|
|
integrate the pen with other input modalities such as speech.
|
|
Multimodal applications may share context information across
|
|
modalities, leading to better recognition in each modality
|
|
individually. In this setting, pen input may be used to
|
|
disambiguate voice recognition and vice-versa.</p>
|
|
</li>
|
|
</ul>
|
|
|
|
<h3 id="OverviewElements">1.2 Elements</h3>
|
|
|
|
<p>The current InkML specification defines a set of primitive
|
|
elements sufficient for all basic ink applications. All content of
|
|
an InkML document is contained within a single
|
|
<code><ink></code> element. The fundamental data element in
|
|
an InkML file is the <code><trace></code>. A trace represents
|
|
a sequence of contiguous ink points, where each point captures the
|
|
values of particular quantities such as the X and Y coordinates of
|
|
the pen's position. A sequence of traces accumulates to meaningful
|
|
units, such as characters, words or diagrams.</p>
|
|
|
|
<p>In its simplest form, an InkML file with its enclosed traces
|
|
looks like this:</p>
|
|
|
|
<pre class="ex" xml:space="preserve">
|
|
<ink xmlns="http://www.w3.org/2003/InkML">
|
|
<trace>
|
|
10 0, 9 14, 8 28, 7 42, 6 56, 6 70, 8 84, 8 98, 8 112, 9 126, 10 140,
|
|
13 154, 14 168, 17 182, 18 188, 23 174, 30 160, 38 147, 49 135,
|
|
58 124, 72 121, 77 135, 80 149, 82 163, 84 177, 87 191, 93 205
|
|
</trace>
|
|
<trace>
|
|
130 155, 144 159, 158 160, 170 154, 179 143, 179 129, 166 125,
|
|
152 128, 140 136, 131 149, 126 163, 124 177, 128 190, 137 200,
|
|
150 208, 163 210, 178 208, 192 201, 205 192, 214 180
|
|
</trace>
|
|
<trace>
|
|
227 50, 226 64, 225 78, 227 92, 228 106, 228 120, 229 134,
|
|
230 148, 234 162, 235 176, 238 190, 241 204
|
|
</trace>
|
|
<trace>
|
|
282 45, 281 59, 284 73, 285 87, 287 101, 288 115, 290 129,
|
|
291 143, 294 157, 294 171, 294 185, 296 199, 300 213
|
|
</trace>
|
|
<trace>
|
|
366 130, 359 143, 354 157, 349 171, 352 185, 359 197,
|
|
371 204, 385 205, 398 202, 408 191, 413 177, 413 163,
|
|
405 150, 392 143, 378 141, 365 150
|
|
</trace>
|
|
</ink>
|
|
</pre>
|
|
|
|
<p>These traces consist simply of X and Y value pairs, and may look
|
|
like this when rendered:</p>
|
|
|
|
<div class="figure">
|
|
<p><img style="border: none;" src="hello.png"
|
|
alt="a possible rendering of the sample trace above" /></p>
|
|
|
|
<p class="caption">Figure 1: Example of trace rendering</p>
|
|
</div>
|
|
|
|
<p>Figure 1 shows a trace of a sampled handwriting signal. The dots
|
|
mark the sampling positions which were interpolated by the blue
|
|
line. Green points represent pen-downs whereas red dots indicate
|
|
pen-ups.</p>
|
|
|
|
<div>
|
|
<p>More generally, traces consist of sequences of points. Each
|
|
point consists of a number of coordinate values whose meanings are
|
|
given by a <code><traceFormat></code> element. These
|
|
coordinates may provide values for such quantities as pen position,
|
|
angle, tip force, button states and so on.</p>
|
|
</div>
|
|
|
|
<p>Information about the device used to collect the ink (e.g., the
|
|
sampling rate and resolution) may be specified with the
|
|
<code><inkSource></code> element.</p>
|
|
|
|
<p>Ink traces can have certain attributes such as color and width,
|
|
writer identification, pen modes (eraser versus writing), and so
|
|
on. These and other attributes are captured using the
|
|
<code><brush></code> element. Traces that share the same
|
|
characteristics, such as being written with the same brush, can be
|
|
grouped together with the <code><traceGroup></code>
|
|
element.</p>
|
|
|
|
<div>
|
|
<p>Ink traces may also be organized into collections for
|
|
application-specific purposes either by grouping the traces objects
|
|
themselves, using the <code><traceGroup></code> element, or
|
|
by reference, using the <code><traceView></code> element.</p>
|
|
</div>
|
|
|
|
<div>
|
|
<p>Certain applications, such as collaborative whiteboards (where
|
|
ink coming from different devices is drawn on a common canvas) or
|
|
document review (where ink annotation from various sources are
|
|
combined), will require ink sharing. The
|
|
<code><context></code> element allows representation and
|
|
grouping of the pertinent information, such as the trace format,
|
|
brush, and canvas. Canvas transformations allow ink from different
|
|
devices to be combined and manipulated by multiple parties.</p>
|
|
</div>
|
|
|
|
<div>
|
|
<p>InkML supports the semantic labeling of traces with attributes
|
|
on traces or collections of traces. These may be given with either
|
|
<code><annotation></code>, for text, or
|
|
<code><annotationXML></code>, for XML, using
|
|
application-defined encodings.</p>
|
|
</div>
|
|
|
|
<p>In all appropriate cases, the InkML specification defines
|
|
default values for elements that are not specified, and rules that
|
|
establish the scope of a given attribute.</p>
|
|
|
|
<p>Finally, the InkML specification is limited in scope: It is
|
|
currently oriented to fixed Cartesian coordinate systems, it does
|
|
not support sophisticated compression of trace data, and it does
|
|
not support non-ink events (although the later could be handled via
|
|
annotations).</p>
|
|
|
|
<h3 id="OverviewModes">1.3 Exchange Modes</h3>
|
|
|
|
<p>Most ink-related applications fall into two broad categories:
|
|
"Streaming" and "Archival". Archival ink applications capture and
|
|
store digital ink for later processing, such as document
|
|
storage/retrieval applications and batch forms processing . In
|
|
these applications, an entire <code><ink></code> element is
|
|
written prior to processing. For ease of implementation in archival
|
|
mode, referenced elements should be defined inside a declaration
|
|
block using the <code><definitions></code> element (see <a
|
|
href="#defaultContext">The Default Context</a> section, the <a
|
|
href="#definitions">Definitions</a> section, and the <a
|
|
href="#Archival">Archival Applications</a> section).</p>
|
|
|
|
<p>Streaming ink applications, on the other hand, transmit digital
|
|
ink as it is captured, such as in the electronic whiteboard example
|
|
mentioned above. In order to support a streaming style of ink
|
|
markup generation, the InkML language supports the notion of a
|
|
"current" state (e.g., the current brush) and allows for
|
|
incremental changes to this state.</p>
|
|
|
|
<div>
|
|
<h3 id="conventions">1.4 Conventions used in this document</h3>
|
|
|
|
<p>This document uses the following conventions:</p>
|
|
|
|
<dl>
|
|
<dt>Syntax of element contents</dt>
|
|
|
|
<dd>The syntax of the contents of InkML elements is expressed in
|
|
Backus-Naur Form, using the notation defined in the <a
|
|
href="#traceContents">Trace</a> section. Non-literal symbols
|
|
represent InkML markup and are linked to the relevant section in
|
|
this document. For example:
|
|
|
|
<div class="contents"><samp><a href="#channel">channel</a>* <a
|
|
href="#intermittentChannels">intermittentChannels</a>?</samp></div>
|
|
</dd>
|
|
|
|
<dt>Syntax of attribute contents</dt>
|
|
|
|
<dd>In this specification attributes definitions are formatted as:
|
|
|
|
<div class="attr"><b>default</b> = xsd:decimal | xsd:boolean</div>
|
|
|
|
The left hand side of the '=' sign is the name of the attribute and
|
|
the right hand side describes the syntax of the attribute's
|
|
contents, using the same Backus-Naur Form notation as used for
|
|
element definitions. In addition, a non-literal symbol will
|
|
represent a data type name. By convention, this specification uses
|
|
the prefix 'xsd:' to indicate that the following name is that of a
|
|
datatype formally defined in the XML Schema Part 2: Datatypes
|
|
Recommendation [<cite><a href="#XMLSCHEMA2">XMLSCHEMA2</a></cite>].
|
|
The 'xsd' prefix is used only as a notation in this specification,
|
|
and does not mandate any prefix when using XML Schema names in
|
|
InkML.</dd>
|
|
</dl>
|
|
</div>
|
|
|
|
<hr />
|
|
<div>
|
|
<h2 id="structure">2 Structure</h2>
|
|
|
|
<p>InkML documents are well-formed XML documents which comply to
|
|
the syntax rules of this specification.</p>
|
|
|
|
<p>The namespace URI of InkML is
|
|
<code>http://www.w3.org/2003/InkML</code></p>
|
|
|
|
<p>The media type of InkML document is
|
|
<code>application/inkml+xml</code>. See the <a
|
|
href="#mime-definition">Media Type definition</a> for details. This
|
|
media type is expected to be registered with IETF.</p>
|
|
|
|
<h3 id="inkElement">2.1 <code><ink></code> element</h3>
|
|
|
|
<p>The <code>ink</code> element is the root element of any InkML
|
|
instance. When combining InkML and other XML elements within
|
|
applications, elements from different namespaces must be
|
|
disambiguated by use of the namespace qualifier. The allowed
|
|
sub-elements of the <code>ink</code> element can occur any number
|
|
of times, in any order.</p>
|
|
|
|
<h6 id="inkElementAttrs">Attributes:</h6>
|
|
|
|
<div class="attr"><b>documentID</b> = xsd:anyURI
|
|
<div class="attrdef">The unique identifier for this document.<br style="clear:none;" />
|
|
<em>Required:</em> no, <em>Default:</em> none<br
|
|
style="clear:none;" />
|
|
</div>
|
|
</div>
|
|
|
|
<div class="attrdef">
|
|
<p>A URI that uniquely identifies this document. No two documents
|
|
with a distinct application intent may have the same
|
|
<code>documentID</code> contents. The value of this property is an
|
|
opaque URI whose interpretation is not defined in this
|
|
specification.</p>
|
|
|
|
</div>
|
|
|
|
<h6 id="inkContents">Contents:</h6>
|
|
|
|
<div class="contents"><samp> <a
|
|
href="#trace">trace</a> ( <a
|
|
href="#definitionsElement">definitions</a>
|
|
<!-- | <a href="#brushElement">brush</a> -->
|
|
| <a href="#contextElement">context</a> | <a
|
|
href="#trace">trace</a> | <a href="#traceGroup">traceGroup</a> | <a
|
|
href="#traceViewElement">traceView</a> | <a
|
|
href="#annotationElement">annotation</a> | <a
|
|
href="#annotationXMLElement">annotationXML</a> )*</samp></div>
|
|
|
|
<h6 id="inkExample">Example:</h6>
|
|
|
|
<pre class="ex" xml:space="preserve">
|
|
<ink xmlns="http://www.w3.org/2003/InkML"
|
|
documentID="uuid:6B29FC40-CA47-1067-B31D-00DD010662DA">
|
|
...
|
|
</ink>
|
|
</pre>
|
|
</div>
|
|
|
|
<hr />
|
|
<h2 id="TraceIntro">3 Traces and Trace Formatting</h2>
|
|
|
|
<p><code><trace></code> is the basic element used to record
|
|
the trajectory of a pen as the user writes digital ink. More
|
|
specifically, these recordings describe sequences of connected
|
|
points. On most devices, these sequences of points will be bounded
|
|
by pen contact change events (pen-up and pen-down), although some
|
|
devices may simply record proximity and force data without
|
|
providing an interpretation of pen-up or pen-down state.</p>
|
|
|
|
<p>The simplest form of encoding specifies the X and Y coordinates
|
|
of each sample point. For compactness, it may be desirable to
|
|
specify absolute coordinates only for the first point in the trace
|
|
and use delta-x and delta-y values to encode subsequent points.
|
|
Some devices record acceleration rather than absolute or relative
|
|
position; some provide additional data that may be encoded in the
|
|
trace, including Z coordinates or tip force, or the state of side
|
|
switches or buttons.</p>
|
|
|
|
<p>These variations in the information available from different ink
|
|
sources, or needed by different applications, are supported in
|
|
InkML through the <code><traceFormat></code> and
|
|
<code><trace></code> elements. The
|
|
<code><traceFormat></code> element specifies the encoding
|
|
format for each sample of a recorded trace, while
|
|
<code><trace></code> elements are used to represent the
|
|
actual trace data. If no <code><traceFormat></code> is
|
|
specified, a default encoding format of X followed by Y coordinates
|
|
is assumed.</p>
|
|
|
|
<p>Traces generated by different devices, or used in differing
|
|
applications, may contain different types of information. InkML
|
|
defines <em><a href="#channel">channels</a></em> to describe the
|
|
data that may be encoded in a trace.</p>
|
|
|
|
<p>A channel can be characterized as either <em>regular</em>,
|
|
meaning that its value is recorded for every sample point of the
|
|
trace, or <em>intermittent</em>, meaning that its value may change
|
|
infrequently and thus will not necessarily be recorded for every
|
|
sample point. X and Y coordinates are examples of likely regular
|
|
channels, while the state of a pen button is likely to be an
|
|
intermittent channel.</p>
|
|
|
|
<h3 id="traceFormats">3.1 Trace Formats</h3>
|
|
|
|
<h4 id="traceFormat">3.1.1 <code><traceFormat></code>
|
|
element</h4>
|
|
|
|
<h6 id="traceFormatAttrs">Attributes:</h6>
|
|
|
|
<div class="attr"><b>xml:id</b> = xsd:ID<br style="clear:none;" />
|
|
|
|
|
|
<div class="attrdef">The unique identifier for this trace
|
|
format.<br style="clear:none;" />
|
|
<em>Required:</em> no, <em>Default:</em> none<br
|
|
style="clear:none;" />
|
|
</div>
|
|
</div>
|
|
|
|
<h6 id="traceFormatContents">Contents:</h6>
|
|
|
|
<div class="contents"><samp><a href="#channel">channel</a>* <a
|
|
href="#intermittentChannels">intermittentChannels</a>?</samp></div>
|
|
|
|
<p>The <code><traceFormat></code> element describes the
|
|
format used to encode points within <code><trace></code>
|
|
elements. In particular, it defines the sequence of channel values
|
|
that occurs within <code><trace></code> elements. The order
|
|
of declaration of channels in the <code><traceFormat></code>
|
|
element determines the order of appearance of their values within
|
|
<code><trace></code> elements.</p>
|
|
|
|
<p>Regular channels appear first in the <code><trace></code>,
|
|
followed by any intermittent channels. Correspondingly, the
|
|
<code><traceFormat></code> element contains an ordered
|
|
sequence of <code><channel></code>s, giving the regular
|
|
channels (if any), followed by an optional
|
|
<code><intermittentChannels></code> section. The order of the
|
|
coordinates in each point of a trace is determined by the order of
|
|
the <code><channel></code> elements in the trace format,
|
|
including those from the intermittent channels part.</p>
|
|
|
|
<p>The <code><context></code> element may use the <b>traceFormatRef</b>
|
|
attribute to refer to a <code><traceFormat></code> by it's id. If no <code><traceFormat></code>
|
|
is specified in an InkML file, an application defined default trace format is
|
|
used. The default trace has the reserved id "<code><strong>DefaultTraceFormat</strong></code>"
|
|
and may be explicitly referenced using the
|
|
URI "<code><strong>#DefaultTraceFormat</strong></code>".</p>
|
|
|
|
<h4 id="channel">3.1.2 <code><channel></code> element</h4>
|
|
|
|
<h6><a name="channelAttrs" id="channelAttrs">Attributes:</a></h6>
|
|
|
|
<div class="attr"><b>xml:id</b> = xsd:ID<br style="clear:none;" />
|
|
|
|
|
|
<div class="attrdef">The unique identifier for this element.<br
|
|
style="clear:none;" />
|
|
<em>Required:</em> no, <em>Default:</em> none<br
|
|
style="clear:none;" />
|
|
</div>
|
|
|
|
<br style="clear:none;" />
|
|
<b>name</b> = xsd:string<br style="clear:none;" />
|
|
|
|
|
|
<div class="attrdef">The case sensitive name of this channel.<br
|
|
style="clear:none;" />
|
|
<em>Required:</em> yes<br style="clear:none;" />
|
|
</div>
|
|
|
|
<br style="clear:none;" />
|
|
<b>type</b> = "integer" | "decimal" | "double" | "boolean"<br
|
|
style="clear:none;" />
|
|
|
|
|
|
<div class="attrdef">The data type of the point values for this
|
|
channel.<br style="clear:none;" />
|
|
<em>Required:</em> no, <em>Default:</em> "decimal"<br
|
|
style="clear:none;" />
|
|
</div>
|
|
|
|
<br style="clear:none;" />
|
|
<b>default</b> = xsd:decimal | xsd:boolean<br
|
|
style="clear:none;" />
|
|
|
|
|
|
<div class="attrdef">The default value of the point data for this
|
|
channel. This only applies to intermittent channels.<br
|
|
style="clear:none;" />
|
|
<em>Required:</em> no, <em>Default:</em> 0 (for integer or decimal
|
|
channel), F (for boolean channel)<br style="clear:none;" />
|
|
</div>
|
|
|
|
<br style="clear:none;" />
|
|
|
|
|
|
<div><b>min</b> = xsd:number<br style="clear:none;" />
|
|
|
|
|
|
<div class="attrdef">The lower boundary for the values of this
|
|
channel.<br style="clear:none;" />
|
|
<em>Required:</em> no, <em>Default:</em> none<br
|
|
style="clear:none;" />
|
|
</div>
|
|
|
|
<br style="clear:none;" />
|
|
<b>max</b> = xsd:number<br style="clear:none;" />
|
|
|
|
|
|
<div class="attrdef">The upper boundary for the values of this
|
|
channel.<br style="clear:none;" />
|
|
<em>Required:</em> no, <em>Default:</em> none<br
|
|
style="clear:none;" />
|
|
</div>
|
|
|
|
<br style="clear:none;" />
|
|
<b>orientation</b> = "+ve" | "-ve"<br style="clear:none;" />
|
|
|
|
|
|
<div class="attrdef">The orientation of increasing channel values
|
|
with respect to the default direction of the channel's coordinate
|
|
axis, where applicable.<br style="clear:none;" />
|
|
<em>Required:</em> no, <em>Default:</em> "+ve"<br
|
|
style="clear:none;" />
|
|
</div>
|
|
|
|
<br style="clear:none;" />
|
|
<b>respectTo</b> = xsd:anyURI<br style="clear:none;" />
|
|
|
|
|
|
<div class="attrdef">Specifies that the values are relative to
|
|
another reference point. The reference point may be the URI
|
|
of a <strong><span class="style1"><timestamp></span></strong>
|
|
for time channels, or an application defined URI for application
|
|
specific channels.<br style="clear:none;" />
|
|
<em>Required:</em> no, <em>Default:</em> none<br
|
|
style="clear:none;" />
|
|
</div>
|
|
|
|
<br style="clear:none;" />
|
|
<b>units</b> = xsd:string<br style="clear:none;" />
|
|
|
|
|
|
<div class="attrdef">The units in which the values of the channel
|
|
are expressed (numerical channels only).<br style="clear:none;" />
|
|
<em>Required:</em> no, <em>Default:</em> none<br
|
|
style="clear:none;" />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<h6><a name="channelContents"
|
|
id="channelContents">Contents:</a></h6>
|
|
|
|
<div class="contents">
|
|
<dl>
|
|
<dt><samp><a href="#mappingElement">mapping</a>?</samp></dt>
|
|
</dl>
|
|
</div>
|
|
|
|
<p>Channels are described using the <code><channel></code>
|
|
element, with various attributes.</p>
|
|
|
|
<p>The required <b>name</b> attribute specifies the interpretation
|
|
of the channel in the trace data. The following case sensitive channel names, with
|
|
their specified meanings, are reserved:</p>
|
|
|
|
<table border="1" cellspacing="0" cellpadding="3" width="80%"
|
|
class="channels" summary="">
|
|
<tbody>
|
|
<tr>
|
|
<th>channel name</th>
|
|
<th>dimension</th>
|
|
<th>default unit</th>
|
|
<th>interpretation</th>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td>X</td>
|
|
<td>length</td>
|
|
<td>mm</td>
|
|
<td>X coordinate. This is the horizontal pen position on the
|
|
writing surface, increasing to the right for +ve orientation.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td>Y</td>
|
|
<td>length</td>
|
|
<td>mm</td>
|
|
<td>Y coordinate. This is the vertical position on the writing
|
|
surface, increasing downward for +ve orientation.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td>Z</td>
|
|
<td>length</td>
|
|
<td>mm</td>
|
|
<td>Z coordinate. This is the height of pen above the writing
|
|
surface, increasing upward for +ve orientation.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td>F</td>
|
|
<td>force</td>
|
|
<td>%</td>
|
|
<td>pen tip force</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td>S</td>
|
|
<td> </td>
|
|
<td> </td>
|
|
<td>tip switch state (touching/not touching the writing
|
|
surface)</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td>B1...Bn</td>
|
|
<td> </td>
|
|
<td> </td>
|
|
<td>side button states</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td>OTx</td>
|
|
<td>angle</td>
|
|
<td>deg</td>
|
|
<td>tilt along the x-axis</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td>OTy</td>
|
|
<td>angle</td>
|
|
<td>deg</td>
|
|
<td>tilt along the y-axis</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td>OA</td>
|
|
<td>angle</td>
|
|
<td>deg</td>
|
|
<td>azimuth angle of the pen (yaw)</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td>OE</td>
|
|
<td>angle</td>
|
|
<td>deg</td>
|
|
<td>elevation angle of the pen (pitch)</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td>OR</td>
|
|
<td>angle</td>
|
|
<td>deg</td>
|
|
<td>rotation (counter-clockwise rotation about pen axis )</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td>C</td>
|
|
<td> </td>
|
|
<td> </td>
|
|
<td>color value as an RGB octet triple (i.e. #000000 to
|
|
#FFFFFF).</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td>CR,CG,CB</td>
|
|
<td> </td>
|
|
<td> </td>
|
|
<td>color values (Red/Green/Blue)</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td>CC,CM,CY,CK</td>
|
|
<td> </td>
|
|
<td> </td>
|
|
<td>color values (Cyan/Magenta/Yellow/Black)</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td>A</td>
|
|
<td> </td>
|
|
<td> </td>
|
|
<td>transparency (device-specific encoding)</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td>W</td>
|
|
<td>length</td>
|
|
<td>mm</td>
|
|
<td>stroke width (orthogonal to stroke)</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td colspan="1">BW</td>
|
|
<td colspan="1">length</td>
|
|
<td>mm</td>
|
|
<td colspan="1">brush width</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td colspan="1">BH</td>
|
|
<td colspan="1">length</td>
|
|
<td>mm</td>
|
|
<td colspan="1">brush height</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td>T</td>
|
|
<td>time</td>
|
|
<td>ms</td>
|
|
<td>time (of the sample point)</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
<p>The <b>type</b> attribute defines the encoding type for the
|
|
channel (either boolean, decimal, or integer). If <b>type</b> is
|
|
not specified, it defaults to decimal.</p>
|
|
|
|
<p>A default value can be specified for the channel using the
|
|
<b>default</b> attribute; the use of default values within a trace
|
|
is described in the next section. If no <b>default</b> is
|
|
specified, it is assumed to be zero for integer and decimal-valued
|
|
channels, and false for boolean channels.</p>
|
|
|
|
<div>
|
|
<p>The <b>min</b> and <b>max</b> attributes, if given, specify the
|
|
minimum and maximum possible values for a channel of type integer
|
|
or decimal. If neither is given, then there is no a prior bound on
|
|
the channel values. If one is given, then the channel values are
|
|
bounded above or below but unbounded in the other direction. If
|
|
both are given, then all channel values must fall within the
|
|
specified range.</p>
|
|
|
|
<p>The <b>orientation</b> attribute is applicable to channels of
|
|
integer or decimal type. It gives the meaning of increasing value.
|
|
For example, whether X increases to the left or the right. The
|
|
value may be given as "+ve" or "-ve", with "+ve" being the
|
|
default.</p>
|
|
|
|
<p>The <b>respectTo</b> attribute specifies the origin for channels
|
|
of integer or decimal type. For time channels, this is given as a
|
|
URI for a <code><timestamp></code> element. For other
|
|
application defined channels the URI is application-dependent.</p>
|
|
</div>
|
|
|
|
<p>Typically, a channel in the <code><traceFormat></code>
|
|
will map directly to a corresponding channel provided by the
|
|
digitizing device, and its values as recorded in the trace data
|
|
will be the original channel values recorded by the device.
|
|
However, for some applications, it may be useful to store
|
|
normalized channel values instead, or even to remap the channels
|
|
provided by the digitizing device to different channels in the
|
|
trace data. This correspondence between the trace data and the
|
|
device channels is recorded using a <code><mapping></code>
|
|
element (described in the <a href="#mappings">Mappings section</a>)
|
|
within the <code><channel></code> element. If no mapping is
|
|
specified for a channel, it is assumed to be unknown.</p>
|
|
|
|
<h4 id="intermittentChannels">3.1.3
|
|
<code><intermittentChannels></code> element</h4>
|
|
|
|
<h6><a name="intermittentChannelsAttrs"
|
|
id="intermittentChannelsAttrs">Attributes:</a></h6>
|
|
|
|
<div class="attr">none</div>
|
|
|
|
<h6><a name="intermittentChannelsContents"
|
|
id="intermittentChannelsContents">Contents:</a></h6>
|
|
|
|
<div class="contents">
|
|
<dl>
|
|
<dt><samp><a href="#channel">channel</a>*</samp></dt>
|
|
</dl>
|
|
</div>
|
|
|
|
<p>The <strong><span
|
|
class="style1"><intermittentChannels></span></strong> element
|
|
lists those channels whose value may optionally be recorded for
|
|
each sample point. The order of the enclosed channel
|
|
declarations gives the order of the intermittent channel data
|
|
samples within traces having this format. The <strong><span
|
|
class="style1"><intermittentChannels></span></strong> section
|
|
is optional and must appear after the regular
|
|
<strong><channel></strong> elements (if any) within a
|
|
<strong><traceFormat></strong> element.</p>
|
|
|
|
<h4 id="orientation">3.1.4 Orientation Channels</h4>
|
|
|
|
<p>The channels OTx, OTy, OA, OE and OR record pen orientation
|
|
data. Implementers may choose to use either pen azimuth OA and pen
|
|
elevation OE, or alternatively tilt angles OTx and OTy. The latter
|
|
are the angles of projections of the pen axis onto the XZ and YZ
|
|
planes, measured from the vertical. It is often useful to record
|
|
the sine of this angle, rather than the angle itself, as this is
|
|
usually more useful in calculations involving angles. The <code><a
|
|
href="#mappingElement"><mapping></a></code> element can be
|
|
employed to specify an applied sine transformation. While it is not
|
|
forbidden to use channels from different groups together (i.e. from
|
|
more than one of {OA, OE} and {OTx, OTy}), applications will not
|
|
normally do this.</p>
|
|
|
|
<p>The third degree of freedom in orientation is generally defined
|
|
as the rotation of the pen about its axis. This is potentially
|
|
useful (in combination with tilt) in application such as
|
|
illustration or calligraphy, and signature verification.</p>
|
|
|
|
<div class="figure">
|
|
<p><img src="azimuth.png"
|
|
alt="Diagram showing the azimuth and elevation of the pen"
|
|
width="212" height="224" /><img src="tilt.png"
|
|
alt="Diagram showing the tilt angles of the pen" width="198"
|
|
height="224" /></p>
|
|
|
|
<p class="caption">Figure 2: (a) azimuth and elevation angles, (b)
|
|
tilt angles</p>
|
|
</div>
|
|
|
|
<div class="figure">
|
|
<p><img src="projection.png"
|
|
alt="Diagram showing the pen orientation decomposition" width="211"
|
|
height="244" /><img src="rotation.png"
|
|
alt="Diagram showing the rotation angle around the axis of the pen"
|
|
width="198" height="244" /></p>
|
|
|
|
<p class="caption">Figure 3: (a) pen orientation decomposition, (b)
|
|
pen rotation</p>
|
|
</div>
|
|
|
|
<p>Figure 2a displays the pen orientation using Azimuth and
|
|
Elevation. The origin of the Azimuth is at the Y-axis. Azimuth
|
|
increases anticlockwise up to 360 degrees. The origin of Elevation
|
|
is located within the XY-plane. Elevation increases up to 90
|
|
degrees, at which point the pen is perpendicular to the
|
|
XY-plane.</p>
|
|
|
|
<p>Figure 2b explains the definition of the Tilt-X and the Tilt-Y
|
|
angles. For both the origin is along the Z-axis. Tilt-X increases
|
|
up to +90 degrees for inclinations along the positive X-axis and
|
|
decreases up to -90 degrees for inclinations along the negative
|
|
X-axis. Respectively, Tilt-Y is defined for pen inclinations along
|
|
the Y-axis.</p>
|
|
|
|
<p>Figure 3a displays the pen orientation decomposition as
|
|
functions of Azimuth/Elevation or alternatively as function of
|
|
Tilt-X/Tilt-Y. Thereby, elevations of the pen which are mapped to
|
|
the XZ- and to the YZ- plane lead to Tilt-X and Tilt-Y.</p>
|
|
|
|
<p>Figure 3b shows the Rotation of the pen along its longitudinal
|
|
axis. The departure of a reference mark or meridian on the
|
|
pen barrel from the nominal 'up' direction which may be constructed
|
|
by a ray perpendicular to the pen barrel (somewhere not at the tip)
|
|
and intersecting a pure-Z ray arising from the surface of the pen
|
|
passing through the tip. This angle is measured in a clockwise
|
|
direction when viewing the pen barrel from tail to tip, in
|
|
degrees.</p>
|
|
|
|
<div>
|
|
<h4 id="color">3.1.5 Color Channels</h4>
|
|
|
|
<p>The channels CR, CG, CB, CC, CM, CY, CK, C and A are defined to
|
|
record color and transparency data as captured by an optical
|
|
device, as generated by software or by other means.</p>
|
|
|
|
<p>The channels CR, CG, CB provide an additive color model for the
|
|
colors red, green and blue. The channels CC, CY, CM, CK provide a
|
|
subtractive color model for the colors cyan, magenta, yellow and
|
|
black. The channel C provides a mechanism to give color as a single
|
|
numerical value in the range #000000..#FFFFFF that encodes the
|
|
colors red, green and blue as three octets. While it is not
|
|
forbidden to use channels from different groups together (i.e. from
|
|
more than one of {C}, {CR, CG, CB} and {CC, CY, CM, CK}),
|
|
applications will not normally do this. The A channel records
|
|
transparency as an integer. The value 0 represents opaque ink and
|
|
the maximum permissible value represents complete transparency.</p>
|
|
|
|
<p>Color channels are intended for use when these values are part
|
|
of the data itself and hence potentially changing from one sample
|
|
to the next. Strokes with constant color may more economically be
|
|
described with reference to a <code><brush></code>
|
|
element.</p>
|
|
|
|
<p>It is legitimate for an application to have an accessibility
|
|
mode or alternative rendering mode where the explicit color values
|
|
in the InkML are reinterpreted as other colors for better
|
|
accessibility or suitability of the rendering device. Examples of
|
|
this would be mapping color to black and white for monochrome
|
|
devices or to high-contrast colors for greater visibility.</p>
|
|
</div>
|
|
|
|
<h4 id="width">3.1.6 Width Channels</h4>
|
|
|
|
<div>
|
|
<p>Three channels are provided to provide stroke width
|
|
information. </p>
|
|
|
|
<p>The channel W is provided for recording stroke width. The value
|
|
is in length units and is the diameter of the larger circle that
|
|
can be inscribed within the trace locus. This allows optical
|
|
devices to record measured stroke width and allows applications
|
|
that generate InkML to specify desired width for rendering.</p>
|
|
|
|
<p>The channels BW and BH are defined to record the brush width and
|
|
height at each point. The meaning of the width and height is
|
|
defined by the brush tip shape, as given by a
|
|
<code><brushProperty>. </code></p>
|
|
|
|
<p>As with the color channels, the width channels are intended for
|
|
use when this quantity is part of the data itself and hence
|
|
potentially changing from one sample to the next. Strokes with
|
|
constant width may more economically be described with reference to
|
|
a <code><brush></code> element with <strong>width</strong>
|
|
and <strong>height</strong> properties.</p>
|
|
</div>
|
|
|
|
<h4 id="time">3.1.7 Time Channel</h4>
|
|
|
|
<p>The time channel allows for detailed recording of the timing
|
|
information for each sample point within a trace. This can be
|
|
useful if the digitizing device has a non-uniform sampling rate,
|
|
for example, or in cases where duplicate point data is removed for
|
|
the sake of compactness.</p>
|
|
|
|
<p>The time channel can be specified as either a regular or
|
|
intermittent channel. When specified as a regular channel, the
|
|
single quote prefix can be used to record incremental time between
|
|
successive points. The
|
|
value of the time channel for a given sample point is defined to be
|
|
the timestamp of that point in the units and frame of reference
|
|
specified by the <strong>respectTo</strong> attribute of the time
|
|
channel that is defined in the associated <a
|
|
href="#traceFormat"><code class="style4"><traceFormat></code></a> of the
|
|
trace.</p>
|
|
|
|
<p>As with the other predefined channels, the meaning of the integer or decimal
|
|
values recorded by the time channel in a given trace is defined by the trace's
|
|
associated <strong><span
|
|
class="style1"><traceFormat></span></strong>. In the case of
|
|
the time channel, its <strong><span
|
|
class="style1"><channel></span></strong> element contains
|
|
both a <b>units</b> and <b>respectTo</b> attribute.</p>
|
|
|
|
<p>The <b>units</b> attribute gives the units of the recorded time
|
|
values, and the <b>respectTo</b> attribute describes the frame of
|
|
reference for those recorded values. The value of the
|
|
<b>respectTo</b> attribute is a reference to a time stamp. If it is
|
|
not given, the time channel values are relative to the beginning
|
|
timestamps of the individual traces in which they appear.</p>
|
|
|
|
<div>
|
|
<p>The following example defines a time channel whose values for a
|
|
given point are the relative to the timestamp referred to by
|
|
<tt>#ts1</tt>:</p>
|
|
|
|
<pre class="ex" xml:space="preserve">
|
|
<channel name="T"
|
|
type="integer"
|
|
units="ms"
|
|
respectTo="#ts1" />
|
|
</pre>
|
|
</div>
|
|
|
|
<p>If no <strong><span
|
|
class="style1"><traceFormat></span></strong> information is provided, or
|
|
if no value is specified for the <b>respectTo</b> attribute, the
|
|
ink processor cannot make any assumption about the relative timing
|
|
of points within different traces. Likewise, if no units are
|
|
specified, no assumption can be made about the units of the time
|
|
channel data.</p>
|
|
|
|
<h4 id="user">3.1.8 User Defined Channels</h4>
|
|
|
|
<p>In addition to the pre-defined channels, user-defined channels
|
|
are allowed, although their interpretation is not required by
|
|
conforming ink markup processors.</p>
|
|
|
|
<div>
|
|
<p>When specifying a number of related channels, it is recommended
|
|
to use a common prefix. For example, direction-sensitive stylus
|
|
force could be named FX, FY, FZ.</p>
|
|
|
|
<p>User defined channels may be used to describe ink traces in
|
|
non-Cartesian coordinate systems, using various compression
|
|
schemes, or with supplementary information. Channels need not
|
|
describe properties of the digital ink, per se, but may be used to
|
|
provide additional information in the ink stream. For
|
|
example, a user defined channels could give information about
|
|
changing lighting conditions.</p>
|
|
</div>
|
|
|
|
<h4 id="specifying">3.1.9 Specifying Trace Formats</h4>
|
|
|
|
<p id="ex-tracefmt">The following example defines a
|
|
<code><traceFormat></code> which reports decimal-valued X and
|
|
Y coordinates for each point, and intermittent boolean values for
|
|
the states of two buttons B1 and B2, which have default values of F
|
|
("false"):</p>
|
|
|
|
<pre class="ex" xml:space="preserve">
|
|
<traceFormat xml:id="xyb1b2">
|
|
<channel name="X" type="decimal">
|
|
<mapping type="identity"/>
|
|
</channel>
|
|
<channel name="Y" type="decimal">
|
|
<mapping type="identity"/>
|
|
</channel>
|
|
|
|
<intermittentChannels>
|
|
<channel name="B1" type="boolean" default="F">
|
|
<mapping type="identity"/>
|
|
</channel>
|
|
<channel name="B2" type="boolean" default="F">
|
|
<mapping type="identity"/>
|
|
</channel>
|
|
</intermittentChannels>
|
|
</traceFormat>
|
|
</pre>
|
|
|
|
<p id="default-tracefmt">The appearance of a
|
|
<code><traceFormat></code> element in an InkML file both
|
|
defines the format and installs it as the current format for
|
|
subsequent traces except within a <a href="#definitionsElement"
|
|
shape="rect"><code><definitions></code></a> block (see <a
|
|
href="#specifying">Specifying Trace Formats</a>). The <b>id</b>
|
|
attribute of a <code><traceFormat></code> allows the format
|
|
to be reused by multiple contexts (see the <a
|
|
href="#contextElement">Context</a> section). If no
|
|
<code><traceFormat></code> is specified, the following
|
|
default format is assumed:</p>
|
|
|
|
<pre class="ex" xml:space="preserve">
|
|
<traceFormat xml:id="DefaultTraceFormat">
|
|
<channel name="X" type="decimal"/>
|
|
<channel name="Y" type="decimal"/>
|
|
</traceFormat>
|
|
</pre>
|
|
|
|
<p>Thus, in the simplest case, an InkML file may contain nothing
|
|
but <code><trace></code> elements within an <code><ink></code> element.</p>
|
|
|
|
<h3 id="traces">3.2 Traces</h3>
|
|
|
|
<div>
|
|
<h4 id="trace">3.2.1 <code><trace></code> element</h4>
|
|
|
|
<h6><a name="traceAttrs" id="traceAttrs">Attributes:</a></h6>
|
|
|
|
<div class="attr"><b>xml:id</b> = xsd:ID<br style="clear:none;" />
|
|
|
|
|
|
<div class="attrdef">The identifier for this trace.<br
|
|
style="clear:none;" />
|
|
<em>Required:</em> no, <em>Default:</em> none<br
|
|
style="clear:none;" />
|
|
</div>
|
|
|
|
<br style="clear:none;" />
|
|
<b>type</b> = "penDown" | "penUp" | "indeterminate"<br
|
|
style="clear:none;" />
|
|
|
|
|
|
<div class="attrdef">The type of this trace.<br
|
|
style="clear:none;" />
|
|
<em>Required:</em> no, <em>Default:</em> "penDown"<br
|
|
style="clear:none;" />
|
|
</div>
|
|
|
|
<br style="clear:none;" />
|
|
|
|
|
|
<div><b>continuation</b> = "begin" | "middle" | "end"<br
|
|
style="clear:none;" />
|
|
|
|
|
|
<div class="attrdef">This attribute indicates whether this trace is
|
|
a trace fragment, and if so, where this trace is located in the set
|
|
of continuation traces. <em><br />
|
|
Required:</em> no, <em>Default:</em>
|
|
none</div>
|
|
|
|
<br style="clear:none;" />
|
|
</div>
|
|
|
|
<div><b>priorRef</b> = xsd:anyURI<br style="clear:none;" />
|
|
|
|
|
|
<div class="attrdef">The URI of the trace this one is a
|
|
continuation of.<br style="clear:none;" />
|
|
<em>Required:</em> if and only if
|
|
<code><strong>continuation</strong></code> has values "end" or
|
|
"middle", <em>Default:</em> none<br style="clear:none;" />
|
|
</div>
|
|
|
|
<br style="clear:none;" />
|
|
</div>
|
|
|
|
<div><b>contextRef</b> = xsd:anyURI<br style="clear:none;" />
|
|
|
|
|
|
<div class="attrdef">The context for this trace. Any values in this
|
|
context over-ride the values in the inherited context.<br
|
|
style="clear:none;" />
|
|
<em>Required:</em> no, <em>Default:</em>
|
|
"<code><strong>#DefaultContext</strong></code>," unless this
|
|
<strong><span class="style1"><trace></span></strong> is
|
|
contained within a <strong><span
|
|
class="style1"><traceGroup></span></strong>, then inherit
|
|
from the <strong><span
|
|
class="style1"><traceGroup>.</span></strong><br
|
|
style="clear:none;" />
|
|
</div>
|
|
</div>
|
|
|
|
<br style="clear:none;" />
|
|
<b>brushRef</b> = xsd:anyURI<br style="clear:none;" />
|
|
|
|
|
|
<div class="attrdef">The brush for this trace.<br
|
|
style="clear:none;" />
|
|
<em>Required:</em> no, <em>Default:</em> Inherited from context.<br
|
|
style="clear:none;" />
|
|
</div>
|
|
|
|
<br style="clear:none;" />
|
|
<b>duration</b> = xsd:decimal<br style="clear:none;" />
|
|
|
|
|
|
<div class="attrdef">The duration of this trace, in
|
|
milliseconds.<br style="clear:none;" />
|
|
<em>Required:</em> no, <em>Default:</em> none<br
|
|
style="clear:none;" />
|
|
</div>
|
|
|
|
<br style="clear:none;" />
|
|
<b>timeOffset</b> = xsd:decimal<br style="clear:none;" />
|
|
|
|
|
|
<div class="attrdef">The relative timestamp or time-of-day for the
|
|
start of this trace, in milliseconds.<br style="clear:none;" />
|
|
<em>Required:</em> no, <em>Default:</em> none<br
|
|
style="clear:none;" />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<h6><a name="traceContents" id="traceContents">Contents:</a></h6>
|
|
|
|
<div class="nlcontents">
|
|
<p>The following grammar defines the syntax of the data that
|
|
appears within a <code><trace></code> element. It is
|
|
described using the subset of Extended Backus-Naur Form defined in the Notation
|
|
section of the <cite class="w3crec">Extensible
|
|
Markup Language (XML) 1.0 (Fourth Edition) </cite>specification [<a href="#EBNF">EBNF</a>].
|
|
This subset of EBNF includes the following
|
|
notation:</p>
|
|
|
|
<ul>
|
|
<li>*: 0 or more</li>
|
|
|
|
<li>+: 1 or more</li>
|
|
|
|
<li>?: 0 or 1</li>
|
|
|
|
<li>(): grouping</li>
|
|
|
|
<li>|: separates alternatives</li>
|
|
|
|
<li>double or single quotes surround literals</li>
|
|
|
|
<li>#x precedes hex character codes</li>
|
|
</ul>
|
|
|
|
<div>
|
|
<p>The grammar is as follows:</p>
|
|
|
|
<pre class="grammar" xml:space="preserve">
|
|
trace ::= point ("," point)* ","? wsp*
|
|
|
|
point ::= (wsp* value)+ wsp*
|
|
|
|
value ::= difference_order? wsp* "-"? wsp* number | "T" | "F" | "*" | "?"
|
|
|
|
number ::= (decimal | double | hex)
|
|
|
|
double ::= decimal ("e"|"E") ("+"|"-")? digit+
|
|
|
|
decimal ::= digit+ ("." digit*)? | "." digit+
|
|
|
|
hex ::= "#" (digit | "A" | "B" | "C" | "D" | "E" | "F")+
|
|
|
|
difference_order ::= ("!" | "'" | '"')
|
|
|
|
digit ::= ("0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9")
|
|
|
|
wsp ::= (#x20 | #x9 | #xD | #xA)
|
|
</pre>
|
|
|
|
Additionally, <em>wsp</em> <b>may</b> occur anywhere except within
|
|
a <em>decimal, float</em> or <em>hex</em> and <b>must</b> occur if
|
|
required to separate two <em>values</em>. Otherwise the longest
|
|
token is matched. For example, "3245" requires an internal
|
|
<em>wsp</em> character if it is to be interpreted as two decimal
|
|
numbers, "32" and "45". On the other hand, "0.923.45" will be
|
|
interpreted as "0.923" and ".45".</div>
|
|
|
|
<div>
|
|
<p>The number of <em>value</em> tokens appearing within each point
|
|
must be at least equal to the number of regular channels and be no
|
|
more than the number of regular channels plus the number of
|
|
intermittent channels.</p>
|
|
</div>
|
|
</div>
|
|
|
|
<p>The <code><trace></code> element is used to record the
|
|
data captured by the digitizer. It contains a sequence of points
|
|
encoded according to the specification given by the
|
|
<code><traceFormat></code> element.</p>
|
|
|
|
<p>The <b>type</b> attribute of a <code><trace></code>
|
|
indicates the pen contact state (either "<code>penUp</code>" or
|
|
"<code>penDown</code>") during its recording. A value of
|
|
"<code>indeterminate</code>" is used if the contact-state is
|
|
neither pen-up nor pen-down, and may be either unknown or variable
|
|
within the trace. For example, a signature may be captured as a
|
|
single indeterminate trace containing both the actual writing and
|
|
the trajectory of the pen between strokes. The values of the tip switch
|
|
state channel "S", if present in the trace, overrides the value of the <strong>
|
|
type</strong> attribute.</p>
|
|
|
|
<p>If a <code>continuation</code> attribute is present, it
|
|
indicates that the current trace is a continuation trace, i.e. its
|
|
points are a temporally contiguous continuation of (and thus should
|
|
be connected to) another trace element. The possible values of the
|
|
attribute are:</p>
|
|
|
|
<ul>
|
|
<li><code>begin</code>: the current trace is the first of the set
|
|
of continuation traces</li>
|
|
|
|
<li><code>end</code>: the current trace is the last of the set of
|
|
continuation traces</li>
|
|
|
|
<li><code>middle</code>: the current trace is a continuation trace,
|
|
but is neither the first nor the last in the set of traces</li>
|
|
</ul>
|
|
|
|
<p>If the current trace is a continuation trace but is not the
|
|
first trace in the set (i.e. the <code>continuation</code>
|
|
attribute has value <code>middle</code> or <code>end</code>) then a
|
|
<code>priorRef</code> attribute must be present and must contain
|
|
the URI of the trace of which the current trace is a continuation.
|
|
A <code>begin</code> or <code>middle</code> trace can be the prior
|
|
trace for exactly one trace. An <code>end</code> trace cannot be
|
|
the prior trace of any other trace.</p>
|
|
|
|
<p>Regular channels may be reported as explicit values,
|
|
differences, or second differences: Prefix symbols are used to
|
|
indicate the interpretation of a value: a preceding exclamation
|
|
point (<code>!</code>) indicates an explicit value, a single quote
|
|
(<code>'</code>) indicates a single difference, and a double quote
|
|
prefix (<code>"</code>) indicates a second difference. If there is
|
|
no prefix, then the channel value is interpreted as explicit,
|
|
difference, or second difference based on the last prefix for the
|
|
channel. If there is no last prefix, the value is interpreted as
|
|
explicit.</p>
|
|
|
|
<p>A second difference encoding must be preceded by a single
|
|
difference representation; which, in turn, must be preceded with an
|
|
explicit encoding.</p>
|
|
|
|
<p>All traces must begin with an explicit value, not with a first
|
|
or second difference. This is true of continuation traces as well.
|
|
This allows the location and velocity state information to be
|
|
discarded at the end of each trace, simplifying parser
|
|
design. This is true for continuation traces.</p>
|
|
|
|
<p>Both regular and intermittent channels may be encoded with the
|
|
wildcard character "*". This wildcard character means either that
|
|
the value of the channel remains at the previous channel value (if
|
|
explicit), or that the channel continues integrating with the
|
|
previous velocity or acceleration values, as appropriate.</p>
|
|
|
|
<div>
|
|
<p>Intermittent channels may be encoded with the wildcard character
|
|
"?". This means that a value of a channel is not given at that
|
|
point. It is useful when there are several independent intermittent
|
|
channels, and they do not always report simultaneously, e.g.</p>
|
|
|
|
<pre class="ex" xml:space="preserve">
|
|
<trace> 11 12 9, 21 22 ? T, 31 32, 41 42 5, 51 52 ? F</trace>
|
|
</pre>
|
|
</div>
|
|
|
|
<p>Booleans are encoded as "T" or "F".</p>
|
|
|
|
<p>For each point in the trace, regular channel values are reported
|
|
first in the order given by the <code><channel></code>
|
|
elements of the applicable <code><traceFormat></code>. All
|
|
regular channels must be reported, if only with the explicit
|
|
wildcard "*". If any intermittent values are reported for the
|
|
point, they are given next, in the order given by the
|
|
<code><intermittentChannels></code> elements of the
|
|
applicable <code><traceFormat></code>. Unreported
|
|
intermittent channels are interpreted as though they were given by
|
|
the wildcard "*".</p>
|
|
|
|
<p id="ex-trace">Here is an example of a trace of 11 points, using
|
|
the following traceFormat:</p>
|
|
|
|
<pre class="ex" xml:space="preserve">
|
|
<traceFormat>
|
|
<channel name="X" type="decimal"/>
|
|
<channel name="Y" type="decimal"/>
|
|
|
|
<intermittentChannels>
|
|
<channel name="B1" type="boolean" default="F"/>
|
|
<channel name="B2" type="boolean" default="F"/>
|
|
</intermittentChannels>
|
|
</traceFormat>
|
|
|
|
<trace xml:id="id4525abc">
|
|
1125 18432,'23'43,"7"-8,3-5,7 -3,6 2,6 8,3 6 T,2 4*T,3 6,3-6 F F
|
|
</trace>
|
|
</pre>
|
|
|
|
<p>The trace is interpreted as follows:</p>
|
|
|
|
<table border="1" cellspacing="0" cellpadding="3" width="80%"
|
|
class="trace" summary="">
|
|
<tbody>
|
|
<tr>
|
|
<th rowspan="1" colspan="1">Trace</th>
|
|
<th rowspan="1" colspan="1">X</th>
|
|
<th rowspan="1" colspan="1">Y</th>
|
|
<th rowspan="1" colspan="1">vx</th>
|
|
<th rowspan="1" colspan="1">vy</th>
|
|
<th rowspan="1" colspan="1">B1</th>
|
|
<th rowspan="1" colspan="1">B2</th>
|
|
<th rowspan="1" colspan="1">Comments</th>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td class="trace" rowspan="1" colspan="1">1125 18432</td>
|
|
<td rowspan="1" colspan="1">1125</td>
|
|
<td rowspan="1" colspan="1">18432</td>
|
|
<td rowspan="1" colspan="1">?</td>
|
|
<td rowspan="1" colspan="1">?</td>
|
|
<td rowspan="1" colspan="1">F</td>
|
|
<td rowspan="1" colspan="1">F</td>
|
|
<td rowspan="1" colspan="1">button default values</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td class="trace" rowspan="1" colspan="1">'23'43</td>
|
|
<td rowspan="1" colspan="1">1148</td>
|
|
<td rowspan="1" colspan="1">18475</td>
|
|
<td rowspan="1" colspan="1">23</td>
|
|
<td rowspan="1" colspan="1">43</td>
|
|
<td rowspan="1" colspan="1">F</td>
|
|
<td rowspan="1" colspan="1">F</td>
|
|
<td rowspan="1" colspan="1">velocity values</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td class="trace" rowspan="1" colspan="1">"7"-8</td>
|
|
<td rowspan="1" colspan="1">1178</td>
|
|
<td rowspan="1" colspan="1">18510</td>
|
|
<td rowspan="1" colspan="1">30</td>
|
|
<td rowspan="1" colspan="1">35</td>
|
|
<td rowspan="1" colspan="1">F</td>
|
|
<td rowspan="1" colspan="1">F</td>
|
|
<td rowspan="1" colspan="1">acceleration Values</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td class="trace" rowspan="1" colspan="1">3-5</td>
|
|
<td rowspan="1" colspan="1">1211</td>
|
|
<td rowspan="1" colspan="1">18540</td>
|
|
<td rowspan="1" colspan="1">33</td>
|
|
<td rowspan="1" colspan="1">30</td>
|
|
<td rowspan="1" colspan="1">F</td>
|
|
<td rowspan="1" colspan="1">F</td>
|
|
<td rowspan="1" colspan="1">implicit acceleration<br
|
|
style="clear:none;" />
|
|
no whitespace needed</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td class="trace" rowspan="1" colspan="1">7 -3</td>
|
|
<td rowspan="1" colspan="1">1251</td>
|
|
<td rowspan="1" colspan="1">18567</td>
|
|
<td rowspan="1" colspan="1">40</td>
|
|
<td rowspan="1" colspan="1">27</td>
|
|
<td rowspan="1" colspan="1">F</td>
|
|
<td rowspan="1" colspan="1">F</td>
|
|
<td rowspan="1" colspan="1">optional whitespace</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td class="trace" rowspan="1" colspan="1">6 2</td>
|
|
<td rowspan="1" colspan="1">1297</td>
|
|
<td rowspan="1" colspan="1">18596</td>
|
|
<td rowspan="1" colspan="1">46</td>
|
|
<td rowspan="1" colspan="1">29</td>
|
|
<td rowspan="1" colspan="1">F</td>
|
|
<td rowspan="1" colspan="1">F</td>
|
|
<td rowspan="1" colspan="1">whitespace required</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td class="trace" rowspan="1" colspan="1">6 8</td>
|
|
<td rowspan="1" colspan="1">1349</td>
|
|
<td rowspan="1" colspan="1">18633</td>
|
|
<td rowspan="1" colspan="1">52</td>
|
|
<td rowspan="1" colspan="1">37</td>
|
|
<td rowspan="1" colspan="1">F</td>
|
|
<td rowspan="1" colspan="1">F</td>
|
|
<td rowspan="1" colspan="1"> </td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td class="trace" rowspan="1" colspan="1">3 6 T</td>
|
|
<td rowspan="1" colspan="1">1404</td>
|
|
<td rowspan="1" colspan="1">18676</td>
|
|
<td rowspan="1" colspan="1">55</td>
|
|
<td rowspan="1" colspan="1">43</td>
|
|
<td rowspan="1" colspan="1">T</td>
|
|
<td rowspan="1" colspan="1">F</td>
|
|
<td rowspan="1" colspan="1">an optional value</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td class="trace" rowspan="1" colspan="1">2 4*T</td>
|
|
<td rowspan="1" colspan="1">1461</td>
|
|
<td rowspan="1" colspan="1">18723</td>
|
|
<td rowspan="1" colspan="1">57</td>
|
|
<td rowspan="1" colspan="1">47</td>
|
|
<td rowspan="1" colspan="1">T</td>
|
|
<td rowspan="1" colspan="1">T</td>
|
|
<td rowspan="1" colspan="1">wildcard</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td class="trace" rowspan="1" colspan="1">3 6</td>
|
|
<td rowspan="1" colspan="1">1521</td>
|
|
<td rowspan="1" colspan="1">18776</td>
|
|
<td rowspan="1" colspan="1">60</td>
|
|
<td rowspan="1" colspan="1">53</td>
|
|
<td rowspan="1" colspan="1">T</td>
|
|
<td rowspan="1" colspan="1">T</td>
|
|
<td rowspan="1" colspan="1">optional keep last</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td class="trace" rowspan="1" colspan="1">3-6 F F</td>
|
|
<td rowspan="1" colspan="1">1584</td>
|
|
<td rowspan="1" colspan="1">18823</td>
|
|
<td rowspan="1" colspan="1">63</td>
|
|
<td rowspan="1" colspan="1">47</td>
|
|
<td rowspan="1" colspan="1">F</td>
|
|
<td rowspan="1" colspan="1">F</td>
|
|
<td rowspan="1" colspan="1">optionals</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
<p>An ink markup generator might also include additional whitespace
|
|
formatting for clarity. The following trace specification is
|
|
identical in meaning to the more compact version shown above:</p>
|
|
|
|
<div>
|
|
<pre class="ex" xml:space="preserve">
|
|
<trace xml:id="id4525abc">
|
|
1125 18432,
|
|
'23 '43,
|
|
"7 "-8,
|
|
3 -5,
|
|
7 -3,
|
|
6 2,
|
|
6 8,
|
|
3 6 T,
|
|
2 4 * T,
|
|
3 6,
|
|
3 -6 F F
|
|
</trace>
|
|
</pre>
|
|
</div>
|
|
|
|
<div>
|
|
<p>Note: see Appendix B <a href="#guidelines">Implementation
|
|
Guidelines</a> for information about reducing file or stream
|
|
size.</p>
|
|
</div>
|
|
|
|
<div>
|
|
<h3 id="traceCollections">3.3 Trace Collections</h3>
|
|
|
|
<p>InkML provides mechanisms to gather and combine traces into
|
|
structured collections via the <code><traceGroup></code> and
|
|
<code><traceView></code> elements. These allow multiple
|
|
traces or groups to be treated as single units for the purposes of
|
|
referencing, attaching context information, semantic labeling, or
|
|
application-specific needs. The <code><traceGroup></code>
|
|
element gathers <code><trace></code> other
|
|
<code><traceGroup></code> or <code><traceView></code>
|
|
elements into a unit. The <code><traceView></code> element
|
|
refers to existing <code><trace></code>,
|
|
<code><traceGroup></code> or other
|
|
<code><traceView></code> elements to provide alternative
|
|
views or organization on the ink. For example, a diagramming
|
|
application may record a stream of fixed-length
|
|
<code><trace></code> packages, organized as continuations,
|
|
and use <code><traceGroup></code> elements containing
|
|
<code><traceView></code> elements to record the logical
|
|
structure of the diagram.</p>
|
|
</div>
|
|
|
|
<h4 id="traceGroup">3.3.1 <code><traceGroup></code>
|
|
element</h4>
|
|
|
|
<h6><a id="traceGroupAttrs"
|
|
name="traceGroupAttrs">Attributes:</a></h6>
|
|
|
|
<div class="attr"><b>xml:id</b> = xsd:ID<br style="clear:none;" />
|
|
|
|
|
|
<div class="attrdef">The identifier for this traceGroup.<br
|
|
style="clear:none;" />
|
|
<em>Required:</em> no, <em>Default:</em> none<br
|
|
style="clear:none;" />
|
|
</div>
|
|
|
|
<br style="clear:none;" />
|
|
<b>contextRef</b> = xsd:anyURI<br style="clear:none;" />
|
|
|
|
|
|
<div class="attrdef">The context associated with this
|
|
traceGroup.<br style="clear:none;" />
|
|
<em>Required:</em> no, <em>Default:</em>
|
|
"<code><strong>#DefaultContext</strong></code>," unless this
|
|
<strong><span class="style1"><traceGroup></span></strong> is
|
|
contained within another <strong><span
|
|
class="style1"><traceGroup></span></strong>, then inherit
|
|
from the containing <strong><span
|
|
class="style1"><traceGroup>.</span></strong><br
|
|
style="clear:none;" />
|
|
</div>
|
|
|
|
<br style="clear:none;" />
|
|
<b>brushRef</b> = xsd:anyURI<br style="clear:none;" />
|
|
|
|
|
|
<div class="attrdef">The brush associated with this <strong><span
|
|
class="style1"><traceGroup></span></strong>.<br
|
|
style="clear:none;" />
|
|
<em>Required:</em> no, <em>Default:</em> Inherited from context<br
|
|
style="clear:none;" />
|
|
</div>
|
|
</div>
|
|
|
|
<h6><a name="traceGroupContents"
|
|
id="traceGroupContents">Contents:</a></h6>
|
|
|
|
<div class="contents">
|
|
<dl>
|
|
<dt><samp>( <a href="#trace">trace</a> | <a
|
|
href="#traceGroup">traceGroup</a> | <a
|
|
href="#traceViewElement">traceView</a>| <a
|
|
href="#annotationElement">annotation</a> | <a
|
|
href="#annotationXMLElement">annotationXML</a> )*</samp></dt>
|
|
</dl>
|
|
</div>
|
|
|
|
<p>The <code><traceGroup></code> element is used to group
|
|
successive traces which share common characteristics, such as the
|
|
same <code><traceFormat></code>. The brush and context
|
|
sections describe other contextual values that can be specified for
|
|
a <code><traceGroup></code>. In the following example the two
|
|
traces enclosed in the <code><traceGroup></code> share the
|
|
same brush (see the <a href="#brushes">Brushes</a> section for a
|
|
description of brushes).</p>
|
|
|
|
<pre class="ex" xml:space="preserve">
|
|
<traceGroup brushRef="#penA">
|
|
<trace>...</trace>
|
|
<trace>...</trace>
|
|
</traceGroup>
|
|
</pre>
|
|
|
|
<p>The <code><traceGroup></code> element may be used for
|
|
various purposes, such as to group traces according to their
|
|
properties at the time of capture or according to computed
|
|
recognition results. The element may be nested, and it may be used
|
|
as a generic grouping mechanism, e.g. for the semantic labeling of
|
|
traces.</p>
|
|
|
|
<p>Trace groups are the primary mechanism for assigning
|
|
<code><context></code> to traces in archival ink markup. For
|
|
additional details about this usage, see the <a href="#Archival"
|
|
shape="rect">Archival Applications</a> section.</p>
|
|
|
|
<div>
|
|
<h4 id="traceViewElement">3.3.2 <code><traceView></code>
|
|
element</h4>
|
|
|
|
<h6><a id="traceViewAttrs"
|
|
name="traceViewAttrs">Attributes:</a></h6>
|
|
|
|
<div class="attr"><b>xml:id</b> = xsd:ID<br style="clear:none;" />
|
|
|
|
|
|
<div class="attrdef">The identifier for this traceView.<br
|
|
style="clear:none;" />
|
|
<em>Required:</em> no, <em>Default:</em> none<br
|
|
style="clear:none;" />
|
|
</div>
|
|
|
|
<br style="clear:none;" />
|
|
<b>traceDataRef</b> = xsd:anyURI<br style="clear:none;" />
|
|
|
|
|
|
<div class="attrdef">A URI reference to a
|
|
<code><trace></code>, <code><traceGroup></code> or
|
|
<code><traceView></code> element.<br style="clear:none;" />
|
|
<em>Required:</em> yes, <em>Default:</em> none<br
|
|
style="clear:none;" />
|
|
</div>
|
|
|
|
<br style="clear:none;" />
|
|
<b>from</b> = xsd:integer[ ':' xsd:integer ]*<br
|
|
style="clear:none;" />
|
|
<div class="attrdef">The index of the first item (point, trace or
|
|
group) in the trace or trace group that this
|
|
<code><traceView></code> element references.<br
|
|
style="clear:none;" />
|
|
<em>Required:</em> no, <em>Default:</em> the index of the first
|
|
referenced point (see prose)</div>
|
|
|
|
<br style="clear:none;" />
|
|
<b>to</b> = xsd:integer[ ':' xsd:integer ]*<br
|
|
style="clear:none;" />
|
|
|
|
|
|
<div class="attrdef">The index of the last item (point, trace or
|
|
group) in the trace or trace group that this
|
|
<code><traceView></code> element references.<br
|
|
style="clear:none;" />
|
|
<em>Required:</em> no, <em>Default:</em> the index of the last
|
|
referenced point (see prose)</div>
|
|
</div>
|
|
|
|
<h6><a name="traceViewContents"
|
|
id="traceViewContents">Contents:</a></h6>
|
|
|
|
<div class="contents">
|
|
<dl>
|
|
<dt><samp>EMPTY</samp></dt>
|
|
</dl>
|
|
</div>
|
|
|
|
<p>The <code><traceView></code> element is used to include
|
|
traces by reference from the current document or other documents. A
|
|
common use is to group a collection of
|
|
<code><traceView></code> elements in a
|
|
<code><traceGroup></code> to provide annotations.</p>
|
|
|
|
<p>Together, <strong>traceDataRef</strong>, <strong>from</strong>
|
|
and <strong>to</strong> refer to another element and select part of
|
|
it. A <strong>traceDataRef</strong> attribute may refer to a
|
|
<code><trace></code>, a <code><traceGroup></code> or
|
|
another <code><traceView></code>.</p>
|
|
|
|
<p>A missing <strong>from</strong> attribute is equivalent to
|
|
selecting the first point in the (recursively) first child of the
|
|
referenced element. A missing <strong>to</strong> attribute is
|
|
equivalent to selecting the last point in the (recursively) last
|
|
child of the referenced element. With these defaults, the
|
|
<code><traceView></code> selects the portion of the
|
|
referenced element from the first point to the last point,
|
|
inclusive. If neither a <strong>to</strong> nor
|
|
<strong>from</strong> attribute is given, this implies the entire
|
|
referenced element is selected.</p>
|
|
|
|
<p>Any value of a <strong>from</strong> or <strong>to</strong>
|
|
attribute is a colon-separated list of integers, whose meaning is
|
|
defined as follows: An empty list of integers selects the entire
|
|
referenced object (point, <code><trace></code>,
|
|
<code><traceGroup></code> or <code><traceView></code>).
|
|
If the list is non-empty, then its first element is taken as a
|
|
1-based index into the referenced object, and the remaining list is
|
|
used to select within the object. It is an error to try to select
|
|
within a single point. The rationale to allow selection using this
|
|
colon-separated-integer indexing scheme is that the desired ink
|
|
selections in a referenced document might not have id attributes on
|
|
the desired nodes.</p>
|
|
|
|
<p>If the referenced object is a <code><traceView></code>,
|
|
then the indexing is relative to the tree selected by the
|
|
<code><traceView></code>, not relative to the original
|
|
object.</p>
|
|
|
|
<p>If a <code><traceGroup></code> contains continuation
|
|
traces, they are counted independently.</p>
|
|
|
|
<h6><a name="traceViewExamples"
|
|
id="traceViewExamples">Examples:</a></h6>
|
|
|
|
<p>Suppose we have the following ink element:</p>
|
|
|
|
<pre class="ex" xml:space="preserve">
|
|
<ink xmlns="http://www.w3.org/2003/InkML">
|
|
<trace xml:id="L1">911 912, 921 922, 931 932</trace>
|
|
|
|
<traceGroup xml:id="L2">
|
|
<trace>111 112, 121 122</trace>
|
|
<traceGroup xml:id="L2-Larry">
|
|
<trace>221 212, 221 222</trace>
|
|
<trace>311 312, 321 322</trace>
|
|
</traceGroup>
|
|
<trace>411 412, 421 422</trace>
|
|
<traceGroup>
|
|
<traceGroup>
|
|
<trace xml:id="L2-Moe">521 512, 521 522</trace>
|
|
<trace>611 612, 621 622</trace>
|
|
</traceGroup>
|
|
</traceGroup>
|
|
<trace>711 712, 721 722</trace>
|
|
</traceGroup>
|
|
|
|
<traceGroup xml:id="L3">
|
|
<traceView traceDataRef="#L1" from="2"/>
|
|
<traceView traceDataRef="#L2" from="2" to="4:1:1"/>
|
|
</traceGroup>
|
|
|
|
<traceView xml:id="L4" traceDataRef="#L3" from="1:2" to="2:1:2:1"/>
|
|
</ink>
|
|
</pre>
|
|
|
|
<p>With <strong>traceDataRef</strong> "#L1", the <b>from</b> index
|
|
"2" refers to the point (921, 922). With
|
|
<strong>traceDataRef</strong> "#L2", the <b>from</b> index "2"
|
|
refers to the <code><traceGroup></code> with id "L2-Larry",
|
|
the index "4:1:1" refers to the element with id "L2-Moe", the index
|
|
"4:1:1:2" refers to the point (521, 522), and the index "4:1:1:2:1"
|
|
is illegal.</p>
|
|
|
|
<p>The <code><traceGroup></code> with id "L3" selects the
|
|
following structure</p>
|
|
|
|
<pre class="ex" xml:space="preserve">
|
|
<traceGroup>
|
|
<trace>921 922, 931 932</trace>
|
|
|
|
<traceGroup>
|
|
<traceGroup>
|
|
<trace>221 212, 221 222</trace>
|
|
<trace>311 312, 321 322</trace>
|
|
</traceGroup>
|
|
<trace>411 412, 421 422</trace>
|
|
<traceGroup>
|
|
<traceGroup>
|
|
<trace>521 512, 521 522</trace>
|
|
</traceGroup>
|
|
</traceGroup>
|
|
</traceGroup>
|
|
|
|
</traceGroup>
|
|
</pre>
|
|
|
|
and the <code><traceView></code> with id "L4" selects
|
|
|
|
<pre class="ex" xml:space="preserve">
|
|
<traceGroup>
|
|
<trace>931 932</trace>
|
|
<traceGroup>
|
|
<traceGroup>
|
|
<trace>221 212, 221 222</trace>
|
|
<trace>311 312</trace>
|
|
</traceGroup>
|
|
</traceGroup>
|
|
</traceGroup>
|
|
</pre>
|
|
</div>
|
|
|
|
<hr />
|
|
<h2 id="ContextIntro">4 Contexts</h2>
|
|
|
|
<p>The context in which ink is written and recorded comprises many
|
|
details. Examples include the size of the surface the traces were
|
|
recorded on, the pen tip used or the accuracy of the pressure
|
|
measurements. This contextual information needs to be captured by
|
|
InkML in order to fully characterize the recorded ink data. This
|
|
section defines markup that provides a way to describe this
|
|
information, including the <a
|
|
href="#contextElement"><code><context></code></a> element
|
|
which provides a means to associate a defined context with trace
|
|
data.</p>
|
|
|
|
<div>
|
|
<p>The format of trace data -- both in the channels available and
|
|
their particulars -- may vary from device to device, including from
|
|
stylus to stylus with the same tablet. Therefore, the
|
|
<code><context></code> element may refer to or contain a
|
|
specific <a
|
|
href="#traceFormat"><code><traceFormat></code></a> and <a
|
|
href="#inkSourceElement"><code><inkSource></code></a> element
|
|
for the device.</p>
|
|
|
|
<p>As the ink is generated, there may be various context-dependent
|
|
attributes associated with the pen. For this, a <a
|
|
href="#brushElement"><code><brush></code></a> element may be
|
|
used to record the attributes of the pen during the capture of the
|
|
digital ink.</p>
|
|
|
|
<p>The start times of traces are often given relative to a
|
|
specified point in time. A context may provide a <a
|
|
href="#timestamp"><code><timestamp></code></a> element for
|
|
this.</p>
|
|
|
|
<p>For applications that require the sharing of ink, contexts may
|
|
relate their ink to a shared canvas, given by a <a
|
|
href="#canvasElement"><code><canvas></code></a> element. The
|
|
trace format of the ink source is related to the trace format of a
|
|
shared canvas by means of a <a
|
|
href="#canvasTransformElement"><code><canvasTransform></code></a>
|
|
element.</p>
|
|
</div>
|
|
|
|
<h3 id="contextElement">4.1 The <code><context></code>
|
|
element</h3>
|
|
|
|
<p>This section describes the <code><context></code> element
|
|
and its attributes. The context element both provides access to a
|
|
useful shared context (canvas) and serves as a convenient
|
|
agglomeration of contextual attributes. It is used by the <a
|
|
href="#traceGroup"><code><traceGroup></code></a> and <a
|
|
href="#traceViewElement"><code><traceView></code></a>
|
|
elements to define the complete shared context of a group of traces
|
|
or may be referred to as part of a context change in streaming
|
|
mode. In either mode, individual attributes may be overridden at
|
|
time of use. Additionally, individual traces may refer to a
|
|
previously defined context (again optionally overriding its
|
|
attributes) to describe a context change that persists only for the
|
|
duration of that trace.</p>
|
|
|
|
<p>Although the use of the <code><context></code> element and
|
|
attributes is strongly encouraged, default interpretations are
|
|
provided so that they are not required in an InkML file if all
|
|
trace data is recorded in the same virtual coordinate system, and
|
|
its relationship to device coordinates is either not needed or
|
|
unknown.</p>
|
|
|
|
<h6><a name="contextAttrs" id="contextAttrs">Attributes:</a></h6>
|
|
|
|
<div class="attr"><b>xml:id</b> = xsd:ID<br style="clear:none;" />
|
|
|
|
|
|
<div class="attrdef">The unique identifier for this context.<br
|
|
style="clear:none;" />
|
|
<em>Required:</em> no, <em>Default:</em> none<br
|
|
style="clear:none;" />
|
|
</div>
|
|
|
|
<br style="clear:none;" />
|
|
<b>contextRef</b> = xsd:anyURI<br style="clear:none;" />
|
|
|
|
|
|
<div class="attrdef">A previously defined context upon which this
|
|
context is to be based.<br style="clear:none;" />
|
|
<em>Required:</em> no, <em>Default:</em> none<br
|
|
style="clear:none;" />
|
|
</div>
|
|
|
|
<br style="clear:none;" />
|
|
|
|
|
|
<div><b>canvasRef</b> = xsd:anyURI<br style="clear:none;" />
|
|
|
|
|
|
<div class="attrdef">The URI of a <b>canvas</b> element for this
|
|
context.<br style="clear:none;" />
|
|
<em>Required:</em> no, <em>Default:</em>
|
|
"<strong>#DefaultCanvas</strong>", or inherited from
|
|
<b>contextRef</b><br style="clear:none;" />
|
|
</div>
|
|
</div>
|
|
|
|
<br style="clear:none;" />
|
|
<b>canvasTransformRef</b> = xsd:anyURI<br style="clear:none;" />
|
|
|
|
|
|
<div class="attrdef">This is a reference to a mapping from the
|
|
coordinate system of the trace to the coordinate system of the
|
|
canvas.<br style="clear:none;" />
|
|
<em>Required:</em> no, <em>Default:</em> identity, or inherited
|
|
from <b>contextRef</b><br style="clear:none;" />
|
|
</div>
|
|
|
|
<br style="clear:none;" />
|
|
<b>traceFormatRef</b> = xsd:anyURI<br style="clear:none;" />
|
|
|
|
|
|
<div class="attrdef">A reference to the traceFormat for this
|
|
context.<br style="clear:none;" />
|
|
<em>Required:</em> no, <em>Default:</em>
|
|
"<strong>#DefaultTraceFormat</strong>", or inherited from
|
|
<b>contextRef</b><br style="clear:none;" />
|
|
</div>
|
|
|
|
<br style="clear:none;" />
|
|
<b>inkSourceRef</b> = xsd:anyURI<br style="clear:none;" />
|
|
|
|
|
|
<div class="attrdef">A reference to the inkSource for this
|
|
context.<br style="clear:none;" />
|
|
<em>Required:</em> no, <em>Default:</em> default capture device, or
|
|
inherited from <b>contextRef</b><br style="clear:none;" />
|
|
</div>
|
|
|
|
<br style="clear:none;" />
|
|
<b>brushRef</b> = xsd:anyURI<br style="clear:none;" />
|
|
|
|
|
|
<div class="attrdef">A reference to the brush for this context.<br
|
|
style="clear:none;" />
|
|
<em>Required:</em> no, <em>Default:</em> "<strong>#DefaultBrush</strong>", or inherited from
|
|
<b>contextRef</b><br style="clear:none;" />
|
|
</div>
|
|
|
|
<div><br style="clear:none;" />
|
|
<b>timestampRef</b> = xsd:anyURI<br style="clear:none;" />
|
|
|
|
|
|
<div class="attrdef">A reference to the timestamp for this
|
|
context.<br style="clear:none;" />
|
|
<em>Required:</em> no, <em>Default:</em> none, or inherited from
|
|
<b>contextRef</b><br style="clear:none;" />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<h6><a name="ContextContents"
|
|
id="ContextContents">Contents:</a></h6>
|
|
|
|
<div class="nlcontents">
|
|
<div><samp><a href="#canvas">canvas</a>?</samp><br
|
|
style="clear:none;" />
|
|
<samp><a
|
|
href="#canvasTransformElement">canvasTransform</a>?</samp><br
|
|
style="clear:none;" />
|
|
<samp><a href="#traceFormat">traceFormat</a>?</samp><br
|
|
style="clear:none;" />
|
|
<samp><a href="#inkSource">inkSource</a>?</samp><br
|
|
style="clear:none;" />
|
|
<samp><a href="#brushElement">brush</a>?</samp><br
|
|
style="clear:none;" />
|
|
<samp><a href="#timestamp">timestamp</a>?</samp></div>
|
|
</div>
|
|
|
|
<p>The <code><context></code> element consolidates all
|
|
salient characteristics of one or more ink traces. It may be
|
|
specified by declaring all non-default attributes, or by referring
|
|
to a previously defined context and overriding specific attributes.
|
|
The element is found either in the <a
|
|
href="#definitionsElement"><code><definitions></code></a>
|
|
element or as a child of the <a
|
|
href="#inkElement"><code><ink></code></a> element in <a
|
|
href="#Streaming">Streaming InkML</a></p>
|
|
|
|
<div>
|
|
<p>Each constituent part of a context may be provided either by a
|
|
referencing attribute or as a child element. If both are given,
|
|
then the child element is used. Thus it is possible to have either
|
|
a <b>traceFormatRef</b> attribute or a
|
|
<code><traceFormat></code> child element. If both are given,
|
|
then the <code><traceFormat></code> child is used and the
|
|
attribute is ignored.</p>
|
|
</div>
|
|
|
|
<h3 id="inkSource">4.2 Ink Sources</h3>
|
|
|
|
<div>
|
|
<p>One of the important requirements for the ink format is to allow
|
|
accurate recording of metadata about the format and quality of ink
|
|
as it is reported by the source. The source is typically hardware
|
|
as embodied in a digitizer device, but may in general be any
|
|
"virtual" source of ink, such as a software application that is
|
|
tracking the trajectory of an object. This is accomplished in the
|
|
<code><inkSource></code> element, which supports capture of
|
|
basic information about the make and model of the device and the
|
|
ink channels captured, as well as very detailed information about a
|
|
number of source characteristics.</p>
|
|
|
|
<p>Some of these characteristics are already commonly used in
|
|
digitizer specifications, while others are somewhat more esoteric,
|
|
but nonetheless potentially very useful. In general, these source
|
|
characteristics describe signal fidelity, allow understanding of
|
|
the quality of the data, and impose some limits on how the data can
|
|
be used. They are not intended to be used for repair of bad data
|
|
from the source.</p>
|
|
</div>
|
|
|
|
<h4 id="inkSourceElement">4.2.1 <code><inkSource></code>
|
|
element</h4>
|
|
|
|
<h6><a id="inkSourceAttrs"
|
|
name="inkSourceAttrs">Attributes:</a></h6>
|
|
|
|
<div class="attr"><b>xml:id</b> = xsd:ID<br style="clear:none;" />
|
|
|
|
|
|
<div class="attrdef">The unique identifier for this
|
|
<code><inkSource></code> element.<br style="clear:none;" />
|
|
<em>Required:</em> yes<br style="clear:none;" />
|
|
</div>
|
|
|
|
<br style="clear:none;" />
|
|
<b>manufacturer</b> = xsd:string<br style="clear:none;" />
|
|
|
|
|
|
<div class="attrdef">String identifying the digitizer device
|
|
manufacturer.<br style="clear:none;" />
|
|
<em>Required:</em> no, <em>Default:</em> unknown<br
|
|
style="clear:none;" />
|
|
</div>
|
|
|
|
<br style="clear:none;" />
|
|
<b>model</b> = xsd:string<br style="clear:none;" />
|
|
|
|
|
|
<div class="attrdef">String identifying the digitizer model.<br
|
|
style="clear:none;" />
|
|
<em>Required:</em> no, <em>Default:</em> unknown<br
|
|
style="clear:none;" />
|
|
</div>
|
|
|
|
<br style="clear:none;" />
|
|
|
|
|
|
<div><b>serialNo</b> = xsd:string<br style="clear:none;" />
|
|
|
|
|
|
<div class="attrdef">Unique manufacturer (or other) serial number
|
|
for the device.<br style="clear:none;" />
|
|
<em>Required:</em> no, <em>Default:</em> unknown<br
|
|
style="clear:none;" />
|
|
</div>
|
|
|
|
<br style="clear:none;" />
|
|
<b>specificationRef</b> = xsd:anyURI<br style="clear:none;" />
|
|
|
|
|
|
<div class="attrdef">URI of a page providing detailed or additional
|
|
specifications.<br style="clear:none;" />
|
|
<em>Required:</em> no, <em>Default:</em> unknown<br
|
|
style="clear:none;" />
|
|
</div>
|
|
|
|
<br style="clear:none;" />
|
|
<b>description</b> = xsd:string<br style="clear:none;" />
|
|
|
|
|
|
<div class="attrdef">String describing the ink source, especially
|
|
one implemented in software.<br style="clear:none;" />
|
|
<em>Required:</em> no, <em>Default:</em> unknown<br
|
|
style="clear:none;" />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<h6><a name="inkSourceContents"
|
|
id="inkSourceContents">Contents:</a></h6>
|
|
|
|
<div class="contents">
|
|
<div>
|
|
<dl>
|
|
<dt><samp><a href="#traceFormat">traceFormat</a></samp></dt>
|
|
|
|
<dt><samp><a href="#sampleRate">sampleRate</a>?</samp></dt>
|
|
|
|
<dt><samp><a href="#latency">latency</a>?</samp></dt>
|
|
|
|
<dt><samp><a href="#activeArea">activeArea</a>?</samp></dt>
|
|
|
|
<dt><samp><a href="#srcProperty">sourceProperty</a>*</samp></dt>
|
|
|
|
<dt><samp><a
|
|
href="#channelProperties">channelProperties</a>?</samp></dt>
|
|
</dl>
|
|
</div>
|
|
</div>
|
|
|
|
<h6><a name="inkSourceExamples"
|
|
id="inkSourceExamples">Examples:</a></h6>
|
|
|
|
<div>
|
|
<pre class="ex" xml:space="preserve">
|
|
<inkSource xml:id="mytablet"
|
|
manufacturer="Example.com"
|
|
model="ExampleTab 2000 USB"
|
|
specificationRef="http://www.example.com/products/exampletab/2000usb.html">
|
|
|
|
<traceFormat>
|
|
<channel name="X" ... />
|
|
<channel name="Y" ... />
|
|
<channel name="F" ... />
|
|
</traceFormat>
|
|
<sampleRate uniform="true" value="200"/>
|
|
<latency value="50"/>
|
|
<activeArea size="A6" height="100" width="130" units="mm"/>
|
|
<sourceProperty name="weight" value="100" units="g"/>
|
|
|
|
<channelProperties>
|
|
<channelProperty channel="X" name="resolution" value="5000" units="1/in"/>
|
|
<channelProperty channel="Y" name="resolution" value="5000" units="1/in"/>
|
|
<channelProperty channel="Y" name="peakRate" value="50" units="cm/s"/>
|
|
<channelProperty channel="F" name="resolution" value="1024" units="dev"/>
|
|
</channelProperties>
|
|
|
|
</inkSource>
|
|
</pre>
|
|
</div>
|
|
|
|
<p>The <code><inkSource></code> element will allow
|
|
specification of:</p>
|
|
|
|
<div>
|
|
<ul>
|
|
<li>Manufacturer, model and serial number (of a hardware
|
|
device)</li>
|
|
|
|
<li>Text description of source, and reference (URI) to detailed or
|
|
additional information</li>
|
|
|
|
<li>Trace format - regular and intermittent channels reported by
|
|
source</li>
|
|
|
|
<li>Sampling rate, latency and active area</li>
|
|
|
|
<li>Additional properties of the device in the form of
|
|
name-value-units triples</li>
|
|
|
|
<li>Properties of individual channels</li>
|
|
</ul>
|
|
</div>
|
|
|
|
<div><!-- sampleRate -->
|
|
<h4 id="sampleRate">4.2.2 <code><sampleRate></code>
|
|
element</h4>
|
|
|
|
<p>The <code><sampleRate></code> element captures the rate at
|
|
which ink samples are reported by the ink source. Many devices
|
|
report at a uniform rate; other devices may skip duplicate points
|
|
or report samples only when there is a change in direction. This is
|
|
indicated using the <code>uniform</code> attribute, which must be
|
|
designated "false" (non-uniform) if <b>any</b> pen-down points are
|
|
skipped or if the sampling is irregular.</p>
|
|
|
|
<p>A time channel should be used to get time information when the
|
|
sampling rate is not uniform. When the sampling rate is not
|
|
uniform, the <strong><span class="style1">value</span></strong>
|
|
attribute of the <code><sampleRate></code> element specifies
|
|
the maximum sampling rate.</p>
|
|
|
|
<h6><a name="sampleRateAttrs"
|
|
id="sampleRateAttrs">Attributes:</a></h6>
|
|
|
|
<div class="attr"><b>uniform</b> = xsd:boolean<br
|
|
style="clear:none;" />
|
|
|
|
|
|
<div class="attrdef">Sampling uniformity: Is the sample rate
|
|
consistent, with no dropped points?<br style="clear:none;" />
|
|
<em>Required:</em> no, <em>Default:</em> true<br
|
|
style="clear:none;" />
|
|
</div>
|
|
|
|
<b><br />
|
|
value</b> = xsd:decimal<br style="clear:none;" />
|
|
|
|
|
|
<div class="attrdef">The basic sample rate in samples/second.<br
|
|
style="clear:none;" />
|
|
<em>Required:</em> yes<br style="clear:none;" />
|
|
</div>
|
|
</div>
|
|
|
|
<h6><a name="sampleRateContents"
|
|
id="sampleRateContents">Contents:</a></h6>
|
|
|
|
<div class="nlcontents"><samp>EMPTY</samp></div>
|
|
|
|
<h6><a name="sampleRateExamples"
|
|
id="sampleRateExamples">Examples:</a></h6>
|
|
|
|
<pre class="ex" xml:space="preserve">
|
|
<sampleRate uniform="true" value="200"/>
|
|
</pre>
|
|
|
|
<!-- latency -->
|
|
<h4 id="latency">4.2.3 <code><latency></code> element</h4>
|
|
|
|
<p>The <code><latency></code> element captures the basic
|
|
device latency that applies to all channels, in milliseconds, from
|
|
physical action to the API time stamp. This is specified at the
|
|
device level, since all channels often are subject to a common
|
|
processing and communications latency.</p>
|
|
|
|
<h6><a name="latencyAttrs" id="latencyAttrs">Attributes:</a></h6>
|
|
|
|
<div class="attr"><b>value</b> = xsd:decimal<br
|
|
style="clear:none;" />
|
|
|
|
|
|
<div class="attrdef">Latency in milliseconds.<br
|
|
style="clear:none;" />
|
|
<em>Required:</em> yes<br style="clear:none;" />
|
|
</div>
|
|
</div>
|
|
|
|
<h6><a name="latencyContents"
|
|
id="latencyContents">Contents:</a></h6>
|
|
|
|
<div class="nlcontents"><samp>EMPTY</samp></div>
|
|
|
|
<h6><a name="latencyExamples"
|
|
id="latencyExamples">Examples:</a></h6>
|
|
|
|
<pre class="ex" xml:space="preserve">
|
|
<latency value="50"/>
|
|
</pre>
|
|
|
|
<!-- activeArea -->
|
|
<h4 id="activeArea">4.2.4 <code><activeArea></code>
|
|
element</h4>
|
|
|
|
<p>Many ink capture devices have a notion of active area, which
|
|
describes the two-dimensional area within which the device is
|
|
capable of sensing the pen position. This element allows the
|
|
specification of a rectangular active area.</p>
|
|
|
|
<h6><a name="activeAreaAttrs"
|
|
id="activeAreaAttrs">Attributes:</a></h6>
|
|
|
|
<div class="attr"><b>size</b> = xsd:string
|
|
|
|
<div class="attrdef">The active area, described using an
|
|
international ISO paper sizes standard such as ISO216.<br
|
|
style="clear:none;" />
|
|
<em>Required:</em> no, <em>Default:</em> unknown<br
|
|
style="clear:none;" />
|
|
</div>
|
|
|
|
<br style="clear:none;" />
|
|
<b>height</b> = xsd:decimal<br style="clear:none;" />
|
|
|
|
|
|
<div class="attrdef">Height of the active area (corresponding to
|
|
the Y channel).<br style="clear:none;" />
|
|
<em>Required:</em> yes, <em>Default:</em> unknown<br
|
|
style="clear:none;" />
|
|
</div>
|
|
|
|
<br style="clear:none;" />
|
|
<b>width</b> = xsd:decimal<br style="clear:none;" />
|
|
|
|
|
|
<div class="attrdef">Width of the active area (corresponding to the
|
|
X channel).<br style="clear:none;" />
|
|
<em>Required:</em> yes, <em>Default:</em> unknown<br
|
|
style="clear:none;" />
|
|
</div>
|
|
|
|
<br style="clear:none;" />
|
|
<b>units</b> = xsd:string<br style="clear:none;" />
|
|
|
|
|
|
<div class="attrdef">Units used for width and height.<br
|
|
style="clear:none;" />
|
|
<em>Required:</em> no, <em>Default:</em> unknown<br
|
|
style="clear:none;" />
|
|
</div>
|
|
</div>
|
|
|
|
<h6><a name="activeAreaContents"
|
|
id="activeAreaContents">Contents:</a></h6>
|
|
|
|
<div class="nlcontents"><samp>EMPTY</samp></div>
|
|
|
|
<h6><a name="activeAreaExamples"
|
|
id="activeAreaExamples">Examples:</a></h6>
|
|
|
|
<pre class="ex" xml:space="preserve">
|
|
<activeArea size="A6" height="100" width="130" units="mm"/>
|
|
</pre>
|
|
|
|
<!-- srcProperty -->
|
|
<h4 id="srcProperty">4.2.5 <code><sourceProperty></code>
|
|
element</h4>
|
|
|
|
<p>The <code><sourceProperty></code> element provides a
|
|
simple mechanism for the capture of additional <b>numeric</b> or
|
|
<strong>string</strong> properties of the ink source as a
|
|
whole.</p>
|
|
|
|
<h6><a name="srcPropertyAttrs"
|
|
id="srcPropertyAttrs">Attributes:</a></h6>
|
|
|
|
<div class="attr"><b>name</b> = xsd:string<br
|
|
style="clear:none;" />
|
|
|
|
|
|
<div class="attrdef">Name of the property of device or ink
|
|
source.<br style="clear:none;" />
|
|
<em>Required:</em> yes<br style="clear:none;" />
|
|
</div>
|
|
|
|
<br style="clear:none;" />
|
|
<b>value</b> = xsd:decimal | xsd:string<br style="clear:none;" />
|
|
|
|
|
|
<div class="attrdef">Value of named property.<br
|
|
style="clear:none;" />
|
|
<em>Required:</em> yes<br style="clear:none;" />
|
|
</div>
|
|
|
|
<br style="clear:none;" />
|
|
<b>units</b> = xsd:string<br style="clear:none;" />
|
|
|
|
|
|
<div class="attrdef">Units used for value. If present, the
|
|
value must be a numeric property.<br style="clear:none;" />
|
|
<em>Required:</em> no, <em>Default:</em> unknown<br
|
|
style="clear:none;" />
|
|
</div>
|
|
</div>
|
|
|
|
<h6><a name="srcPropertyContents"
|
|
id="srcPropertyContents">Contents:</a></h6>
|
|
|
|
<div class="nlcontents"><samp>EMPTY</samp></div>
|
|
|
|
<h6><a name="srcPropertyExamples"
|
|
id="srcPropertyExamples">Examples:</a></h6>
|
|
|
|
<pre class="ex" xml:space="preserve">
|
|
<sourceProperty name="weight" value="100" units="g"/>
|
|
</pre>
|
|
|
|
<!-- channelProperties -->
|
|
<h4 id="channelProperties">4.2.6
|
|
<code><channelProperties></code> element</h4>
|
|
|
|
<p>The <code><channelProperties></code> element is meant for
|
|
describing properties of specific channels reported by the ink
|
|
source. Properties such as range and resolution may be specified
|
|
using corresponding elements. For more esoteric properties (from a
|
|
lay user's standpoint) the generic <a
|
|
href="#channelProperty"><strong><span
|
|
class="style1"><</span></strong><strong><span
|
|
class="style1">channelProperty></span></strong></a> element may
|
|
be used.</p>
|
|
|
|
<h6><a name="channelPropertiesAttrs" id="channelPropertiesAttrs"
|
|
shape="rect">Attributes:</a></h6>
|
|
|
|
<div class="attr">None</div>
|
|
|
|
<h6><a name="channelPropertiesContents"
|
|
id="channelPropertiesContents">Contents:</a></h6>
|
|
|
|
<div class="contents">
|
|
<dl>
|
|
<dt><samp><a
|
|
href="#channelProperty">channelProperty</a>*</samp></dt>
|
|
</dl>
|
|
</div>
|
|
|
|
<h6><a name="channelPropertiesExamples"
|
|
id="channelPropertiesExamples">Examples:</a></h6>
|
|
|
|
<pre class="ex" xml:space="preserve">
|
|
<channelProperties>
|
|
<channelProperty channel="X" name="resolution" value="5000" units="1/in"/>
|
|
<channelProperty channel="Y" name="resolution" value="5000" units="1/in"/>
|
|
<channelProperty channel="Y" name="peakRate" value="50" units="cm/s">
|
|
<channelProperty channel="F" name="resolution" value="1024" units="dev"/>
|
|
</channelProperties>
|
|
</pre>
|
|
|
|
<h4 id="channelProperty">4.2.7 <code><channelProperty></code>
|
|
element</h4>
|
|
|
|
<p>The <code><channelProperty></code> element provides a
|
|
simple mechanism for the capture of additional <b>numeric</b> or
|
|
<strong>string</strong> properties of specific channels when known
|
|
and appropriate. The following channel property names, with their
|
|
specified meanings, are reserved. Other properties may be defined
|
|
by the user.</p>
|
|
|
|
<table border="1" cellspacing="0" cellpadding="3" width="80%"
|
|
class="channelproperties" summary="">
|
|
<tbody>
|
|
<tr>
|
|
<th rowspan="1" colspan="1">Property name</th>
|
|
<th rowspan="1" colspan="1">Interpretation</th>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td rowspan="1" colspan="1">threshold</td>
|
|
<td rowspan="1" colspan="1">Threshold - e.g. for a binary channel,
|
|
the threshold force at which the tip switch is activated</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td rowspan="1" colspan="1">resolution</td>
|
|
<td rowspan="1" colspan="1">Resolution - the scale of the values
|
|
recorded. This may be expressed as fractions of a unit, e.g. 1/1000
|
|
<em>in</em> (inches), 0.1 <em>mm</em>, 1 <em>deg</em> (degrees). It
|
|
may also be expressed, more popularly, in inverse units, e.g.
|
|
"1000 points per inch" would be given as 1000 in units
|
|
<em>1/in</em>.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td rowspan="1" colspan="1">quantization</td>
|
|
<td rowspan="1" colspan="1">Quantization - the unit of smallest
|
|
change in the reported values. If the value is reported as integer,
|
|
this is assumed to be the same as the resolution. Note that if
|
|
decimal values are recorded for resolution, the quantization of the
|
|
data may be smaller than the "resolution".</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td rowspan="1" colspan="1">noise</td>
|
|
<td rowspan="1" colspan="1">Noise - the RMS value of noise
|
|
typically observed on the channel. This is distinct from accuracy!
|
|
It is an indication of the difference observed in the data from the
|
|
device when the same path is traced out multiple times (e.g. by a
|
|
robot).</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td rowspan="1" colspan="1">accuracy</td>
|
|
<td rowspan="1" colspan="1">Accuracy - the typical accuracy of the
|
|
data on the channel (e.g. "0.5 mm", "10 degrees" or "0.1 Newton")
|
|
This is the typical difference between the reported position and
|
|
the actual position of the pen tip (or tilt ...)</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td rowspan="1" colspan="1">crossCoupling</td>
|
|
<td rowspan="1" colspan="1">Cross-coupling - the distortion in the
|
|
data from one channel due to changes in another channel. For
|
|
example, the X and Y coordinates in an electromagnetic digitizer
|
|
are influenced by the tilt of the pen. This would be specified by
|
|
dX/dOTx = ... or max delta X vs. OTx = ... If the influencing
|
|
channels are also recorded, and the cross-couplings are accurately
|
|
specified, it may be possible to compensate for the cross-coupling
|
|
by subtracting the influence, at the expense of higher noise. The
|
|
cross-coupling is always expressed in the units of the two
|
|
channels, e.g. if X mm and OTx is in degrees, then cross-coupling
|
|
is in mm/deg.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td rowspan="1" colspan="1">skew</td>
|
|
<td rowspan="1" colspan="1">Skew - the temporal skew of this
|
|
channel relative to the basic device latency, if any. For example,
|
|
some devices actually sample X and Y at different points in time,
|
|
so one might have a skew of -5 millisecond, and the other +5
|
|
millisecond.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td rowspan="1" colspan="1">minBandwidth</td>
|
|
<td rowspan="1" colspan="1">Minimum bandwidth (in Hz) - the minimum
|
|
bandwidth of the channel, in Hz (not samples/second), i.e., the
|
|
frequency of input motion up to which the signal is accurate to
|
|
within 3dB.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td rowspan="1" colspan="1">peakRate</td>
|
|
<td rowspan="1" colspan="1">Peak rate - the maximum speed at which
|
|
the device can accurately track motion</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td rowspan="1" colspan="1">distortion</td>
|
|
<td rowspan="1" colspan="1">Dynamic distortion, e.g., how velocity
|
|
affects position accuracy. This is expressed in inverse seconds,
|
|
e.g. 0.01 mm / mm / s. This kind of distortion is often cross
|
|
channel, but this specification only allows a generic,
|
|
channel-specific value.</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
<h6><a name="channelPropertyAttrs"
|
|
id="channelPropertyAttrs">Attributes:</a></h6>
|
|
|
|
<div class="attr"><b>channel</b> = xsd:string<br
|
|
style="clear:none;" />
|
|
|
|
|
|
<div class="attrdef">The name of the channel. Must be one among
|
|
those defined by the ink source's trace format.<br
|
|
style="clear:none;" />
|
|
<em>Required:</em> yes<br style="clear:none;" />
|
|
</div>
|
|
|
|
<br style="clear:none;" />
|
|
<b>name</b> = xsd:string<br style="clear:none;" />
|
|
|
|
|
|
<div class="attrdef">Name of the property of device or ink
|
|
source.<br style="clear:none;" />
|
|
<em>Required:</em> yes<br style="clear:none;" />
|
|
</div>
|
|
|
|
<br style="clear:none;" />
|
|
<b>value</b> = xsd:decimal | xsd:string<br style="clear:none;" />
|
|
|
|
|
|
<div class="attrdef">Value of named property.<br
|
|
style="clear:none;" />
|
|
<em>Required:</em> yes<br style="clear:none;" />
|
|
</div>
|
|
|
|
<br style="clear:none;" />
|
|
<b>units</b> = xsd:string<br style="clear:none;" />
|
|
|
|
|
|
<div class="attrdef">Units used for value. If present, the
|
|
value must be a numeric property.<br style="clear:none;" />
|
|
<em>Required:</em> no, <em>Default:</em> unknown<br
|
|
style="clear:none;" />
|
|
</div>
|
|
</div>
|
|
|
|
<h6><a name="channelPropertyContents" id="channelPropertyContents"
|
|
shape="rect">Contents:</a></h6>
|
|
|
|
<div class="nlcontents"><samp>EMPTY</samp></div>
|
|
|
|
<h6><a name="channelPropertyExamples" id="channelPropertyExamples"
|
|
shape="rect">Examples:</a></h6>
|
|
|
|
<pre class="ex" xml:space="preserve">
|
|
<channelProperty channel="F" name="threshold" value="0.1" units="N"/>
|
|
<channelProperty channel="X" name="quantization" value="0.01" units="mm"/>
|
|
</pre>
|
|
</div>
|
|
|
|
<!-- Rest of former captureDevice deleted -->
|
|
<h3 id="brushes">4.3 Brushes</h3>
|
|
|
|
<p>Along with trace data, it is often necessary to record certain
|
|
attributes of the pen during ink capture. For example, in a note
|
|
taking application, it is important to be able to distinguish
|
|
between traces captured while writing as opposed to those which
|
|
represent erasures. Because these attributes will often be
|
|
application specific, this specification does not attempt to
|
|
enumerate all the brush attributes which can be associated with a
|
|
trace. It provides a syntax for specifying brush property names,
|
|
units and values. Some common brush property names are
|
|
defined by the specification. But applications may define
|
|
other named properties not explicitly named in the specification
|
|
since it is possible to imagine attributes which are described
|
|
using complex functions parameterized by time, pen-tip force, or
|
|
other factors. The specification allows for capturing the fact that
|
|
a given trace was recorded in a particular brush context, leaving
|
|
the details of precisely defining specific attributes of that
|
|
context (such as complex brush geometries and colors in non-RGB
|
|
color spaces) to a higher-level, application specific layer.</p>
|
|
|
|
<p>Depending on the application, brush attributes may change
|
|
frequently. Accordingly, there should be a concise mechanism to
|
|
assign the attributes for an individual trace. On the other hand,
|
|
it is likely that many traces will be recorded using the same sets
|
|
of attributes; therefore, it should not be necessary to explicitly
|
|
state the attributes of every trace (again, for reasons of
|
|
conciseness). Furthermore, it should be possible to define entities
|
|
which encompass these attribute sets and refer to them rather than
|
|
listing the entire set each time. Since many attribute sets will be
|
|
similar to one another, it should also be possible to inherit
|
|
attributes from a prior set while overriding some of the attributes
|
|
in the set.</p>
|
|
|
|
<h4 id="brushElement">4.3.1 <code><brush></code> element</h4>
|
|
|
|
<h6><a name="brushAttrs" id="brushAttrs">Attributes:</a></h6>
|
|
|
|
<div class="attr"><b>xml:id</b> = xsd:ID<br style="clear:none;" />
|
|
|
|
|
|
<div class="attrdef">The unique identifier for this brush.<br
|
|
style="clear:none;" />
|
|
<em>Required:</em> no, <em>Default:</em> none.<br style="clear:none;" />
|
|
</div>
|
|
|
|
<br style="clear:none;" />
|
|
<b>brushRef</b> = xsd:anyURI<br style="clear:none;" />
|
|
|
|
|
|
<div class="attrdef">A brush whose attributes are inherited by this
|
|
brush.<br style="clear:none;" />
|
|
<em>Required:</em> no, <em>Default:</em> "<strong>#DefaultBrush</strong>"<br
|
|
style="clear:none;" />
|
|
</div>
|
|
</div>
|
|
|
|
<h6><a name="brushContents" id="brushContents">Contents:</a></h6>
|
|
|
|
<div class="nlcontents"><samp>( <a
|
|
href="#brushPropertyElement">brushProperty</a> | <a
|
|
href="#annotationElement" shape="rect">annotation</a> | <a
|
|
href="#annotationXMLElement" shape="rect">annotationXML</a>
|
|
)*</samp></div>
|
|
|
|
<p>In the ink markup, brush attributes are described by the
|
|
<code><brush></code> element. This element allows for the
|
|
definition of reusable sets of brush attributes which may be
|
|
associated with traces. For reference purposes, a brush specifies
|
|
an identifier which can be used to refer to the brush. A brush can
|
|
inherit the attributes of another <code><brush></code>
|
|
element by including a brushRef attribute which contains the id of
|
|
the referenced brush. The brush attributes are stored in
|
|
<code><brushProperty></code> child elements. Brushes may be
|
|
used to convey information about how a stroke is to be rendered or
|
|
simply to distinguish between different types of traces (e.g. an
|
|
eraser vs. a pen, different writers). In this later case, all that
|
|
matters is that brushes are distinct so no brush properties are
|
|
necessary.</p>
|
|
|
|
<p>Brush attributes are associated with traces using the brushRef
|
|
attribute. When it appears as an attribute of an individual
|
|
<code><trace></code>, the brushRef specifies the brush
|
|
attributes for that trace. When it appears as an attribute of a
|
|
<code><traceGroup></code> element, the brushRef specifies the
|
|
common brush attributes for all traces enclosed in the
|
|
<code><traceGroup></code>. Within the
|
|
<code><traceGroup></code>, an individual trace may still
|
|
override the traceGroup's brush attributes using a brushRef
|
|
attribute.</p>
|
|
|
|
<p>Brush attributes can also be associated with a context by
|
|
including the brushRef attribute on a <code><context></code>
|
|
element. Any traces which reference the context using a contextRef
|
|
attribute are assigned the brush attributes defined by the context.
|
|
If a trace includes both brushRef and contextRef attributes, the
|
|
brushRef overrides any brush attributes given by the
|
|
contextRef.</p>
|
|
<p>The default brush may be explicitly specified using the URI
|
|
"<code><strong>#DefaultBrush</strong></code>". The id "<code><strong>DefaultBrush</strong></code>"
|
|
is therefore reserved and may not be used as the id of a user defined <code><brush></code>
|
|
element. The default brush is identical to a user defined brush that has
|
|
not explicit
|
|
<code><brushProperty></code> child elements.</p>
|
|
|
|
<p>In streaming ink markup, brushes are assigned to a trace
|
|
according to the current brush, which can be set using the
|
|
<code><context></code> and <code><brush></code>
|
|
elements. See section <a href="#Streaming">Streaming
|
|
Applications</a> for a detailed description of streaming mode.</p>
|
|
|
|
<h4 id="brushPropertyElement">4.3.2
|
|
<code><brushProperty></code> element</h4>
|
|
|
|
<p>The <code><brushProperty></code> element provides a
|
|
mechanism for the storage of named properties of brushes. The
|
|
following brush property names, with their specified meanings, are
|
|
reserved. Other properties may be defined by the user.</p>
|
|
|
|
<table border="1" cellspacing="0" cellpadding="3" width="80%"
|
|
class="channelproperties" summary="">
|
|
<tbody>
|
|
<tr>
|
|
<th rowspan="1" colspan="1">Property name</th>
|
|
<th rowspan="1" colspan="1">Interpretation</th>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td rowspan="1" colspan="1">width</td>
|
|
<td rowspan="1" colspan="1">Width of the brush.<br />
|
|
<br />
|
|
If the width property is not given and a BW channel is present,
|
|
the values of the BW channel are used as the brush width. <br />
|
|
<br />
|
|
The default value is defined by the application.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td rowspan="1" colspan="1">height</td>
|
|
<td rowspan="1" colspan="1">Height of the brush.<br />
|
|
<br />
|
|
If a height property is not given and a BH channel is present, the
|
|
values of the BH channel are used as the brush height.<br />
|
|
<br />
|
|
The default value is defined by the application.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td rowspan="1" colspan="1">color</td>
|
|
<td rowspan="1" colspan="1">Color of brush as three octets for
|
|
RGB.<br />
|
|
<br />
|
|
If a color property is not given and color channels are present (C
|
|
or CR, CG, CB or CC, CM, CY, CK), their values are used for the
|
|
color.<br />
|
|
<br />
|
|
Default is #000000.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td rowspan="1" colspan="1">transparency</td>
|
|
<td rowspan="1" colspan="1">Transparency of brush as an integer: 0
|
|
is opaque.<br />
|
|
<br />
|
|
If a transparency property is not given and the transparency
|
|
channel (A) is present, its value is used.<br />
|
|
Default is 0.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td rowspan="1" colspan="1">tip</td>
|
|
<td rowspan="1" colspan="1">The type of pen tip:
|
|
<strong>ellipse</strong>, <strong>rectangle</strong>, or
|
|
<strong>drop</strong>.<br />
|
|
<br />
|
|
If <strong>ellipse</strong>, then the width property specifies the
|
|
horizontal diameter, and the height property specifies the vertical
|
|
diameter. If the height property is absent, its default value
|
|
is the value of width.<br />
|
|
<br />
|
|
If <strong>rectangle</strong>, the width and height properties
|
|
specify the width and height of the rectangle. If the height
|
|
property is absent, the default value is the value of width making
|
|
the brush a square.<br />
|
|
<br />
|
|
If <strong>drop</strong>, the shape is defined by a circle
|
|
and two tangent lines to a point outside the circle, located
|
|
above the circle on the vertical axis, as shown in <em>F<span
|
|
class="units">igure 4</span></em>. The width property is the
|
|
diameter the circle part, and the height property is the maximum
|
|
diameter of the shape.<br />
|
|
<br />
|
|
Default is <strong>ellipse</strong>.<br />
|
|
<br />
|
|
If the OR channel is present, the tip shape is rotated
|
|
counter-clockwise by this amount about its origin.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td rowspan="1" colspan="1">rasterOp</td>
|
|
<td rowspan="1" colspan="1">A value that defines how the colors of
|
|
the pen and background interact. In the example images below,
|
|
the original background is white with the black text 'abc' and it
|
|
is overwritten with a single curved yellow ink stroke.<br />
|
|
<br />
|
|
<table>
|
|
<tr>
|
|
<td valign="top"><strong><img style="vertical-align:top;"
|
|
alt="noOperation" src="rasterOp-noOperation.png" height="27"
|
|
width="50" /></strong></td>
|
|
<td valign="top"><strong>noOperation</strong> specifies no
|
|
operation; the background is rendered without ink.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td valign="top"><strong><img style="vertical-align:top;"
|
|
alt="copyPen" src="rasterOp-copyPen.png" height="27"
|
|
width="50" /></strong></td>
|
|
<td valign="top"><strong>copyPen</strong> specifies that the
|
|
current pen color property is used and overwrites the
|
|
background.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td valign="top"><strong><img style="vertical-align:top;"
|
|
alt="maskPen" src="rasterOp-maskPen.png" height="27"
|
|
width="50" /></strong></td>
|
|
<td valign="top"><strong>maskPen</strong> specifies a combination
|
|
of the colors common to both the pen and the display. This
|
|
value simulates the effect of a highlighter pen.</td>
|
|
</tr>
|
|
|
|
<!--
|
|
<tr>
|
|
<td valign="top"><strong><img align="top" alt="black" src="rasterOpBlack.png" /></strong></td>
|
|
<td valign="top"><strong>black</strong> specifies a black pen color.</td>
|
|
</tr>
|
|
<tr>
|
|
<td style="height: 44px" valign="top"><strong>
|
|
<img align="top" alt="maskNotPen" src="rasterOpMaskNotPen.png" /></strong></td>
|
|
<td style="height: 44px" valign="top"><strong>maskNotPen</strong> specifies a combination of the colors are common to both the pen and
|
|
the inverse of the display.</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top"><strong>
|
|
<img align="top" alt="maskPenNot" src="rasterOpMaskPenNot.png" /></strong></td>
|
|
<td valign="top"><strong>maskPenNot</strong> specifies a combination of the colors are common to the background
|
|
color and the inverse of the pen.</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top"><strong>
|
|
<img align="top" alt="mergeNotPen" src="rasterOpMergeNotPen.png" /></strong></td>
|
|
<td valign="top"><strong>mergeNotPen</strong> specifies a combination of the display color and the inverse of the
|
|
pen color.</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top"><strong>
|
|
<img align="top" alt="mergePen" src="rasterOpMergePen.png" height="15" width="31" /></strong></td>
|
|
<td valign="top"><strong>mergePen</strong> specifies a combination of the pen color and the display color.</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top"><strong>
|
|
<img align="top" alt="mergePenNot" src="rasterOpMergePenNot.png" /></strong></td>
|
|
<td valign="top"><strong>mergePenNot</strong> specifies a combination of the pen color and the inverse of the
|
|
display color.</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top">
|
|
<img alt="not" src="rasterOpNot.png" height="15" width="31" /></td>
|
|
<td valign="top"><strong>not</strong> specifies the inverse of the display color.</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top"><strong>
|
|
<img align="top" alt="notCopyPen" src="rasterOpNotCopyPen.png" /></strong></td>
|
|
<td valign="top"><strong>notCopyPen</strong> specifies the inverse of copyPen.</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top"><strong>
|
|
<img align="top" alt="notMaskPen" src="rasterOpNotMaskPen.png" /></strong></td>
|
|
<td valign="top"><strong>notMaskPen</strong> specifies the inverse of maskPen.</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top"><strong>
|
|
<img align="top" alt="notMergePen" src="rasterOpNotMergePen.png" /></strong></td>
|
|
<td valign="top"><strong>notMergePen</strong> specifies the inverse of mergePen.</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top"><strong>
|
|
<img align="top" alt="notXOrPen" src="rasterOpNotXOrPen.png" /></strong></td>
|
|
<td valign="top"><strong>notXOrPen</strong> specifies an inverse of xOrPen.</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top"><strong><img align="top" alt="white" src="rasterOpWhite.png" /></strong></td>
|
|
<td valign="top"><strong>white</strong> specifies a white pen color.</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top"><strong>
|
|
<img align="top" alt="xOrPen" src="rasterOpXOrPen.png" /></strong></td>
|
|
<td valign="top"><strong>xOrPen</strong> specifies a combination of the colors in the pen and in the display
|
|
color, but not in both.</td>
|
|
</tr>
|
|
-->
|
|
</table>
|
|
|
|
<br />
|
|
The default value is <strong>copyPen</strong>, which indicates that
|
|
the current pen color is used. Applications may define
|
|
additional rasterOp values.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td colspan="1">antiAliased</td>
|
|
<td colspan="1">The drawn ink is anti-aliased.<br />
|
|
<br />
|
|
Default is true.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td colspan="1">fitToCurve</td>
|
|
<td colspan="1">The ink is rendered as a series of curves versus as
|
|
lines between pen sample points.<br />
|
|
<br />
|
|
Default is false.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td colspan="1">ignorePressure</td>
|
|
<td colspan="1">If true, pressure from the pen tip is ignored and
|
|
the width of the ink remains the same regardless of the pressure of
|
|
the pen on the tablet surface.<br />
|
|
<br />
|
|
If false, the width of the ink gets wider with increased pressure
|
|
of the pen on the tablet surface.<br />
|
|
<br />
|
|
Default is false.</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
<div class="menu"><img alt="drop shape" height="266" src="drop.png"
|
|
width="208" /><br />
|
|
<em>Figure 4. Drop tip shape</em></div>
|
|
|
|
<h6><a name="brushPropertyAttrs0"
|
|
id="brushPropertyAttrs0">Attributes:</a></h6>
|
|
|
|
<div class="attr"><b>name</b> = xsd:string
|
|
|
|
<div class="attrdef">Name of property.<br style="clear:none;" />
|
|
<em>Required:</em> yes</div>
|
|
|
|
<br style="clear:none;" />
|
|
<b>value</b> = xsd:decimal | xsd:string
|
|
|
|
<div class="attrdef">Value of named property.<br
|
|
style="clear:none;" />
|
|
<em>Required:</em> yes</div>
|
|
|
|
<br style="clear:none;" />
|
|
<b>units</b> = xsd:string
|
|
|
|
<div class="attrdef">Units used for value. If present, the
|
|
value must be a numeric property.<br style="clear:none;" />
|
|
<em>Required:</em> no, <em>Default:</em> unknown<br
|
|
style="clear:none;" />
|
|
</div>
|
|
</div>
|
|
|
|
<h6><a name="brushContents0" id="brushContents0">Contents:</a></h6>
|
|
|
|
<div class="nlcontents"><samp>( <a href="#annotationElement"
|
|
shape="rect">annotation</a> | <a href="#annotationXMLElement"
|
|
shape="rect">annotationXML</a> )*</samp></div>
|
|
|
|
<h6><a name="annotationExample0"
|
|
id="annotationExample0">Example:</a></h6>
|
|
|
|
<pre class="ex" xml:space="preserve">
|
|
<brushProperty name="width" value="2" units="cm"/>
|
|
<brushProperty name="color" value="#FF0000"/>
|
|
</pre>
|
|
|
|
<h3 id="timestamps">4.4 Timestamps</h3>
|
|
|
|
<p>Timestamping of traces is supported by the
|
|
<code><timestamp></code> element and the <b>timestampRef</b>,
|
|
<b>timeOffset</b> and <b>duration</b> attributes of the
|
|
<code><trace></code> element. For ease of processing, all
|
|
timestamps are expressed in milliseconds. Finer-grained timestamps
|
|
are obtained using fractional values.</p>
|
|
|
|
<h4 id="timestamp">4.4.1 <code><timestamp></code>
|
|
element</h4>
|
|
|
|
<h6><a name="timestampAttrs"
|
|
id="timestampAttrs">Attributes:</a></h6>
|
|
|
|
<div class="attr"><b>xml:id</b> = xsd:ID<br style="clear:none;" />
|
|
|
|
|
|
<div class="attrdef">The identifier for this timestamp.<br
|
|
style="clear:none;" />
|
|
<em>Required:</em> yes<br style="clear:none;" />
|
|
</div>
|
|
|
|
<br style="clear:none;" />
|
|
<b>time</b> = xsd:decimal<br style="clear:none;" />
|
|
|
|
|
|
<div class="attrdef">The absolute time for this timestamp, in
|
|
milliseconds since 1 January 1970 00:00:00 UTC.<br
|
|
style="clear:none;" />
|
|
<em>Required:</em> no, <em>Default:</em> none.<br
|
|
style="clear:none;" />
|
|
</div>
|
|
|
|
<br style="clear:none;" />
|
|
<b>timestampRef</b> = xsd:anyURI<br style="clear:none;" />
|
|
|
|
|
|
<div class="attrdef">The absolute time for this timestamp, given as
|
|
a reference to another timestamp.<br style="clear:none;" />
|
|
<em>Required:</em> no, <em>Default:</em> none<br
|
|
style="clear:none;" />
|
|
</div>
|
|
|
|
<br style="clear:none;" />
|
|
|
|
|
|
<div><b>timeString</b> = xsd:dateTime<br style="clear:none;" />
|
|
|
|
|
|
<div class="attrdef">The absolute time for this timestamp, given in
|
|
a human-readable standard format.<br style="clear:none;" />
|
|
<em>Required:</em> no, <em>Default:</em> none.<br
|
|
style="clear:none;" />
|
|
</div>
|
|
|
|
<br style="clear:none;" />
|
|
</div>
|
|
|
|
<b>timeOffset</b> = xsd:decimal<br style="clear:none;" />
|
|
|
|
|
|
<div class="attrdef">The relative time for this reference
|
|
timestamp, in milliseconds.<br style="clear:none;" />
|
|
<em>Required:</em> No. <em>Default.</em> 0<br
|
|
style="clear:none;" />
|
|
</div>
|
|
</div>
|
|
|
|
<h6><a name="timestampContents"
|
|
id="timestampContents">Contents:</a></h6>
|
|
|
|
<div class="nlcontents"><samp>EMPTY</samp></div>
|
|
|
|
<p>The <code><timestamp></code> element establishes a
|
|
reference timestamp which can then be used for relative
|
|
timestamping of traces.</p>
|
|
|
|
<p>At most one of the attributes <b>time</b>, <b>timestampRef</b>
|
|
or <b>timeString</b> is used. The time thus given, plus the value
|
|
of the attribute <b>timeOffset</b>, gives the time value of the
|
|
timestamp.</p>
|
|
|
|
<p>If more than one of <b>time</b>, <b>timeString</b> and
|
|
<b>timestampRef</b> are given, then <b>time</b> is used if present.
|
|
Failing that, <b>timeString</b> is used.</p>
|
|
|
|
<p>If none of <b>time</b>, <b>timestampRef</b> or <b>timeString</b>
|
|
are given, then the timestamp refers to some unspecified moment in
|
|
time. This is useful when the timestamp is referenced by multiple
|
|
elements to provide relative timing information.</p>
|
|
|
|
<p>The four examples below illustrate the establishment of various
|
|
reference timestamps. The first <code><timestamp></code>
|
|
element, ts001, refers to January 2, 2004 at 7:00am, UTC. The
|
|
second establishes timestamp ts002 which refers to January 2, 2004
|
|
at 7:10am, UTC (10 minutes after the reference timestamp ts001),
|
|
and the third time stamp, ts003, gives the same time using the
|
|
<b>timeString</b> attribute. The fourth creates ts004 with time
|
|
January 2, 2004 at 7:10:04.32, UTC (4.32 seconds after the
|
|
timestamp of trace ts002).</p>
|
|
|
|
<pre class="ex" xml:space="preserve">
|
|
<timestamp xml:id="ts001" time="1073026800000"/>
|
|
<timestamp xml:id="ts002" timeOffset="600000" timestampRef="#ts001"/>
|
|
<timestamp xml:id="ts003" timeString="2004-01-02T07:10:00Z"/>
|
|
<timestamp xml:id="ts004" timeOffset="4320" timestampRef="#ts002"/>
|
|
</pre>
|
|
|
|
<div>
|
|
<h3 id="defaultContext">4.5 The Default Context</h3>
|
|
|
|
<p>Ink traces may specify their contexts explicitly, using a
|
|
<b>contextRef</b> attribute, or implicitly, in which case they use
|
|
a default context.</p>
|
|
|
|
<p>Explicitly referenced <code><context></code> elements may
|
|
occur in a <code><definitions></code> element, elsewhere in
|
|
the same document or in other documents. Explicit contexts are
|
|
typically used in archival ink applications.</p>
|
|
|
|
<p>Traces that do not make explicit reference to a context occur in
|
|
a default context. This is established by the sequence of elements
|
|
in the <code><ink></code> element. Initially the default
|
|
context is empty and uses defaults for all properties, including a
|
|
default trace format, default canvas, etc. Then, interspersed with
|
|
ink data, other elements may occur that alter the default context.
|
|
These elements are <code><brush></code>,
|
|
<code><context></code>, <code><traceFormat></code>,
|
|
<code><inkSource></code> and <code><timestamp></code>.
|
|
As the ink is processed from the first child onward, whenever one
|
|
of these elements is encountered, it is installed as the default to
|
|
be used by traces. These are used by traces that do not otherwise
|
|
specify these properties.</p>
|
|
|
|
<p>The default context may be explicitly specified using the URI
|
|
"<code><strong>#DefaultContext</strong></code>". The id "<code><strong>DefaultContext</strong></code>"
|
|
is therefore reserved and may not be used as the id of a user defined <code><context></code>
|
|
element. </p>
|
|
</div>
|
|
|
|
<h3 id="contextPriority">4.6 Context Priority</h3>
|
|
|
|
<p>To describe how contextual information is determined, we start
|
|
with the notions of "fully resolved context" and "current context"
|
|
as follows.</p>
|
|
|
|
<p>A <i>fully resolved context</i> is one for which all the context
|
|
information (brush, canvas, canvasTransform, inkSource, timestamp,
|
|
traceFormat) has been obtained either from direct children, by
|
|
references or inherited. Values are obtained for the context
|
|
information by giving the contents of the
|
|
<code><context></code> priority over specific references
|
|
(<b>brushRef</b>, <b>canvasRef</b>, <b>canvasTransformRef</b>,
|
|
<b>inkSourceRef</b>, <b>timestampRef</b>, <b>traceFormatRef</b>),
|
|
which take priority over <b>contextRef</b>, which takes priority
|
|
over the current context.</p>
|
|
|
|
<p>The <i>current context</i> is a syntactic notion associated to
|
|
each node in an ink document. Roughly speaking, the current context
|
|
is changed only by <code><context></code>elements that occur
|
|
directly as children to the <code><ink></code> element (i.e.
|
|
not inside <code><definitions></code>). It is defined as
|
|
follows.</p>
|
|
|
|
<ul>
|
|
<li>The first top-level child of an <code><ink></code>
|
|
element has the default context its current context.</li>
|
|
|
|
<li>If a top-level child of an <code><ink></code> element has
|
|
a <code><context></code> element as its previous sibling,
|
|
then that context fully resolved is the child's current
|
|
context.</li>
|
|
|
|
<li>If a top-level child has another kind of previous sibling, then
|
|
that sibling's current context is the child's current context.</li>
|
|
|
|
<li>All descendants of a <code><definitions></code> element
|
|
have the default context as their current context.</li>
|
|
|
|
<li>All descendants of other kinds of top-level children have that
|
|
child's current context as their current context.</li>
|
|
|
|
<li>All descendants of a top-level child have that child's current
|
|
context as their current context.</li>
|
|
</ul>
|
|
|
|
<p>The current context is central to streaming ink applications
|
|
(see <a href="#Streaming">Streaming</a>).</p>
|
|
|
|
<p>We can now describe how contextual information is determined for
|
|
ink traces.</p>
|
|
|
|
<ul>
|
|
<li>For a top-level <code><trace></code>,
|
|
<code><traceGroup></code> or <code><traceView></code>
|
|
element (i.e. on that occurs as a direct child of an
|
|
<code><ink></code> element), a specific reference
|
|
(<b>brushRef</b>) takes priority over <b>contextRef</b> which takes
|
|
priority over the current context. The resulting anonymous context
|
|
is the context of this node.</li>
|
|
|
|
<li>For other <code><trace></code>,
|
|
<code><traceGroup></code> or <code><traceView></code>
|
|
elements, a specific reference (<b>brushRef</b>) takes priority
|
|
over <b>contextRef</b> which takes priority over the enclosing
|
|
<code><traceGroup></code> or <code><traceView></code>
|
|
node's context which takes priority over the current context. The
|
|
resulting anonymous context is the context of this node.</li>
|
|
</ul>
|
|
|
|
<hr />
|
|
<h2 id="canvas">5 Canvases</h2>
|
|
|
|
<div>
|
|
<p>InkML provides support for applications that are required to
|
|
combine ink from multiple sources. This may arise, for example,
|
|
from real-time collaboration among several devices, from multiple
|
|
ink annotations on the same base document or multiple pens
|
|
operating on the same surface. To support these applications, InkML
|
|
uses the concept of a shared space, called a <em>canvas</em>.</p>
|
|
|
|
<p>A canvas is specified using a <code><canvas></code>
|
|
element, and is typically referred to by one or more
|
|
<code><context></code> elements. These contexts may each have
|
|
their own set of ink capture characteristics and trace formats. In
|
|
order to map traces from a particular context to a canvas, and vice
|
|
versa, each context provides its own canvas transform, inverse
|
|
transform or both.</p>
|
|
|
|
<p>A context neither referencing nor inheriting a canvas uses a
|
|
default canvas, sufficient to allow simple single-canvas sharing
|
|
without further action on the part of devices or applications.</p>
|
|
|
|
<p>Each canvas defines its dimensions by giving a
|
|
<code><traceFormat></code> element. Its channel declarations
|
|
may specify minimum and/or maximum values, an orientation and
|
|
units. If no minimum or maximum is given for a channel of integer
|
|
or decimal type, then it is unbounded in that direction.</p>
|
|
|
|
<p>If a canvas is bounded in any direction, then all traces defined
|
|
on that canvas must be contained inside its limits. There may be
|
|
applications where strokes appear outside of the canvas. In these
|
|
cases the processing of out-of-bounds traces is not defined by the
|
|
specification.</p>
|
|
|
|
<p>Although canvases are virtual spaces, each of the coordinates
|
|
may be assigned a unit of measure. This allows collaborating
|
|
parties to establish a common notion of scale.</p>
|
|
</div>
|
|
|
|
<div>
|
|
<p>An example use for such a shared canvas might be a single ink
|
|
markup stream or file that contains traces captured on a tablet
|
|
computer, a PDA device, and an opaque graphics tablet attached to a
|
|
desktop computer. The size of these traces on each ink source and
|
|
corresponding display might differ, yet it may be necessary to
|
|
relate these traces to one another. They could represent scribbles
|
|
on a shared electronic whiteboard, annotations of a common
|
|
document, or the markings of two players in a distributed
|
|
tic-tac-toe game.</p>
|
|
|
|
<p>The trace data for these different ink sessions could be
|
|
recorded using the same set of virtual coordinates; however, it is
|
|
often useful, and may even be necessary at times, to record the
|
|
data in the ink source coordinates, in order to more precisely
|
|
represent the original capture conditions, for compactness, or to
|
|
avoid round-off errors that might be associated with the use of a
|
|
common coordinate system. Thus we define the concept of a "canvas
|
|
transform", which can vary according to the ink source. The default
|
|
transform is the identity. It is also possible to specify the
|
|
mapping from the canvas back to the coordinates of the original
|
|
trace format. This is useful in collaborative ink applications
|
|
where ink added to the canvas from one source must be interpreted
|
|
in the frame of reference of the other sources. It is not always
|
|
necessary to specify the inverse transform. If the canvas transform
|
|
is given as an affine map of full rank, then it may be inverted
|
|
numerically. Likewise if coordinates are transformed by a lookup
|
|
table with linear interpolation, then the mapping may be inverted
|
|
numerically. In all other cases the inverse transformation must be
|
|
provided if the inverse mapping is required.</p>
|
|
</div>
|
|
|
|
<h3 id="canvasElement">5.1 <code><canvas></code> element</h3>
|
|
|
|
<p>The <code><canvas></code> element provides the virtual
|
|
coordinate system, which uniquely identifies a shared virtual space
|
|
for cooperation of ink applications. Together with the
|
|
trace-to-canvas coordinate transform (discussed below), it provides
|
|
a common frame of reference for ink collected in multiple sessions
|
|
on different devices.</p>
|
|
|
|
<h6 id="canvasElementAttrs">Attributes:</h6>
|
|
|
|
<div class="attr"><b>xml:id</b> = xsd:ID<br style="clear:none;" />
|
|
|
|
|
|
<div class="attrdef">The unique identifier for this element.<br
|
|
style="clear:none;" />
|
|
<em>Required:</em> no, <em>Default:</em> none.<br
|
|
style="clear:none;" />
|
|
</div>
|
|
|
|
<b><br />
|
|
traceFormatRef</b> = xsd:anyURI<br style="clear:none;" />
|
|
|
|
|
|
<div class="attrdef">A link to a <code><traceFormat></code>
|
|
element.<br style="clear:none;" />
|
|
<em>Required:</em> no, <em>Default:</em> none.<br
|
|
style="clear:none;" />
|
|
</div>
|
|
</div>
|
|
|
|
<h6 id="canvasContents">Contents:</h6>
|
|
|
|
<div class="contents"><samp><a
|
|
href="#traceFormat">traceFormat</a>?</samp></div>
|
|
|
|
<div>
|
|
<p>A <code><canvas></code> element must have an associated
|
|
<code><traceFormat></code>, which may either be given as a
|
|
child element or referred to by a
|
|
<b>traceFormatRef </b> attribute. If
|
|
both a <strong><span
|
|
class="style1"><traceFormat></span></strong> element and a
|
|
<strong><span class="style4">traceFormatRef</span></strong>
|
|
attribute are specified, then the element overrides the attribute.
|
|
The coordinate space of the canvas is given by the regular channels
|
|
of the trace format and any intermittent channels are ignored.</p>
|
|
|
|
<p>Example:</p>
|
|
|
|
<pre class="ex" xml:space="preserve">
|
|
<canvas xml:id="A4PaperCanvas">
|
|
<traceFormat>
|
|
<channel name="X" type="decimal" min="0" max="210" units="mm"/>
|
|
<channel name="Y" type="decimal" min="0" max="297" units="mm"/>
|
|
</traceFormat>
|
|
</canvas>
|
|
</pre>
|
|
</div>
|
|
|
|
<div>
|
|
<h3 id="canvasTransformElement">5.2
|
|
<code><canvasTransform></code> element</h3>
|
|
|
|
<h6><a name="canvasTransformAttrs"
|
|
id="canvasTransformAttrs">Attributes:</a></h6>
|
|
|
|
<div class="attr"><b>xml:id</b> = xsd:ID<br style="clear:none;" />
|
|
|
|
|
|
<div class="attrdef">The identifier for this canvas transform.<br
|
|
style="clear:none;" />
|
|
<em>Required:</em> no, <em>Default:</em> none<br
|
|
style="clear:none;" />
|
|
</div>
|
|
|
|
<br style="clear:none;" />
|
|
<b>invertible</b> = xsd:boolean<br style="clear:none;" />
|
|
|
|
|
|
<div class="attrdef"><em>Required:</em> no, <em>Default:</em>
|
|
false<br style="clear:none;" />
|
|
</div>
|
|
</div>
|
|
|
|
<br style="clear:none;" />
|
|
|
|
|
|
<h6><a name="canvasTransformContents" id="canvasTransformContents"
|
|
shape="rect">Contents:</a></h6>
|
|
|
|
<div class="contents">
|
|
<dl>
|
|
<dt><samp><a href="#mappingElement">mapping</a> <a
|
|
href="#mappingElement">mapping</a>?</samp></dt>
|
|
</dl>
|
|
</div>
|
|
|
|
<p>The <code><canvasTransform></code> element is used to
|
|
relate two coordinate systems. The source and target coordinate
|
|
systems are ultimately defined in terms of
|
|
<code><traceFormat></code> elements. These trace formats may
|
|
either be given directly, or indirectly by
|
|
<code><inkSource></code>, <code><context></code> or
|
|
other <code><canvas></code> elements. In general, the source
|
|
and target coordinate systems may involve a different number and
|
|
type of coordinates, or have different ranges and orientation for
|
|
the same dimension.</p>
|
|
|
|
<p>The contents of the <code><canvasTransform></code>
|
|
consists of one or two <a
|
|
href="#mappingElement"><code><mapping></code></a> elements.
|
|
If there is only one, then it is the mapping from the source to the
|
|
target coordinate system, where the meaning of "source" and
|
|
"target" is determined by the use. If there are two children, the
|
|
first is the mapping from the source to the target and the second
|
|
is the inverse mapping from the target back to the source.</p>
|
|
|
|
<p>The transform and its inverse need not be full inverses in the
|
|
mathematical sense. If a transform is from a trace format to a
|
|
canvas with fewer coordinates, then the inverse transform may map
|
|
from the canvas back to the original trace format by supplying
|
|
default values for the coordinates not in the canvas. This would
|
|
occur, for example, if a party were sharing ink from a device with
|
|
a force channel with a canvas with only spatial coordinates.</p>
|
|
|
|
<p>For certain classes of mappings, the inverse mapping may be
|
|
determined automatically. These are mappings of type "identity",
|
|
"affine" (for matrices of full rank), "table" (univariate, with
|
|
linear interpolation), and "product" mappings of these. In this
|
|
case, it is possible to specify that an inverse should be
|
|
determined automatically by giving only the forward transform and
|
|
specifying a value of <code>true</code> for the <b>invertible</b>
|
|
attribute. If two <code><mapping></code> elements are
|
|
specified, then the <strong>invertible</strong> attribute is
|
|
ignored.</p>
|
|
|
|
<p>For an application to give only the inverse transform, it should
|
|
supply the forward transform as an unknown mapping:</p>
|
|
|
|
<pre class="ex" xml:space="preserve">
|
|
<canvasTransform>
|
|
<mapping type="unknown"/>
|
|
<mapping mappingRef="#map001"/>
|
|
</canvasTransform>
|
|
</pre>
|
|
</div>
|
|
|
|
<div>
|
|
<h3 id="DefaultCanvas">5.3 The Default Canvas</h3>
|
|
|
|
<p>The default canvas has two real-valued coordinates X and Y, both
|
|
unbounded in the positive and negative directions. More precisely,
|
|
the default canvas is made available as though the following
|
|
element were included in each InkML document:</p>
|
|
|
|
<pre class="ex" xml:space="preserve">
|
|
<canvas xml:id="DefaultCanvas">
|
|
<traceFormat>
|
|
<channel name="X"
|
|
type="decimal" default="0" orientation="+ve" units="em"/>
|
|
<channel name="Y"
|
|
type="decimal" default="0" orientation="+ve" units="em"/>
|
|
</traceFormat>
|
|
</canvas>
|
|
</pre>
|
|
|
|
<p>The default canvas may be explicitly specified using the URI
|
|
"<code><strong>#DefaultCanvas</strong></code>". The id "<code><strong>DefaultCanvas</strong></code>"
|
|
is therefore reserved and may not be used as the id of a user defined <code><canvas></code>
|
|
element. </p>
|
|
</div>
|
|
|
|
<hr />
|
|
<h2 id="generics">6 Generics</h2>
|
|
|
|
<p>This section describes components of the ink markup which are
|
|
applicable to multiple aspects of the ink markup.</p>
|
|
|
|
<h3 id="mappings">6.1 Mappings</h3>
|
|
|
|
<p>The <code><mapping></code> element provides a uniform
|
|
syntax for the various uses of mappings in the ink markup. The
|
|
element has an <b>id</b> attribute, which allows a particular
|
|
mapping to be applied in multiple places. When a previously defined
|
|
mapping is reused, the <b>mappingRef</b> attribute is used to refer
|
|
to the <code><mapping></code> element, which might be defined
|
|
in a <code><definitions></code> block. Mappings appear in the
|
|
following different places in InkML:</p>
|
|
|
|
<ol>
|
|
<li>In a <code><channel></code> element of a
|
|
<code><traceFormat></code>, the <code><mapping></code>
|
|
element is used to describe the transformation from the values
|
|
actually produced by the device to the values recorded in the trace
|
|
data.</li>
|
|
|
|
<li>Used by a <code><canvasTransform></code>, a mapping may
|
|
be used to specify the forward or inverse transformations between
|
|
an ink source and a canvas coordinate system.</li>
|
|
</ol>
|
|
|
|
<p>InkML supports several types of mappings: unknown, identity,
|
|
lookup table, affine map, formula (specified using a subset of
|
|
MathML [<cite><a href="#MATHML2">MATHML2</a></cite>]) and cross product. The mapping type is indicated by the <b>type</b> attribute of a <code><mapping></code> element.
|
|
Note: If no mapping appears for a <code><channel></code>, it
|
|
defaults to "unknown", which is safer than assuming that 'X' is
|
|
identical to the device's 'X' since some filtering or modifications
|
|
could have been applied. Furthermore, one can specify whether the
|
|
results of a mapping expression are absolute or relative to the
|
|
current data value. This is done by means of the <b>apply</b>
|
|
attribute. For lookup table mappings in particular, one can
|
|
determine how to interpret intermediate mapping values. This is
|
|
specified using the <b>interpolation</b> attribute.</p>
|
|
<p>Some points may have channel values that cannot be mapped. These may
|
|
lie outside the domain of a MathML mapping (e.g. division by zero, arcsine of 7)
|
|
or outside the scope of a lookup table (e.g. below the lowest value when the
|
|
interpolation scheme is other than "ceiling"). In this situation the behavior
|
|
is not specified and may vary from implementation to implementation. For
|
|
example, an implementation may choose to raise an error or omit the points.</p>
|
|
|
|
<h4 id="mappingElement">6.1.1 <code><mapping></code>
|
|
element</h4>
|
|
|
|
<h6><a name="mappingAttrs" id="mappingAttrs">Attributes</a></h6>
|
|
|
|
<div class="attr"><b>xml:id</b> = xsd:ID<br style="clear:none;" />
|
|
|
|
|
|
<div class="attrdef">The identifier for this mapping.<br
|
|
style="clear:none;" />
|
|
<em>Required:</em> no, <em>Default:</em> none<br
|
|
style="clear:none;" />
|
|
</div>
|
|
|
|
<br style="clear:none;" />
|
|
<b>type</b> = "identity" | "product" | "table" | "affine" |
|
|
"mathml" | "unknown"<br style="clear:none;" />
|
|
|
|
|
|
<div class="attrdef">The type for the particular mapping.<br
|
|
style="clear:none;" />
|
|
<em>Required:</em> no, <em>Default:</em> unknown<br
|
|
style="clear:none;" />
|
|
</div>
|
|
|
|
<br style="clear:none;" />
|
|
<b>mappingRef</b> = xsd:anyURI<br style="clear:none;" />
|
|
|
|
|
|
<div class="attrdef">The ID of a mapping which has previously been
|
|
defined.<br style="clear:none;" />
|
|
<em>Required:</em> no, <em>Default:</em> none<br
|
|
style="clear:none;" />
|
|
</div>
|
|
</div>
|
|
|
|
<h6><a name="mappingContents"
|
|
id="mappingContents">Contents</a></h6>
|
|
|
|
<div class="nlcontents">
|
|
<div><samp>( <a href="#bindElement">bind</a>* ( <a
|
|
href="#tableElement">table</a> | <a href="#affineElement"
|
|
shape="rect">affine</a> | mathml:math )? ) | <a
|
|
href="#mappingElement">mapping</a>*</samp></div>
|
|
</div>
|
|
|
|
<p class="style2">(The mathml prefix above is declared as
|
|
"http://www.w3.org/1998/Math/MathML", the MathML schema
|
|
namespace [<cite><a href="#MATHML2">MATHML2</a></cite>].)</p>
|
|
|
|
<div>
|
|
<h6 id="identityMap">The identity map</h6>
|
|
|
|
<p>If the <strong>type</strong> attribute has value
|
|
<strong>identity</strong> then the element is empty.</p>
|
|
|
|
<p>Identity mappings are specified using an empty mapping
|
|
element:</p>
|
|
|
|
<pre class="ex" xml:space="preserve">
|
|
<mapping xml:id="m01" type="identity" />
|
|
|
|
<channel name="X" type="decimal" units="pt" default="0">
|
|
<mapping type="identity"/>
|
|
</channel>
|
|
</pre>
|
|
|
|
<p>They are used, for example, to define a
|
|
<code><traceFormat></code> channel that reports the exact
|
|
data that is recorded by a corresponding device channel, with no
|
|
filtering or transformation.</p>
|
|
</div>
|
|
|
|
<div>
|
|
<h6 id="CrossProductMaps">Cross Product Maps</h6>
|
|
|
|
<p>If the <strong>type</strong> attribute has value
|
|
<strong>product</strong> then the contents is a set of
|
|
<code><mapping></code> elements, each giving values for one
|
|
or more of the coordinates. This allows a multivariate mapping to
|
|
compute the different coordinate results according to the most
|
|
convenient means. For example, spatial coordinates may be
|
|
transformed using an affine map, button states by lookup tables,
|
|
and color coordinates using formulas.</p>
|
|
</div>
|
|
|
|
<div>
|
|
<h6 id="LookupTables">Lookup Tables</h6>
|
|
|
|
<p>If the <strong>type</strong> attribute has value
|
|
<strong>table</strong> then the mapping is a function specified by
|
|
a lookup table given as a <code><table></code> element
|
|
containing rows of values separated by commas.</p>
|
|
|
|
<div>
|
|
<h6 id="AffineMapes">Affine Maps</h6>
|
|
|
|
<p>If the <strong>type</strong> attribute has value
|
|
<strong>affine</strong> then the content is an
|
|
<code><affine></code> element specifying an affine
|
|
transformation (<b>u</b> ↦ <b>M</b> <b>u</b> + <b>b</b>) from
|
|
<i>n</i> source values to <i>m</i> target values. All of the source
|
|
and target values must be of the same type, either integer or real
|
|
(decimal or float). A matrix <b>M</b> containing only the values 0,
|
|
1 and -1 may be used to perform arbitrary permutation and
|
|
reflection of coordinates. If the affine map computes a real number
|
|
for an integer coordinate, then the value is rounded to the nearest
|
|
integer.</p>
|
|
</div>
|
|
|
|
<h6 id="MathMLMappings">MathML mappings</h6>
|
|
|
|
<p>If the <strong>type</strong> attribute has value
|
|
<strong>mathml</strong> then the content is a subset of MathML [<cite><a href="#MATHML2">MATHML2</a></cite>]
|
|
restricted to the following subset of Content MathML 2.0
|
|
elements:</p>
|
|
|
|
<div>
|
|
<ul>
|
|
<li>Numbers: <samp>cn</samp></li>
|
|
|
|
<li>Named constants: <samp>exponentiale, pi, true,
|
|
false</samp></li>
|
|
|
|
<li>Identifiers: <samp>ci</samp>. These must be associated to
|
|
channels using a <code><bind></code> element.</li>
|
|
|
|
<li>Arithmetic: <samp>plus, minus, times, divide, quotient, rem,
|
|
power, root, min, max, abs, floor, ceiling</samp></li>
|
|
|
|
<li>Elementary classical functions: <samp>sin, cos, tan, arcsin,
|
|
arccos, arctan, exp, ln, log</samp></li>
|
|
|
|
<li>Logic: <samp>and, or, xor, not</samp></li>
|
|
|
|
<li>Relations: <samp>eq, neq, gt, lt, geq, leq</samp></li>
|
|
|
|
<li>Operator application: <samp>apply</samp></li>
|
|
<li>
|
|
<p>Operator qualifiers: <samp>degree, logbase</samp></p>
|
|
</li>
|
|
</ul>
|
|
|
|
<p>This is a subset has been selected to provide expressions
|
|
suitable for scalar functions on integers, real numbers and boolean
|
|
values. A number of restrictions apply:</p>
|
|
|
|
<ul>
|
|
<li>The only elements permitted within the
|
|
<code><mathml:math></code> element are those in the above
|
|
list.</li>
|
|
|
|
<li>The content of <code><ci></code> and
|
|
<code><cn></code> elements is restricted to be text. In
|
|
particular, Presentation MathML markup is not allowed.</li>
|
|
|
|
<li>The only attribute that is recognized is the <b>type</b>
|
|
attribute on the <code><cn></code> element. The <b>type</b>
|
|
attribute may take the values <samp>integer</samp>,
|
|
<samp>real</samp> or <samp>rational</samp>. Other attributes may be
|
|
given on elements, but they are ignored.</li>
|
|
<li>All intermediate expressions must evaluate to an integer, real or double
|
|
value.</li>
|
|
|
|
<li>Elements of the arithmetic, elementary classical functions,
|
|
logic and relations categories above may appear only as the first
|
|
child of an <code><apply></code> element.</li>
|
|
</ul>
|
|
|
|
<p>The content of The arithmetic operators return values whose type
|
|
depends on the type of the arguments. The logical operators and
|
|
relations return boolean values. The elementary functions return
|
|
real values.</p>
|
|
|
|
<!--
|
|
<p>Additionally, an explicit <samp>list</samp> may be used at the
|
|
top-most level of the MathML expression when the mapping returns
|
|
multiple values. This is the case in a coordinate
|
|
transformation.</p>
|
|
-->
|
|
<p>Example: The following mapping converts from polar to
|
|
rectangular coordinates.</p>
|
|
|
|
<pre class="ex" xml:space="preserve">
|
|
<mapping type="product">
|
|
<mapping type="mathml">
|
|
<bind target="X"/>
|
|
<bind source="VR" variable="r"/>
|
|
<bind source="VTh" variable="theta"/>
|
|
<math xmlns="http://www.w3.org/1998/Math/MathML">
|
|
<apply>
|
|
<times/>
|
|
<ci>r</ci>
|
|
<apply> <cos/> <ci>theta</ci> </apply>
|
|
</apply>
|
|
</math>
|
|
</mapping>
|
|
<mapping type="mathml">
|
|
<bind target="Y"/>
|
|
<bind source="VR" variable="r"/>
|
|
<bind source="VTh" variable="theta"/>
|
|
<math xmlns="http://www.w3.org/1998/Math/MathML">
|
|
<apply>
|
|
<times/>
|
|
<ci>r</ci>
|
|
<apply> <sin/> <ci>theta</ci> </apply>
|
|
</apply>
|
|
</math>
|
|
</mapping>
|
|
</mapping>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
|
|
<h4 id="bindElement">6.1.2 <code><bind></code> element</h4>
|
|
|
|
<h6><a name="bindAttrs" id="bindAttrs">Attributes</a></h6>
|
|
|
|
<div class="attr"><b>source</b> = xsd:string<br
|
|
style="clear:none;" />
|
|
|
|
|
|
<div class="attrdef">Specifies source data values and/or channel to
|
|
be considered in the mapping.<br style="clear:none;" />
|
|
<em>Required:</em> no, <em>Default:</em> none<br
|
|
style="clear:none;" />
|
|
</div>
|
|
|
|
<br style="clear:none;" />
|
|
<b>target</b> = xsd:string<br style="clear:none;" />
|
|
|
|
|
|
<div class="attrdef">Specifies target data values and/or channel to
|
|
be considered in the mapping.<br style="clear:none;" />
|
|
<em>Required:</em> no, <em>Default:</em> none<br
|
|
style="clear:none;" />
|
|
</div>
|
|
|
|
<br style="clear:none;" />
|
|
<b>column</b> = xsd:integer<br style="clear:none;" />
|
|
|
|
|
|
<div class="attrdef">
|
|
Specifies the assigned column within a lookup table either for source or
|
|
target channels or the assigned position for a channel within the source or
|
|
target vector of an affine mapping.<br style="clear:none;" />
|
|
<em>Required:</em> <span>for lookup table bindings and affine mappings</span>, <em>Default:</em>
|
|
none<br style="clear:none;" />
|
|
</div>
|
|
|
|
<br style="clear:none;" />
|
|
<b>variable</b> = xsd:string<br style="clear:none;" />
|
|
|
|
|
|
<div class="attrdef">Specifies the variable within a formula that
|
|
represents the current source data/channel.<br
|
|
style="clear:none;" />
|
|
<em>Required:</em> for mathml bindings, <em>Default:</em> none<br
|
|
style="clear:none;" />
|
|
</div>
|
|
</div>
|
|
|
|
<h6><a name="bindContents" id="bindContents">Contents</a></h6>
|
|
|
|
<div class="nlcontents"><samp>EMPTY</samp></div>
|
|
|
|
<p>The <code><bind></code> element is provided for binding
|
|
channels to entities (variable names, lookup table columns) within
|
|
a mapping, and thus it supports the reuse of predefined mappings.
|
|
For each type of mapping, the relevant bindings can be expressed by
|
|
the combined usage of the <code><bind></code> element's
|
|
attributes, which are <b>source</b>, <b>target</b>, <b>column</b>
|
|
and <b>variable</b>.<br style="clear:none;" />
|
|
</p>
|
|
|
|
<p>For an identity mapping (<b>type="identity"</b>), if the source
|
|
channel has a different name than the channel being defined, this
|
|
can be specified using a <code><bind></code> element with a
|
|
<b>source</b> attribute. In the following markup, the
|
|
<code><traceFormat></code> channel X contains unmanipulated
|
|
data from the device's devX channel. When the mapping
|
|
type is an identity mapping, the <code><bind></code> element
|
|
<strong>source</strong> attribute is required, and the other
|
|
attributes <strong>target</strong>, <strong>column</strong>, and
|
|
<strong>variable</strong> must not be present.</p>
|
|
|
|
<pre class="ex" xml:space="preserve">
|
|
<channel name="X">
|
|
<mapping type="identity">
|
|
<bind source="devX"/>
|
|
</mapping>
|
|
</channel>
|
|
</pre>
|
|
|
|
<p>Within a mapping formula (<b>type="mathml"</b>), the variable
|
|
names in the formula need to be bound to particular channel names.
|
|
This is specified using a combination of <b>source</b> and
|
|
<b>variable</b> attributes for binding inputs of the formula, and
|
|
<b>target</b> and <b>variable</b> for the output of the formula.
|
|
This is useful if the same mapping formula is to be reused across
|
|
multiple channels, like X and Y for example. When the mapping
|
|
type is an mathml mapping the <strong>column</strong> attribute for
|
|
the <code><bind></code> element must not be present.</p>
|
|
|
|
<pre class="ex" xml:space="preserve">
|
|
<mapping xml:id="m06" type="mathml">
|
|
<bind target="X" variable="Q" />
|
|
<math xmlns="http://www.w3.org/1998/Math/MathML">
|
|
<apply>
|
|
<plus/>
|
|
<ci>Q</ci>
|
|
<cn>10</cn>
|
|
</apply>
|
|
</math>
|
|
</mapping>
|
|
</pre>
|
|
|
|
<p>The example shown above means that the channel X is referred to
|
|
by the variable name Q in the mapping expression "Q+10".</p>
|
|
|
|
<p>For a lookup table (<b>type="table"</b>), each index column must
|
|
be bound to the channel that provides the input for the lookup
|
|
operation. This is done with a <code><bind></code> element
|
|
that specifies <b>source</b> and <b>column</b> attributes.
|
|
Similarly, each value column must be bound to the channel that
|
|
receives the output of the lookup. Its <code><bind></code>
|
|
element specifies <b>target</b> and <b>column</b>. When
|
|
the mapping type is a lookup mapping the <strong>variable</strong>
|
|
attribute for the <code><bind></code> element must not be
|
|
present.</p>
|
|
|
|
<div>
|
|
<p>The following example indicates assignments of channels to
|
|
columns. It means that values for the channels OTx and P are used
|
|
to look up the value of the cross-coupling for channel X in the
|
|
table given by the mapping below:</p>
|
|
|
|
<pre class="ex" xml:space="preserve">
|
|
<mapping xml:id="m07" type="table">
|
|
<bind target="X" column="1"/>
|
|
<bind source="OTx" column="2"/>
|
|
<bind source="P" column="3"/>
|
|
<table apply="relative" interpolation="floor">
|
|
10 45 512,
|
|
9 45 400,
|
|
8 45 372,
|
|
7 45 418,
|
|
|
|
10 50 510,
|
|
9 50 403,
|
|
8 50 302,
|
|
7 50 407,
|
|
|
|
10 55 512,
|
|
9 55 410,
|
|
8 55 303,
|
|
7 55 405,
|
|
|
|
10 60 512,
|
|
9 60 420,
|
|
8 60 355,
|
|
7 60 401,
|
|
</table>
|
|
</mapping></pre>
|
|
<p>
|
|
For an affine mapping (<strong>type="affine"</strong>), the column values give
|
|
the meaning of the rows and columns of the transformation matrix. Suppose an
|
|
affine mapping is specified by the augmented matrix (M b), corresponding to
|
|
the transformation v = M . u + b. Then a <code><bind></code>
|
|
element with a <strong>source</strong> attribute will have a <strong>column</strong> attribute specifying which index in the vector u corresponds to the named source
|
|
channel. Likewise, a <code><bind></code>
|
|
element with a <strong>target</strong> attribute
|
|
will have a <strong>column</strong> attribute specifying which index in the vector v
|
|
corresponds to the named target channel. If the target bindings are
|
|
the same as the source bindings, then they may be omitted.
|
|
</p>
|
|
</div>
|
|
|
|
<div>
|
|
<h4 id="tableElement">6.1.3 <code><table></code> element</h4>
|
|
|
|
<h6><a name="tableAttrs" id="tableAttrs">Attributes</a></h6>
|
|
|
|
<div class="attr"><b>xml:id</b> = xsd:ID<br style="clear:none;" />
|
|
|
|
|
|
<div class="attrdef">The unique identifier for this
|
|
<code>table</code> element.<br style="clear:none;" />
|
|
<em>Required:</em> no<br style="clear:none;" />
|
|
</div>
|
|
|
|
<br style="clear:none;" />
|
|
<b>apply</b> = "absolute" | "relative"<br style="clear:none;" />
|
|
|
|
|
|
<div class="attrdef">Specifies whether the mapping values are used
|
|
from the table/formula, or whether this table/formula needs to be
|
|
added to the current data value.<br style="clear:none;" />
|
|
<em>Required:</em> no, <em>Default:</em> absolute<br
|
|
style="clear:none;" />
|
|
</div>
|
|
|
|
<br style="clear:none;" />
|
|
<b>interpolation</b> = "floor" | "middle" | "ceiling" | "linear" |
|
|
"cubic"<br style="clear:none;" />
|
|
|
|
|
|
<div class="attrdef">Specifies the interpolation between discrete
|
|
mapping values defined by a lookup table.<br style="clear:none;" />
|
|
<em>Required:</em> no, <em>Default:</em> "linear"<br
|
|
style="clear:none;" />
|
|
</div>
|
|
</div>
|
|
|
|
<h6><a name="tableContents" id="tableContents">Contents</a></h6>
|
|
|
|
<div class="nlcontents"><samp>((number | "T" | "F")+ ",")* (number
|
|
| "T" | "F")*</samp><br />
|
|
<p>where <samp>number</samp> is defined by the grammar given in the
|
|
<a href="#trace"><samp><trace></samp> element</a>
|
|
section.</p>
|
|
</div>
|
|
|
|
<p>The <code><table></code> gives a set of points for a
|
|
mapping. The points are given as comma-separated rows. Each row
|
|
must have the same number of entries. The final row may optionally
|
|
be followed by a comma. Each row in the table represents a value of
|
|
the function at one point. Which columns represent the argument(s)
|
|
and which the result(s) is determined by <code><bind></code>
|
|
elements.</p>
|
|
|
|
<p>The entries in the table may either be all numerical or all
|
|
boolean. They may be derived empirically, by measuring properties
|
|
of a device, calculated to provide efficient approximation to a
|
|
numerical function, or give an exhaustive enumeration of values of
|
|
a function over a finite set of values.</p>
|
|
|
|
<p>Example:</p>
|
|
|
|
<p>The following example means that X is a function of OE, given by
|
|
a lookup table. The value "relative" for the <b>apply</b>, means
|
|
the table gives an amount to increase X.</p>
|
|
|
|
<pre class="ex" xml:space="preserve">
|
|
<channel name="X"...>
|
|
...
|
|
<mapping xml:id="m03" type="table">
|
|
<bind source="OE"/>
|
|
<bind target="X"/>
|
|
<table apply="relative" interpolation="floor">
|
|
45 10,
|
|
50 9,
|
|
55 8,
|
|
60 7
|
|
</table>
|
|
</mapping>
|
|
...
|
|
</channel>
|
|
</pre>
|
|
|
|
<p>Tables may have more than two columns, with some of them (the
|
|
source columns) determining others (the target columns). If there
|
|
is more than one source column, then all possible combinations of
|
|
source values must be given. For example, if there are two source
|
|
columns with one having 3 distinct values and the other having 5
|
|
distinct values, then the table must have 15 rows.</p>
|
|
|
|
<p>The value of the <b>interpolation</b> attribute defines the
|
|
behavior for indices that don't appear in a numerical table. The
|
|
following summarizes the behavior of the above table for the
|
|
various values of <b>interpolation</b>:</p>
|
|
|
|
<table border="1" cellspacing="0" cellpadding="3" width="80%"
|
|
class="trace" summary="">
|
|
<tbody>
|
|
<tr>
|
|
<th>"floor"</th>
|
|
<td>The value is determined by rounding all source variables down
|
|
to the nearest specified value.
|
|
|
|
<pre xml:space="preserve">
|
|
X += 10 if 45 ≤ OE < 50,
|
|
X += 9 if 50 ≤ OE < 55,
|
|
...
|
|
</pre>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<th>"middle"</th>
|
|
<td>The value is constant on regions whose boundaries are mid-way
|
|
between the given source values.
|
|
|
|
<pre xml:space="preserve">
|
|
X += 10 if 45 ≤ OE < 47.5,
|
|
X += 9 if 47.5 ≤ OE < 52.5,
|
|
...
|
|
</pre>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<th>"ceiling"</th>
|
|
<td>The value is determined by rounding all source variables up to
|
|
the nearest specified value.
|
|
|
|
<pre xml:space="preserve">
|
|
X += 10 if OE ≤ 45,
|
|
X += 9 if 45 < OE ≤ 50,
|
|
...
|
|
</pre>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<th>"linear"</th>
|
|
<td rowspan="1" colspan="1">Piece-wise linear interpolation.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<th valign="top">"cubic"</th>
|
|
<td>Interpolation by cubic splines. This option may be used only
|
|
for univariate mappings and requires the table have at least 4
|
|
points.</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
<p>The <b>interpolation</b> attribute may not be used with boolean
|
|
tables.</p>
|
|
</div>
|
|
|
|
<div>
|
|
<h4 id="affineElement">6.1.4 <code><affine></code>
|
|
element</h4>
|
|
|
|
<h6><a name="affineAttrs" id="affineAttrs">Attributes</a></h6>
|
|
|
|
<div class="attr"><b>xml:id</b> = xsd:ID<br style="clear:none;" />
|
|
|
|
|
|
<div class="attrdef">The unique identifier for this
|
|
<code><affine></code> element.<br style="clear:none;" />
|
|
<em>Required:</em> no<br style="clear:none;" />
|
|
</div>
|
|
</div>
|
|
|
|
<h6><a name="affineContents" id="affineContents">Contents</a></h6>
|
|
|
|
<div class="nlcontents">
|
|
<p><samp>( number+ ",")* number*</samp></p>
|
|
|
|
<p>where <samp>number</samp> is defined by the grammar given in the
|
|
<a href="#trace"><samp><trace></samp> element</a>
|
|
section.</p>
|
|
</div>
|
|
|
|
<p>The <code><affine></code> element provides the entries for
|
|
an affine mapping from <i>n</i> source values to <i>m</i> target
|
|
values. An affine mapping consists of a linear transformation
|
|
(multiplication by a matrix) and a shift (adding a vector). The
|
|
content of the <code><affine></code> element is text giving a
|
|
<i>m</i> comma-separated rows of <i>n+1</i> numbers each. The final
|
|
row may optionally be followed by a comma. The first <i>n</i>
|
|
columns specify an <i>m ×n</i> matrix <b>M</b>, and the last column
|
|
gives a vector <b>b</b> of length <i>m</i>. If <b>u</b> is the
|
|
source vector of <i>n</i> coordinates, then <b>v = M u +
|
|
b</b> is the target vector of <i>m</i> coordinates.</p>
|
|
|
|
<p>The following is an example of an affine mapping using an
|
|
<code><affine></code> element to describe the transform (X,
|
|
Y) ↦ (-Y, X+200).</p>
|
|
|
|
<pre class="ex" xml:space="preserve">
|
|
<mapping xml:id="m01" type="affine">
|
|
<bind source="X" column="1"/>
|
|
<bind source="Y" column="2"/>
|
|
<affine>
|
|
0 -1 0,
|
|
1 0 200,
|
|
</affine>
|
|
</mapping>
|
|
</pre>
|
|
</div>
|
|
|
|
<h3 id="definitions">6.2 Definitions</h3>
|
|
|
|
<h4 id="definitionsElement">6.2.1 <code><definitions></code>
|
|
element</h4>
|
|
|
|
<h6><a id="definitionsAttrs"
|
|
name="definitionsAttrs">Attributes:</a></h6>
|
|
|
|
<div class="attr">none</div>
|
|
|
|
<h6><a id="definitionsContent"
|
|
name="definitionsContent">Contents:</a></h6>
|
|
|
|
<div>
|
|
<div class="contents">
|
|
<dl>
|
|
<dt><samp>( <a href="#brushElement">brush</a> | <a
|
|
href="#canvas">canvas</a> | <a
|
|
href="#canvasTransformElement">canvasTransform</a> | <a
|
|
href="#contextElement">context</a> | <a
|
|
href="#inkSourceElement">inkSource</a> | <a
|
|
href="#mappingElement">mapping</a> | <a href="#timestamp"
|
|
shape="rect">timestamp</a> | <a href="#trace">trace</a> | <a
|
|
href="#traceFormat">traceFormat</a> | <a
|
|
href="#traceGroup">traceGroup</a> | <a
|
|
href="#traceViewElement">traceView</a> )*</samp></dt>
|
|
</dl>
|
|
</div>
|
|
|
|
<p>The <code><definitions></code> element is a container
|
|
which is used to define reusable content. The definitions within a
|
|
<code><definitions></code> block can be referenced by other
|
|
elements using the appropriate syntax. Content within a
|
|
<code><definitions></code> block has no impact on the
|
|
interpretation of traces, unless referenced from outside the
|
|
<code><definitions></code> block. In order to allow them to
|
|
be referenced, elements within a <code><definitions></code>
|
|
block must include an <b>id</b>; attribute. Therefore, an element
|
|
which is defined inside a <code><definitions></code> without
|
|
an <b>id</b>, or that is never referenced, serves no purpose.</p>
|
|
|
|
<p>One of the primary uses of <code><definitions></code> is
|
|
to define contextual information. In particular, the elements
|
|
<code><brush></code>, <code><canvas></code>,
|
|
<code><canvasTransform></code>, <code><context></code>,
|
|
<code><inkSource></code>, <code><mapping></code>,
|
|
<code><timestamp></code> and <code><traceFormat></code>
|
|
may be given inside a <code><definitions></code>. These may
|
|
be referenced from other elements by the attributes
|
|
<b>brushRef</b>, <b>canvasRef</b>, <b>canvasTransformRef</b>,
|
|
<b>contextRef</b>, <b>inkSourceRef</b>, <b>mappingRef</b>,
|
|
<b>timestampRef</b> and <b>traceFormatRef</b>, respectively.
|
|
Timestamps may also be referenced by the <b>respectTo</b> attribute
|
|
of the <code><channel></code>element.</p>
|
|
|
|
<p>Another use of <code><definitions></code> is to define
|
|
digital ink traces for later reference. These may be given by
|
|
<code><trace></code>, <code><traceGroup></code> or
|
|
<code><traceView></code>. These are not considered part of
|
|
the ink data to be handled by the application until they are
|
|
referenced from other elements (outside the
|
|
<code><definitions></code>) by a <b>traceDataRef</b>
|
|
attribute. This is useful in archival applications.</p>
|
|
|
|
<p>The following simple example illustrates usage of the
|
|
<code><definitions></code> element.</p>
|
|
|
|
<pre class="ex" xml:space="preserve">
|
|
<ink xmlns="http://www.w3.org/2003/InkML">
|
|
<definitions>
|
|
<brush xml:id="redPen"/>
|
|
<brush xml:id="bluePen"/>
|
|
<traceFormat xml:id="normal"/>
|
|
<traceFormat xml:id="noForce"/>
|
|
<context xml:id="context1"
|
|
brushRef="#redPen"
|
|
traceFormatRef="#normal"/>
|
|
<context xml:id="context2"
|
|
contextRef="#context1"
|
|
brushRef="#bluePen"/>
|
|
</definitions>
|
|
<context contextRef="#context2" traceFormatRef="#noForce"/>
|
|
<context xml:id="context3"/>
|
|
</ink>
|
|
</pre>
|
|
|
|
<p>More details on the usage of the
|
|
<code><definitions></code> element are provided in the <a
|
|
href="#Archival">Archival Applications</a> section.</p>
|
|
</div>
|
|
|
|
<div>
|
|
<h3 id="annotations">6.3 Annotations</h3>
|
|
|
|
<p>InkML provides generic ways of assigning metadata or semantics
|
|
to ink via two elements <code><annotation></code> and
|
|
<code><annotationXML></code>, modeled after the corresponding
|
|
elements in MathML. However since annotations are typically
|
|
application-specific, InkML does not attempt to prescribe the
|
|
contents of these elements. Since the contents of
|
|
<code><annotation></code> or
|
|
<code><annotationXML></code> elements are application
|
|
defined, implementers should use them with care and remain aware
|
|
that other implementations may ignore them or fail to round-trip
|
|
unrecognized annotations.</p>
|
|
|
|
<h4 id="annotationElement">6.3.1 <code><annotation></code>
|
|
element</h4>
|
|
|
|
<h6><a id="annotationAttrs"
|
|
name="annotationAttrs">Attributes</a></h6>
|
|
|
|
<div class="attr"><b>type</b> = xsd:string<br
|
|
style="clear:none;" />
|
|
|
|
|
|
<div class="attrdef">The category of annotation that this element
|
|
describes, for descriptive purposes only. (Applications may define
|
|
their own types.)<br style="clear:none;" />
|
|
<em>Required:</em> no<br style="clear:none;" />
|
|
<em>Default:</em> none<br style="clear:none;" />
|
|
</div>
|
|
|
|
<br style="clear:none;" />
|
|
<b>encoding</b> = xsd:string<br style="clear:none;" />
|
|
|
|
|
|
<div class="attrdef">The kind of syntax, standard or convention
|
|
being used for the values of the annotation, e.g. ISO639 for
|
|
language codes. <em>Required:</em> no<br style="clear:none;" />
|
|
<em>Default:</em> none<br style="clear:none;" />
|
|
</div>
|
|
|
|
<p>Other attributes in a namespace other than that of InkML are
|
|
also allowed, such as general metadata properties (e.g. from the
|
|
Dublin Core vocabulary) or application-specific attributes.</p>
|
|
</div>
|
|
|
|
<p>The <code><annotation></code> element provides a mechanism
|
|
for inserting simple textual descriptions in the ink markup. This
|
|
may be used for multiple purposes. For instance, the text contained
|
|
in the <code><annotation></code> may include additional
|
|
information provided by the user generating InkML, and may be
|
|
displayed by an InkML consumer rendering a graphical representation
|
|
of traces. Or it may be used for the indication of metadata such as
|
|
the writer, the writing instrument. Another important potential
|
|
application is the semantic tagging of traces.</p>
|
|
|
|
<h6><a name="annotationExample"
|
|
id="annotationExample">Example:</a></h6>
|
|
|
|
<pre class="ex" xml:space="preserve">
|
|
<ink xmlns="http://www.w3.org/2003/InkML"
|
|
xmlns:dc="http://dublincore.org/documents/2001/10/26/dcmi-namespace/">
|
|
<annotation type="description">A Sample of Einstein's Writings</annotation>
|
|
<annotation type="writer">Albert Einstein</annotation>
|
|
<annotation type="contentCategory">Text/en</annotation>
|
|
<annotation type="language" encoding="ISO639">en</annotation>
|
|
<annotation dc:language="en"/>
|
|
|
|
<trace xml:id="trace1">
|
|
...
|
|
</trace>
|
|
<traceGroup xml:id="tg1">
|
|
<annotation type="truth">Hello World</annotation>
|
|
<traceGroup>
|
|
<annotation type="truth">Hello</annotation>
|
|
<trace> ... </trace>
|
|
...
|
|
</traceGroup>
|
|
<traceGroup>
|
|
<annotation type="truth">World</annotation>
|
|
<trace> ... </trace>
|
|
...
|
|
</traceGroup>
|
|
</traceGroup>
|
|
<traceView traceDataRef="#tg1"/>
|
|
</ink>
|
|
</pre>
|
|
|
|
<p>For semantic tagging, one of the common types of
|
|
<code><annotation></code> is "contentCategory", which
|
|
describes at a basic level the category of content that the traces
|
|
represent; e.g., "Text/English", "Drawing", "Math", "Music". Such
|
|
categories are useful for general data identification purposes, and
|
|
may be essential for selecting data to train handwriting
|
|
recognizers in different problem domains.</p>
|
|
|
|
<p>Although largely application-defined, a number of likely, common
|
|
categories are suggested below.</p>
|
|
|
|
<ul>
|
|
<li>Text/<language>[/<script>][/<sub-category>]
|
|
(e.g., Text/jpn/Kanji, Text/en/SSN)</li>
|
|
|
|
<li>Drawing[/<sub-category>] (e.g., Drawing/Sketch,
|
|
Drawing/Diagram)</li>
|
|
|
|
<li>Math</li>
|
|
|
|
<li>Music</li>
|
|
|
|
<li>Chemistry[<sub-category>]</li>
|
|
</ul>
|
|
|
|
<p>The language specification may be made using any of the language
|
|
identifiers specified in ISO 639, using 2-letter codes, 3-letter
|
|
codes, or country names. Some text may also require a script
|
|
specification (such as Kanji, Katakana, or Hiragana) in addition to
|
|
the language.</p>
|
|
|
|
<p>For some applications it may be useful to provide additional
|
|
sub-categories defining the type of the data. For example, some
|
|
suggested sub-categories for Text include:</p>
|
|
|
|
<ul>
|
|
<li>SSN (Social Security Number)</li>
|
|
|
|
<li>Phone</li>
|
|
|
|
<li>Date</li>
|
|
|
|
<li>Time</li>
|
|
|
|
<li>Currency</li>
|
|
|
|
<li>URL</li>
|
|
</ul>
|
|
|
|
<p>Suggested possible sub-categories for Drawing are:</p>
|
|
|
|
<ul>
|
|
<li>Sketch (Not suitable for geometric clean-up)</li>
|
|
|
|
<li>Diagram (Suitable for geometric clean-up)</li>
|
|
</ul>
|
|
|
|
<h4 id="annotationXMLElement">6.3.2
|
|
<code><annotationXML></code> element</h4>
|
|
|
|
<h6><a id="annotationXMLAttrs"
|
|
name="annotationXMLAttrs">Attributes</a></h6>
|
|
|
|
<div class="attr"><b>type</b> = xsd:string<br
|
|
style="clear:none;" />
|
|
|
|
|
|
<div class="attrdef">The category of annotation that this element
|
|
describes, for descriptive purposes only. (Applications may define
|
|
their own types.)<br style="clear:none;" />
|
|
<em>Required:</em> no, <em>Default:</em> none<br
|
|
style="clear:none;" />
|
|
</div>
|
|
|
|
<br style="clear:none;" />
|
|
<b>encoding</b> = xsd:string<br style="clear:none;" />
|
|
|
|
|
|
<div class="attrdef">The kind of syntax, standard or convention
|
|
being used for the values of the annotation, e.g. ChemML, MathML,
|
|
RDF, etc.<br style="clear:none;" />
|
|
<em>Required:</em> no, <em>Default:</em> none<br
|
|
style="clear:none;" />
|
|
</div>
|
|
|
|
<br style="clear:none;" />
|
|
<b>href</b> = xsd:anyURI<br style="clear:none;" />
|
|
|
|
|
|
<div class="attrdef">A reference to XML content giving the
|
|
annotation. <em>Required:</em> no, <em>Default:</em> none<br
|
|
style="clear:none;" />
|
|
</div>
|
|
|
|
<p>Other attributes in a namespace other than that of InkML are
|
|
also allowed, such as general metadata properties (e.g. from the
|
|
Dublin Core vocabulary) or application-specific attributes.</p>
|
|
</div>
|
|
|
|
<h6><a id="annotationXMLContents" name="annotationXMLContents"
|
|
shape="rect">Contents</a></h6>
|
|
|
|
<div class="contents"><samp>Any XML-based annotation</samp></div>
|
|
|
|
<p>This element allows ink to be annotated with general XML
|
|
objects. For instance a handwritten equation may be described using
|
|
a snippet of MathML, or metadata and semantic annotation may be
|
|
provided using an XML language. These annotations may be given
|
|
either as the content of an <code><annotationXML></code>
|
|
element or may be referred to by a <code>href</code> attribute, but
|
|
not both. If several annotations are desired, several
|
|
<code><annotationXML></code> elements should be given.</p>
|
|
|
|
<p>When annotations of a parent node include the content of the
|
|
annotations of the child nodes, then one should consider using
|
|
<code><annotationXML></code> annotations on the children with
|
|
<code>href</code> attributes referring to sub-trees of the parents
|
|
annotation in order to maintain linear space complexity in the
|
|
annotations.</p>
|
|
|
|
<h6><a name="annotationXMLExample1" id="annotationXMLExample1"
|
|
shape="rect">Example:</a></h6>
|
|
|
|
<pre class="ex" xml:space="preserve">
|
|
<ink xmlns="http://www.w3.org/2003/InkML">
|
|
<annotation type="description">A Sample of Einstein's Writings</annotation>
|
|
<annotationXML type="metadata" encoding="rdf">
|
|
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
|
xmlns:dc="http://purl.org/dc/elements/1.1/" >
|
|
<rdf:Description about=""
|
|
dc:language="en"
|
|
dc:date="2004-04-11"
|
|
dc:creator="InkML Maker v0.1"
|
|
dc:publisher="Famous Handwritings Ltd."/>
|
|
</rdf:RDF>
|
|
</annotationXML>
|
|
|
|
<trace> ... </trace>
|
|
...
|
|
<trace> ... </trace>
|
|
</ink>
|
|
</pre>
|
|
|
|
<h6><a name="annotationXMLExample2" id="annotationXMLExample2"
|
|
shape="rect">Example:</a></h6>
|
|
|
|
<pre class="ex" xml:space="preserve">
|
|
<ink xmlns="http://www.w3.org/2003/InkML">
|
|
<annotationXML type="truth" encoding="application/xhtml+xml">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<body>
|
|
<div xml:id="Ch1">
|
|
<h1 xml:id="T1"><span xml:id="W1">Weather </span></h1>
|
|
<p xml:id="P1">
|
|
<span xml:id="W2">The</span>
|
|
<span xml:id="W3">rain</span>
|
|
... more words
|
|
</p>
|
|
<p xml:id="P2">...</p>
|
|
... more paragraphs
|
|
</div>
|
|
... more chapters
|
|
</body>
|
|
</html>
|
|
</annotationXML>
|
|
|
|
<traceGroup>
|
|
<annotationXML href="#Ch1"/>
|
|
<traceGroup>
|
|
<annotationXML href="#T1"/>
|
|
<traceGroup>
|
|
<!-- Weather -->
|
|
<annotationXML href="#W1"/>
|
|
<trace>...</trace>
|
|
</traceGroup>
|
|
</traceGroup>
|
|
|
|
<traceGroup>
|
|
<annotationXML href="#P1"/>
|
|
<traceGroup>
|
|
<!-- The -->
|
|
<annotationXML href="#W2"/>
|
|
<trace>...</trace>
|
|
</traceGroup>
|
|
<traceGroup>
|
|
<!-- rain -->
|
|
<annotationXML href="#W3"/>
|
|
<trace>...</trace>
|
|
</traceGroup>
|
|
... more words in paragraph
|
|
</traceGroup>
|
|
</traceGroup>
|
|
<traceGroup>
|
|
<annotationXML href="#P2"/>
|
|
... words in paragraph
|
|
</traceGroup>
|
|
... more paragraphs in chapter.
|
|
</ink>
|
|
</pre>
|
|
|
|
<p>If it were not for the sharing of the substructure of the
|
|
attribute XML data, then each attribute word would be repeated
|
|
three times (as a word, in a paragraph, and in a chapter), each
|
|
paragraph would be repeated twice, etc.</p>
|
|
</div>
|
|
|
|
<div>
|
|
<h3 id="units">6.4 Units</h3>
|
|
|
|
<p>Units are used in several parts of ink mark up. For example
|
|
channels may report their values with some dimension, such as
|
|
length, requiring units. Other elements may give values, such as
|
|
resolution, as quantities in particular units.</p>
|
|
|
|
<p>The following abbreviations must be recognized as unit attribute
|
|
values.</p>
|
|
|
|
<table border="1" cellspacing="0" cellpadding="3" width="80%"
|
|
class="units" summary="">
|
|
<tbody>
|
|
<tr>
|
|
<th>Dimension</th>
|
|
<th>Unit</th>
|
|
<th>Interpretation</th>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td>length</td>
|
|
<td>m</td>
|
|
<td>meters</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td> </td>
|
|
<td>cm</td>
|
|
<td>centimeters</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td> </td>
|
|
<td>mm</td>
|
|
<td>millimeters</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td> </td>
|
|
<td>in</td>
|
|
<td>inches</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td> </td>
|
|
<td>pt</td>
|
|
<td>points (1pt = 1/72 in)</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td> </td>
|
|
<td>pc</td>
|
|
<td>picas (1pc = 1/22 pt)</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td> </td>
|
|
<td>em</td>
|
|
<td>ems, the width of a letter "M" in a notional normal size</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td> </td>
|
|
<td>ex</td>
|
|
<td>exs, the height of a letter "x" in a notional normal size</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td>time</td>
|
|
<td>s</td>
|
|
<td>seconds</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td> </td>
|
|
<td>ms</td>
|
|
<td>milliseconds</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td>mass</td>
|
|
<td>kg</td>
|
|
<td>kilograms</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td> </td>
|
|
<td>g</td>
|
|
<td>grams</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td> </td>
|
|
<td>mg</td>
|
|
<td>milligrams</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td>force</td>
|
|
<td>N</td>
|
|
<td>Newtons</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td>angle</td>
|
|
<td>deg</td>
|
|
<td>degrees</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td> </td>
|
|
<td>rad</td>
|
|
<td>radians</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td>all</td>
|
|
<td>%</td>
|
|
<td>percentage, expressed as a fraction (1.0 = 100%) relative to <em>max-min</em></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td> </td>
|
|
<td>dev</td>
|
|
<td>quanta relative to a device resolution. This can correspond to
|
|
pixels, force levels, clock ticks, etc.</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
<p>In addition to the units named above, the following expressions
|
|
must also be recognized:</p>
|
|
|
|
<div class="units">
|
|
<pre xml:space="preserve">
|
|
unitExpr ::=
|
|
unit
|
|
| "1" "/" unit
|
|
| unitExpr "/" unit
|
|
| unitExpr "*" unit
|
|
|
|
unitPrimitive ::= unit | "(" unitExpr ")"
|
|
|
|
unit ::= <em>one of the units from the table above,
|
|
with the exception of em, ex, % and dev.</em>
|
|
</pre>
|
|
</div>
|
|
|
|
<p>Other units are permitted, but need not be recognized by a
|
|
compliant application.</p>
|
|
</div>
|
|
|
|
<hr />
|
|
<h2 id="streamsAndArchives">7 Archives and Streams</h2>
|
|
|
|
<p>The ink markup is expected to be used in many different
|
|
scenarios. Ink markup data may be transmitted in substantially real
|
|
time while exchanging ink messages, or ink documents may be
|
|
archived for later retrieval or processing. InkML has been designed
|
|
with both of these uses in mind, and it is natural to use InkML in
|
|
a particular way in each of these settings.</p>
|
|
|
|
<p>These settings illustrate two different styles of ink generation
|
|
and usage. In the later, the markup must facilitate the incremental
|
|
transmission of a stream of ink data, while in the former, the
|
|
markup should provide the structure necessary for operations such
|
|
as search and interpretation. In order to support both cases, InkML
|
|
provides archival and streaming modes of usage. These are not
|
|
distinct and incompatible languages, but rather are two stylized
|
|
ways of using InkML.</p>
|
|
|
|
<h3 id="Archival">7.1 Archival Applications</h3>
|
|
|
|
<p>Archival applications typically handle ink data that has been
|
|
collected over some span of time and has some structure,
|
|
organization or interpretation associated to the ink data. These
|
|
applications may re-organize ink traces so it is preferable that
|
|
the traces be state-free. That is, in archival applications, to the
|
|
extent that ink traces make use of context information, this is
|
|
always done explicitly and never through the "current" context.</p>
|
|
|
|
<p>In archival usage, contextual elements occur within one or more
|
|
<code><definitions></code> elements and are assigned
|
|
identifiers using the id attribute. References to defined elements
|
|
are made using the corresponding <b>brushRef</b>,
|
|
<b>traceFormatRef</b>, and <b>contextRef</b> attributes. This is
|
|
illustrated in the following example:</p>
|
|
|
|
<pre class="ex" xml:space="preserve">
|
|
<definitions>
|
|
<brush xml:id="penA"/>
|
|
<brush xml:id="penB"/>
|
|
<traceFormat xml:id="fmt1">
|
|
<channel name="X" type="integer"/>
|
|
<channel name="Y" type="integer"/>
|
|
<channel name="Z" type="integer"/>
|
|
</traceFormat>
|
|
|
|
<canvas xml:id="canvasA">
|
|
<traceFormat>
|
|
<channel name="X" type="decimal" min="0" max="200" units="mm"/>
|
|
<channel name="Y" type="decimal" min="0" max="150" units="mm"/>
|
|
</traceFormat>
|
|
</canvas>
|
|
<canvasTransform xml:id="trans1">
|
|
<mapping type="affine">1 0 0 0,0 1 0 0</mapping>
|
|
</canvasTransform>
|
|
<canvasTransform xml:id="trans2">
|
|
<mapping type="affine">2 0 0 0,0 -2 0 0</mapping>
|
|
</canvasTransform>
|
|
|
|
<context xml:id="context1"
|
|
canvasRef="#canvasA"
|
|
canvasTransformRef="#trans1"
|
|
traceFormatRef="#fmt1"
|
|
brushRef="#penA"/>
|
|
|
|
<context xml:id="context2"
|
|
canvasRef="#canvasA"
|
|
canvasTransformRef="#trans2"
|
|
traceFormatRef="#fmt1"
|
|
brushRef="#penB"/>
|
|
</definitions>
|
|
</pre>
|
|
|
|
<p>This example defines two brushes ("penA" and "penB"), a
|
|
traceFormat ("fmt1"), and two contexts ("context1" and "context2")
|
|
which both refer to the same canvas ("canvasA") and traceFormat
|
|
("fmt1"), but with different canvas transforms and brushes. Note
|
|
the use of the <b>brushRef</b>, <b>traceFormatRef</b>,
|
|
<b>canvasRef</b> and <b>canvasTransformRef</b> attributes to refer
|
|
to previously defined <code><brush></code>,
|
|
<code><traceFormat></code> <code><canvas></code> and
|
|
<code><canvasTransform></code> elements.</p>
|
|
|
|
<p>Within the scope of a <code><definitions></code> element,
|
|
unspecified attributes of a <code><context></code> element
|
|
are assumed to have their default values. The
|
|
<code><definitions></code> block below defines "context1",
|
|
which is comprised of "canvasA" with the default canvasTransform
|
|
and traceFormat (the identity mapping and a traceFormat consisting
|
|
of decimal X-Y coordinate pairs), and "penA".</p>
|
|
|
|
<pre class="ex" xml:space="preserve">
|
|
<definitions>
|
|
<brush xml:id="penA"/>
|
|
<context xml:id="context1"
|
|
canvasRef="#canvasA"
|
|
brushRef="#penA"/>
|
|
</definitions>
|
|
</pre>
|
|
|
|
<p>A <code><context></code> element can inherit and override
|
|
the values of a previously defined context by including a
|
|
contextRef attribute, so the following block defines "context2"
|
|
which shares the same canvas ("canvasA") and traceFormat (the
|
|
default format) as "context1", but has a different canvasTransform
|
|
and brush.</p>
|
|
|
|
<pre class="ex" xml:space="preserve">
|
|
<definitions>
|
|
<brush xml:id="penA"/>
|
|
<context xml:id="context1"
|
|
canvasRef="#canvasA"
|
|
canvasTransformRef="#trans1"/>
|
|
<context xml:id="context2"
|
|
contextRef="#context1"
|
|
canvasTransformRef="#trans2"
|
|
brushRef="#penA"/>
|
|
</definitions>
|
|
</pre>
|
|
|
|
<p>Within archival ink markup, traces can either explicitly specify
|
|
their context through the use of contextRef and brushRef
|
|
attributes, or they can have their context provided by an enclosing
|
|
traceGroup. In the following example, traces "t001" and "t003" have
|
|
the context defined by "context1", while trace "t002" has a context
|
|
consisting of the default canvas, canvasTransform and traceFormat,
|
|
and "penA".</p>
|
|
|
|
<pre class="ex" xml:space="preserve">
|
|
<trace xml:id="t001" contextRef="#context1">...</trace>
|
|
<trace xml:id="t002" brushRef="#penA">...</trace>
|
|
|
|
<traceGroup contextRef="#context1">
|
|
<trace xml:id="t003">...</trace>
|
|
</traceGroup>
|
|
</pre>
|
|
|
|
<p>Traces within a <code><traceGroup></code> element can also
|
|
override the context or brush specified by the traceGroup. In the
|
|
following example, traces "t001" and "t003" have their context
|
|
specified by "context1" while trace "t002" overrides the default
|
|
brush of "context1" with "penA".</p>
|
|
|
|
<pre class="ex" xml:space="preserve">
|
|
<traceGroup contextRef="#context1">
|
|
<trace xml:id="t001">...</trace>
|
|
<trace xml:id="t002" brushRef="#penA">...</trace>
|
|
<trace xml:id="t003">...</trace>
|
|
</traceGroup>
|
|
</pre>
|
|
|
|
<p>A trace or traceGroup can both reference a context and override
|
|
its brush, as in the following example which assigns the context
|
|
specified by "context1" to traces "t001" and "t002", but with
|
|
"penA" instead of the default brush.</p>
|
|
|
|
<pre class="ex" xml:space="preserve">
|
|
<trace xml:id="t001" contextRef="#context1" brushRef="#penA">...</trace>
|
|
<traceGroup contextRef="#context1" brushRef="#penA">
|
|
<trace xml:id="t002">...</trace>
|
|
</traceGroup>
|
|
</pre>
|
|
|
|
<p>In archival mode, the ink markup processor can straightforwardly
|
|
determine the context for a given trace by examining only the
|
|
<code><definitions></code> blocks within the markup and the
|
|
enclosing traceGroup for the trace.</p>
|
|
|
|
<h3 id="Streaming">7.2 Streaming Applications</h3>
|
|
|
|
<p>Streaming ink applications present digital ink traces in
|
|
sequential time order. Contextual information is inserted into the
|
|
stream of ink traces, as needed, to provide interpretation for the
|
|
ink strokes. These changes to the current trace context are given
|
|
by <code><context></code> elements. These may directly
|
|
contain brush, trace format and other information or which may
|
|
refer to previously seen such elements. This corresponds to an
|
|
event-driven model of ink generation, where events which result in
|
|
contextual changes map directly to elements in the markup.</p>
|
|
|
|
<p>The current context consists of the set of canvas,
|
|
canvasTransform, traceFormat and brush which are associated with
|
|
subsequent traces in the ink markup. Initially, the current context
|
|
contains the default canvas, an identity canvasTransform, the
|
|
default traceFormat, and a brush with no attributes. Each
|
|
<code><brush></code>, <code><traceFormat></code>, and
|
|
<code><context></code> element which appears outside of a
|
|
<code><definitions></code> element changes the current
|
|
context accordingly (elements appearing within a
|
|
<code><definitions></code> block have no effect on the
|
|
current context, and behave as described above in the archival
|
|
section).</p>
|
|
|
|
<p>The appearance of a <code><brush></code> element in the
|
|
ink markup sets the current brush attributes, leaving all other
|
|
contextual values the same. Likewise, the appearance of a
|
|
<code><traceFormat></code> element sets the current
|
|
traceFormat, and the appearance of a <code><context></code>
|
|
element sets the current context.</p>
|
|
|
|
<p>Outside of a <code><definitions></code> block, any values
|
|
which are not specified within a <code><context></code>
|
|
element are taken from the current context. For instance, the
|
|
<code><context></code> element in the following example
|
|
changes the current brush from "penB" to "penA", leaving the
|
|
canvas, canvasTransform, and traceFormat unchanged from trace
|
|
"t001" to trace "t002". That is, each context element is taken to
|
|
inherit from the previously established context.</p>
|
|
|
|
<pre class="ex" xml:space="preserve">
|
|
<brush xml:id="penA"/>
|
|
<brush xml:id="penB"/>
|
|
<trace xml:id="t001">...</trace>
|
|
<context brushRef="#penA"/>
|
|
<trace xml:id="t002">...</trace>
|
|
</pre>
|
|
|
|
<p>In order to change a contextual value back to its default value,
|
|
its attribute can be specified with the value "<strong>#DefaultCanvas</strong>"
|
|
or "<strong>#DefaultBrush</strong>". In the
|
|
following:</p>
|
|
|
|
<pre class="ex" xml:space="preserve">
|
|
<context canvasRef="#canvasA" brushRef="#penA"/>
|
|
<trace xml:id="t001">...</trace>
|
|
<context canvasRef="#DefaultCanvas" brushRef="#DefaultBrush"/>
|
|
<trace xml:id="t002">...</trace>
|
|
</pre>
|
|
|
|
<p>Trace "t001" is on "canvasA" and has the brush specified by
|
|
"penA", while trace "t002" is on the default canvas and has the
|
|
default brush.</p>
|
|
|
|
<p>Brushes, traceFormats, and contexts which appear outside of a
|
|
<code><definitions></code> block and contain an <b>id</b>
|
|
attribute both set the current context and define contextual
|
|
elements which can be reused (as shown above for the brushes "penA"
|
|
and "penB"). This example:</p>
|
|
|
|
<pre class="ex" xml:space="preserve">
|
|
<context xml:id="context1"
|
|
canvasRef="#canvasA"
|
|
canvasTransformRef="#trans1"
|
|
traceFormatRef="#fmt1"
|
|
brushRef="#penA"/>
|
|
</pre>
|
|
|
|
<p>defines a context which can be referred to by its identifier
|
|
"context1". It also sets the current context to the values
|
|
specified in the <code><context></code> element.</p>
|
|
|
|
<p>A previously defined context is referenced using the
|
|
<b>contextRef</b> attribute of the <code><context></code>
|
|
element. For example:</p>
|
|
|
|
<pre class="ex" xml:space="preserve">
|
|
<context contextRef="#context1"/>
|
|
</pre>
|
|
|
|
<p>sets the current context to have the values specified by
|
|
"context1". A <code><context></code> element can also
|
|
override values of a previously defined context by including both a
|
|
<b>contextRef</b> attribute and one or more of the
|
|
<b>canvasRef</b>, <b>canvasTransformRef</b>, <b>traceFormatRef</b>
|
|
or <b>brushRef</b> attributes. The following:</p>
|
|
|
|
<pre class="ex" xml:space="preserve">
|
|
<context contextRef="#context1" brushRef="#penB"/>
|
|
</pre>
|
|
|
|
<p>sets the current context to the values specified by "context1",
|
|
except that the current brush is set to "penB" instead of
|
|
"penA".</p>
|
|
|
|
<p>A <code><context></code> element which inherits and
|
|
overrides values from a previous context can itself be reused, so
|
|
the element:</p>
|
|
|
|
<pre class="ex" xml:space="preserve">
|
|
<context xml:id="context2" contextRef="#context1" brushRef="#penB"/>
|
|
</pre>
|
|
|
|
<p>defines "context2" which has the same context values as
|
|
"context1" except for the brush.</p>
|
|
|
|
<p>Finally, a <code><context></code> element with only an id
|
|
has the effect of taking a "snapshot" of the current context which
|
|
can then be reused. The element:</p>
|
|
|
|
<pre class="ex" xml:space="preserve">
|
|
<context xml:id="context3"/>
|
|
</pre>
|
|
|
|
<p>defines "context3", whose values consist of the current
|
|
canvasRef, canvasTransform, traceFormat, and brush at the point
|
|
where the element occurs (note that since "context3" does not
|
|
specify any values, the element has no effect on the current
|
|
context).</p>
|
|
|
|
<p>An advantage of the streaming style is that it is easier to
|
|
express overlapping changes to the individual elements of the
|
|
context. However, determining the context for a particular trace
|
|
can require more computation from the ink markup processor, since
|
|
the entire file may need to be scanned from the beginning in order
|
|
to establish the current context at the point of the
|
|
<code><trace></code> element.</p>
|
|
|
|
<p>While it is possible to wait and generate each trace as it is
|
|
completed, this can lead to considerable latency from the starting
|
|
time with long strokes. This may be avoided by
|
|
generating traces of partial strokes and using continuation
|
|
traces.</p>
|
|
|
|
<p>Finally, it should be noted that traces can overlap in
|
|
time. This can occur in collaborative applications with
|
|
several writers or with one user on "multi-touch" devices.
|
|
Here it is also possible to generate traces for complete strokes on
|
|
pen up, but applications may use partial strokes of limited time
|
|
duration to guarantee that a buffer restricted to a sliding time
|
|
window sees all simultaneous traces.</p>
|
|
|
|
<h3 id="Equivalence">7.3 Archival and Streaming Equivalence</h3>
|
|
|
|
<p>The following examples of archival and streaming ink markup data
|
|
are equivalent, but they highlight the differences between the two
|
|
styles:</p>
|
|
|
|
<p><em>Archival</em></p>
|
|
|
|
<div>
|
|
<pre class="ex" xml:space="preserve">
|
|
<ink xmlns="http://www.w3.org/2003/InkML">
|
|
...
|
|
<definitions>
|
|
<brush xml:id="penA"/>
|
|
<brush xml:id="penB"/>
|
|
<context xml:id="context1"
|
|
canvasRef="#canvas1"
|
|
canvasTransformRef="#trans1"
|
|
traceFormatRef="#format1"/>
|
|
<context xml:id="context2"
|
|
contextRef="#context1"
|
|
canvasTransformRef="#trans2"/>
|
|
</definitions>
|
|
<traceGroup contextRef="#context1">
|
|
<trace>...</trace>
|
|
...
|
|
</traceGroup>
|
|
<traceGroup contextRef="#context2">
|
|
<trace>...</trace>
|
|
...
|
|
</traceGroup>
|
|
<traceGroup contextRef="#context2" brushRef="#penB">
|
|
<trace>...</trace>
|
|
...
|
|
</traceGroup>
|
|
<traceGroup contextRef="#context1" brushRef="#penB">
|
|
<trace>...</trace>
|
|
...
|
|
</traceGroup>
|
|
<traceGroup contextRef="#context1" brushRef="#penA">
|
|
<trace>...</trace>
|
|
...
|
|
</traceGroup>
|
|
</ink>
|
|
</pre>
|
|
</div>
|
|
|
|
<p><em>Streaming</em></p>
|
|
|
|
<div>
|
|
<pre class="ex" xml:space="preserve">
|
|
<ink xmlns="http://www.w3.org/2003/InkML">
|
|
...
|
|
<definitions>
|
|
<brush xml:id="penA"/>
|
|
<brush xml:id="penB"/>
|
|
</definitions>
|
|
<context xml:id="context1"
|
|
canvasRef="#canvas1"
|
|
canvasTransformRef="#trans1"
|
|
traceFormatRef="#format1"/>
|
|
<trace>...</trace>
|
|
...
|
|
<context xml:id="context2"
|
|
contextRef="#context1"
|
|
canvasTransformRef="#trans2"/>
|
|
<trace>...</trace>
|
|
...
|
|
<context brushRef="#penB"/>
|
|
<trace>...</trace>
|
|
...
|
|
<context contextRef="#context1"/>
|
|
<trace>...</trace>
|
|
...
|
|
<context brushRef="#penA"/>
|
|
<trace>...</trace>
|
|
...
|
|
</ink>
|
|
</pre>
|
|
</div>
|
|
|
|
<p>In the archival case, the context for each trace is simply
|
|
determined by the <code><trace></code> element, its enclosing
|
|
traceGroup, and contextual elements defined in the
|
|
<code><definitions></code> block, while in the streaming
|
|
case, the context for a trace can depend on the entire sequence of
|
|
context changes up to the point of the <code><trace></code>
|
|
element.</p>
|
|
|
|
<p>However, the streaming case more simply expresses the changes of
|
|
context involving "penB", "context1", and "penA", whereas the
|
|
archival case requires the restatement of the unchanged values in
|
|
the successive traceGroups.</p>
|
|
|
|
<p>The two styles of ink markup are equally expressive, but impose
|
|
different requirements on the ink markup processor and generator.
|
|
Tools to translate from streaming to archival style might also be
|
|
of use to applications which work on stored ink markup.</p>
|
|
<h2 id="s8">8. Conformance</h2>
|
|
<p>The contents of this section are normative.</p>
|
|
<h3 id="s8.1">8.1 Conforming InkML Documents</h3>
|
|
<p>A document is a Conforming InkML Document if it meets both the following
|
|
conditions:</p>
|
|
<ul>
|
|
<li>It is a well-formed XML document [<a href="#XML">XML</a>] conforming to
|
|
Namespaces in XML [<a href="#XMLNS">XMLNS</a>].</li>
|
|
<li>It adheres to the specification described in this document (InkML
|
|
Specification) including the constraints expressed in the Schema (see
|
|
<a href="#xsd">Appendix E</a>) and having an XML Prolog and root element as
|
|
specified in <a href="#inkElement">Section 2.1</a>.</li>
|
|
</ul>
|
|
<p>The InkML specification and these conformance criteria provide no designated
|
|
size limits on any aspect of InkML documents. There are no maximum values on the
|
|
number of elements, the amount of character data, or the number of characters in
|
|
attribute values.</p>
|
|
<p><span>Within this specification, the term URI refers to a Universal Resource
|
|
Identifier as defined in [<a href="#RFC3986">RFC3986</a>] and extended in [<a href="#RFC3987">RFC3987</a>]
|
|
with the new name IRI. The term URI has been retained in preference to IRI to
|
|
avoid introducing new names for concepts such as "Base URI" that are defined or
|
|
referenced across the whole family of XML specifications</span>.</p>
|
|
<h3 id="s8.2">8.2 Using InkML with other Namespaces</h3>
|
|
<p>The InkML namespace is intended to be used with other XML namespaces as per
|
|
the Namespaces in XML Recommendation [<a href="#XMLNS">XMLNS</a>]. Future work
|
|
by W3C is expected to address ways to specify conformance for documents
|
|
involving multiple namespaces.</p>
|
|
<h3 id="s8.3">8.3 Conforming InkML Processors</h3>
|
|
<p>An InkML processor is a program that can process and/or generate Conforming
|
|
InkML documents.</p>
|
|
<p>In a Conforming InkML Processor, the XML parser MUST be able to parse and
|
|
process all XML constructs defined by XML 1.1 [<a href="#XML">XML</a>] and
|
|
Namespaces in XML [<a href="#XMLNS">XMLNS</a>]. It is not required that a
|
|
Conforming InkML Processor uses a validating XML parser.</p>
|
|
<p>A Conforming InkML Processor MUST correctly understand and apply the semantics
|
|
of each markup element or attribute as described by this document.</p>
|
|
<p>There is, however, no conformance requirement with respect to performance
|
|
characteristics of the InkML Processor. For instance, no statement is required
|
|
regarding the accuracy, speed or other characteristics of output produced by the
|
|
processor. No statement is made regarding the size of input that a InkML
|
|
Processor is required to support.</p>
|
|
|
|
<hr />
|
|
<div>
|
|
<h2 id="acknowledgements">A Acknowledgements</h2>
|
|
|
|
<p>We thank our colleagues at IBM for providing their work in 2002
|
|
as a starting point for this definition.</p>
|
|
|
|
<p>We thank all participants in the InkML activity of the
|
|
Multimodal Interaction Working Group for the many detailed
|
|
constructive discussions. Without the participants' desire to
|
|
obtain the best outcome, regardless of corporate affiliation, this
|
|
work would not have been possible.</p>
|
|
|
|
<p>We specifically thank the W3C staff who have supported the InkML
|
|
activity: Max Froumentin who served as a staff member of W3C until
|
|
2006 and served as editor of previous working drafts and Kazuyuki
|
|
Ashimura who then took responsibility for the InkML activity at W3C
|
|
and has provided continuous energy and support.</p>
|
|
|
|
<p>Finally, we thank Deborah Dahl, whose stewardship of the W3C
|
|
Multimodal Interaction Working Group has provided the perfect
|
|
environment for this work to come to fruition.</p>
|
|
|
|
<h2 id="guidelines">B Implementation Guidelines</h2>
|
|
|
|
<p>The following are informative implementation guidelines for
|
|
reducing InkML file size and environmental interactions.</p>
|
|
|
|
<ol>
|
|
<li>Gzip compression.
|
|
|
|
<p class="style2">The lossless gzip compression [<cite><a
|
|
href="#RFC1952">RFC1952</a></cite>] will help to reduce the InkML
|
|
file size considerably. It is recommend that applications
|
|
have the facility to compress and decompress InkML files and
|
|
streams using the gzip algorithm.</p>
|
|
|
|
<p class="style2">The lossless gzip compression [<cite><a
|
|
href="#RFC1952">RFC1952</a></cite>] will help to reduce the InkML
|
|
file size</p>
|
|
</li>
|
|
|
|
<li>Authoring tips
|
|
|
|
<p class="style2">The elements which define constructs that can be
|
|
referenced repeatedly such as <code><brush></code>
|
|
definitions, and <strong><span
|
|
class="style1"><traceFormat></span></strong> definitions
|
|
should be placed within a <strong><span
|
|
class="style1"><definition></span></strong> element and
|
|
referred to in required places such as <strong><span
|
|
class="style1"><trace></span></strong> elements.</p>
|
|
|
|
<p class="style2">Applications should take advantage of trace data
|
|
prefixes (' | " | *) for defining relative coordinate values.
|
|
The use of first and second order derivative coordinates can
|
|
effectively compress <strong><span
|
|
class="style1"><trace></span></strong> element data
|
|
losslessly.</p>
|
|
|
|
<p class="style2">Applications should make use of the 'current
|
|
context' to cache the context property values and hence reduce the
|
|
context property markups that are being sent explicitly along with
|
|
trace data.</p>
|
|
</li>
|
|
|
|
<li>InkML transmission
|
|
|
|
<p class="style2">Any of the usual XML protocols (StAX, SOAP, etc)
|
|
may be used to transmit InkML documents or fragments between
|
|
subprograms or distributed programs.</p>
|
|
</li>
|
|
|
|
<li>Network streaming
|
|
|
|
<p class="style2">Client and server applications that wish to
|
|
stream InkML should have the capability to process the data sent in
|
|
multiple fragments of InkML packets. The receipt of such
|
|
InkML fragments may progressively render on the client or
|
|
clients.</p>
|
|
</li>
|
|
</ol>
|
|
|
|
<h2 id="references">C References</h2>
|
|
|
|
<dl>
|
|
<dt><a id="DC" name="DC">[DC]</a></dt>
|
|
|
|
<dd><cite><a href="http://dublincore.org/documents/dces/">Dublin
|
|
Core Metadata Element Set, Version 1.1: Reference
|
|
Description</a></cite>. http://dublincore.org/documents/dces/
|
|
.</dd>
|
|
|
|
<dt><a id="RDF-SYNTAX" name="RDF-SYNTAX">[RDF-SYNTAX]</a></dt>
|
|
|
|
<dd><cite><a
|
|
href="http://www.w3.org/TR/2004/REC-rdf-syntax-grammar-20040210/">RDF/XML
|
|
Syntax Specification (Revised)</a></cite>, D. Beckett, Editor, W3C
|
|
Recommendation, 10 February 2004,
|
|
http://www.w3.org/TR/2004/REC-rdf-syntax-grammar-20040210/ .
|
|
|
|
<a href="http://www.w3.org/TR/rdf-syntax-grammar/">Latest version</a>
|
|
available at http://www.w3.org/TR/rdf-syntax-grammar/ .</dd>
|
|
|
|
<dt><a id="RFC1952" name="RFC1952">[RFC1952]</a></dt>
|
|
|
|
<dd><cite><a href="http://www.ietf.org/rfc/rfc1952.txt">GZIP file
|
|
format specification version 4.3</a></cite>. IETF RFC 1952.
|
|
http://www.ietf.org/rfc/rfc1952.txt .</dd>
|
|
|
|
<dt><a id="RFC3023" name="RFC3023"></a>[RFC3023]</dt>
|
|
|
|
<dd><cite><a href="http://www.ietf.org/rfc/rfc3023.txt">XML Media
|
|
Types</a></cite>. IETF RFC 3023.
|
|
http://www.ietf.org/rfc/rfc3023.txt .</dd>
|
|
|
|
<dt id="XML">[XML]</dt>
|
|
|
|
<dd><cite><a href="http://www.w3.org/TR/2006/REC-xml11-20060816/">Extensible Markup Language (XML) 1.1 (Second Edition)</a></cite>, Tim Bray et al., Editors, W3C Recommendation, 16 August 2006, http://www.w3.org/TR/2006/REC-xml11-20060816/ . <a href="http://www.w3.org/TR/xml11/">Latest version</a> available at http://www.w3.org/TR/xml11/ .</dd>
|
|
|
|
<dt id="XMLNS">[XMLNS]</dt>
|
|
|
|
<dd><cite><a href="http://www.w3.org/TR/2006/REC-xml-names11-20060816/">Namespaces in XML 1.1 (Second Edition)</a></cite>, Tim Bray et al., Editors, W3C Recommendation, 16 August 2006, http://www.w3.org/TR/2006/REC-xml-names11-20060816/ . <a href="http://www.w3.org/TR/xml-names11/">Latest version</a> available at http://www.w3.org/TR/xml-names11/ .</dd>
|
|
|
|
<dt><a id="XMLSCHEMA2" name="XMLSCHEMA2">[XMLSCHEMA2]</a></dt>
|
|
|
|
<dd><cite><a href="http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/">XML Schema Part 2: Datatypes Second Edition</a></cite>, A. Malhotra, P. V. Biron,
|
|
Editors, W3C Recommendation, 28 October 2004, http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/ . <a href="http://www.w3.org/TR/xmlschema-2/">Latest version</a> available at http://www.w3.org/TR/xmlschema-2/ .</dd>
|
|
|
|
<dt><a id="MATHML2" name="MATHML2">[MATHML2]</a></dt>
|
|
|
|
<dd><cite><a
|
|
href="http://www.w3.org/TR/2003/REC-MathML2-20031021/">Mathematical Markup Language (MathML) Version 2.0 (Second Edition)</a></cite>, David Carlisle,
|
|
Patrick Ion,
|
|
Robert Miner,
|
|
Nico Poppelier, Editors, W3C Recommendation, 21 October 2003,
|
|
http://www.w3.org/TR/2003/REC-MathML2-20031021/ . <a
|
|
href="http://www.w3.org/TR/MathML2/">Latest version</a>
|
|
http://www.w3.org/TR/MathML2/ .</dd>
|
|
|
|
<dt><a id="RFC3986" name="RFC3986">[RFC3986]</a></dt>
|
|
|
|
<dd><cite><a href="http://www.ietf.org/rfc/rfc3986.txt">Uniform
|
|
Resource Identifier (URI): Generic Syntax.</a></cite> IETF RFC
|
|
3986. http://www.ietf.org/rfc/rfc3986.txt, January 2005</dd>
|
|
|
|
<dt><a id="RFC3987" name="RFC3987">[RFC3987]</a></dt>
|
|
|
|
<dd><cite><a
|
|
href="http://www.ietf.org/rfc/rfc3987.txt">Internationalized
|
|
Resource Identifiers (IRIs).</a></cite> IETF RFC 3987,
|
|
http://www.ietf.org/rfc/rfc3987.txt, January 2005.</dd>
|
|
|
|
<dt><a id="EBNF" name="EBNF">[EBNF]</a></dt>
|
|
|
|
<dd><cite><a
|
|
href="http://standards.iso.org/ittf/PubliclyAvailableStandards/s026153_ISO_IEC_14977_1996(E).zip">
|
|
Information technology — Syntactic metalanguage — Extended
|
|
BNF</a></cite>, International Organization for Standardization,
|
|
1996.<br />
|
|
Available at
|
|
http://standards.iso.org/ittf/PubliclyAvailableStandards/s026153_ISO_IEC_14977_1996(E).zip.
|
|
<!--
|
|
This specification uses the subset of EBNF defined in the <a
|
|
href="http://www.w3.org/TR/2006/REC-xml-20060816/#sec-notation">Notation</a>
|
|
section of <cite class="w3crec"><a
|
|
href="http://www.w3.org/TR/2006/REC-xml-20060816/">Extensible
|
|
Markup Language (XML) 1.0 (Fourth Edition)</a></cite>.
|
|
-->
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
|
|
<div>
|
|
<h2 id="mime-definition">D The InkML Media Type</h2>
|
|
|
|
<p>This appendix registers a new MIME media type,
|
|
"<code>application/inkml+xml</code>".</p>
|
|
|
|
<p>The
|
|
"<code>application/inkml+xml</code>"
|
|
media type is
|
|
registered with IANA at
|
|
<a href="http://www.iana.org/assignments/media-types/application/">
|
|
http://www.iana.org/assignments/media-types/application/</a>.
|
|
</p>
|
|
|
|
<div>
|
|
<h3 id="media-type-registration">D.1 Registration of MIME media
|
|
type application/inkml+xml</h3>
|
|
|
|
<dl>
|
|
<dt>MIME media type name:</dt>
|
|
|
|
<dd>
|
|
<p><code>application</code></p>
|
|
</dd>
|
|
|
|
<dt>MIME subtype name:</dt>
|
|
|
|
<dd>
|
|
<p><code>inkml+xml</code></p>
|
|
</dd>
|
|
|
|
<dt>Required parameters:</dt>
|
|
|
|
<dd>
|
|
<p>None.</p>
|
|
</dd>
|
|
|
|
<dt>Optional parameters:</dt>
|
|
|
|
<dd>
|
|
<p><code>charset</code></p>
|
|
<p>This parameter has identical semantics to the
|
|
<code>charset</code> parameter of the <code>application/xml</code>
|
|
media type as specified in [<cite><a
|
|
href="#RFC3023">RFC3023</a></cite>] or its successor.</p>
|
|
</dd>
|
|
|
|
<dt>Encoding considerations:</dt>
|
|
|
|
<dd>
|
|
<p>By virtue of InkML content being XML, it has the same
|
|
considerations when sent as "<code>application/inkml+xml</code>" as
|
|
does XML. See RFC 3023 (or its successor), section 3.2.</p>
|
|
</dd>
|
|
|
|
<dt>Security considerations:</dt>
|
|
|
|
<dd>
|
|
<p>InkML elements may include arbitrary URIs.
|
|
|
|
Therefore the security issues of
|
|
[<cite><a href="#RFC3986">RFC3986</a></cite>], section 7, should be
|
|
considered.</p>
|
|
|
|
<p>In addition, because of the extensibility features for InkML, it
|
|
is possible that "<code>application/inkml+xml</code>" may describe
|
|
content that has security implications beyond those described here.
|
|
However, if the processor follows only the normative semantics of
|
|
this specification, this content will be ignored. Only in the case
|
|
where the processor recognizes and processes the additional
|
|
content, or where further processing of that content is dispatched
|
|
to other processors, would security issues potentially arise. And
|
|
in that case, they would fall outside the domain of this
|
|
registration document.</p>
|
|
</dd>
|
|
|
|
<dt>Interoperability considerations:</dt>
|
|
|
|
<dd>
|
|
<p>This specification describes processing semantics that dictate
|
|
behavior that must be followed when dealing with, among other
|
|
things, unrecognized elements.</p>
|
|
|
|
<p>Because InkML is extensible, conformant
|
|
"<code>application/inkml+xml</code>" processors MAY expect that
|
|
content received is well-formed XML, but processors SHOULD NOT
|
|
assume that the content is valid InkML or expect to recognize all of
|
|
the elements and attributes in the document.</p>
|
|
</dd>
|
|
|
|
<dt>Published specification:</dt>
|
|
|
|
<dd>
|
|
<p>This media type registration is extracted from Appendix D of
|
|
the <a href="http://www.w3.org/TR/InkML/">Ink Markup Language
|
|
(InkML)</a> specification.</p>
|
|
</dd>
|
|
|
|
<dt>Additional information:</dt>
|
|
|
|
<dd>
|
|
<dl>
|
|
<dt>Magic number(s):</dt>
|
|
|
|
<dd>
|
|
<p>There is no single initial octet sequence that is always present
|
|
in InkML documents.</p>
|
|
</dd>
|
|
|
|
<dt>File extension(s):</dt>
|
|
|
|
<dd>
|
|
<p>InkML documents are most often identified with the extensions
|
|
"<code>.ink</code>" or "<code>.inkml</code>".</p>
|
|
</dd>
|
|
|
|
<dt>Macintosh File Type Code(s):</dt>
|
|
|
|
<dd>
|
|
<p>TEXT</p>
|
|
</dd>
|
|
</dl>
|
|
</dd>
|
|
|
|
<dt>Person & email address to contact for further
|
|
information:</dt>
|
|
|
|
<dd>
|
|
<p>Kazuyuki Ashimura, <<a
|
|
href="mailto:ashimura@w3.org">ashimura@w3.org</a>>.</p>
|
|
</dd>
|
|
|
|
<dt>Intended usage:</dt>
|
|
|
|
<dd>
|
|
<p>COMMON</p>
|
|
</dd>
|
|
|
|
<dt>Author/Change controller:</dt>
|
|
|
|
<dd>
|
|
<p>The InkML specification is a work product of the World Wide Web
|
|
Consortium's Multimodal Interaction Working Group. The W3C has
|
|
change control over these specifications.</p>
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
|
|
<div>
|
|
<h3 id="media-type-fragid">D.2 Fragment Identifiers</h3>
|
|
|
|
<p>For documents labeled as "<code>application/inkml+xml</code>",
|
|
the fragment identifier notation is exactly that for
|
|
"<code>application/xml</code>", as specified in RFC 3023.</p>
|
|
|
|
<h2 id="xsd">E XML Schema</h2>
|
|
|
|
<p>This section defines the formal syntax for InkML documents in
|
|
terms of a normative XML Schema.</p>
|
|
|
|
<p>The latest version of the XML Schema for InkML is available at
|
|
<a href="http://www.w3.org/TR/InkML/inkml.xsd">
|
|
http://www.w3.org/TR/InkML/inkml.xsd</a>.</p>
|
|
|
|
<p>For stability it is RECOMMENDED that you use the dated URI available at
|
|
<a href="http://www.w3.org/TR/2011/REC-InkML-20110920/inkml.xsd">
|
|
http://www.w3.org/TR/2011/REC-InkML-20110920/inkml.xsd</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
</body>
|
|
</html>
|
|
|