annotate annotate.xml @ 63:9cf99d513197

intro complete
author Henry S. Thompson <ht@markup.co.uk>
date Mon, 12 Jun 2017 13:40:56 +0200
parents e46b3efbe845
children 823ac978f4ab
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
62
e46b3efbe845 start work on annotation menu desing
Henry S. Thompson <ht@markup.co.uk>
parents:
diff changeset
1 <?xml version='1.0'?>
e46b3efbe845 start work on annotation menu desing
Henry S. Thompson <ht@markup.co.uk>
parents:
diff changeset
2 <?xml-stylesheet type="text/xsl" href="../../../lib/xml/doc.xsl" ?>
e46b3efbe845 start work on annotation menu desing
Henry S. Thompson <ht@markup.co.uk>
parents:
diff changeset
3 <!DOCTYPE doc SYSTEM "../../../lib/xml/doc.dtd" >
e46b3efbe845 start work on annotation menu desing
Henry S. Thompson <ht@markup.co.uk>
parents:
diff changeset
4 <doc>
e46b3efbe845 start work on annotation menu desing
Henry S. Thompson <ht@markup.co.uk>
parents:
diff changeset
5 <head>
e46b3efbe845 start work on annotation menu desing
Henry S. Thompson <ht@markup.co.uk>
parents:
diff changeset
6 <title>Spreadsheet annotation spec</title>
e46b3efbe845 start work on annotation menu desing
Henry S. Thompson <ht@markup.co.uk>
parents:
diff changeset
7 <author>Henry S. Thompson</author>
e46b3efbe845 start work on annotation menu desing
Henry S. Thompson <ht@markup.co.uk>
parents:
diff changeset
8 <date>$Id$</date>
e46b3efbe845 start work on annotation menu desing
Henry S. Thompson <ht@markup.co.uk>
parents:
diff changeset
9 </head>
e46b3efbe845 start work on annotation menu desing
Henry S. Thompson <ht@markup.co.uk>
parents:
diff changeset
10 <body>
e46b3efbe845 start work on annotation menu desing
Henry S. Thompson <ht@markup.co.uk>
parents:
diff changeset
11 <div>
e46b3efbe845 start work on annotation menu desing
Henry S. Thompson <ht@markup.co.uk>
parents:
diff changeset
12 <title>Introduction</title>
e46b3efbe845 start work on annotation menu desing
Henry S. Thompson <ht@markup.co.uk>
parents:
diff changeset
13 <p>This is a first pass at defining an annotation menu structure for
e46b3efbe845 start work on annotation menu desing
Henry S. Thompson <ht@markup.co.uk>
parents:
diff changeset
14 spreadsheets. The assumption is that we'll have an 'Annotate' entry in the Excel
e46b3efbe845 start work on annotation menu desing
Henry S. Thompson <ht@markup.co.uk>
parents:
diff changeset
15 right-button menu for selected regions, which will pop up region-appropriate
e46b3efbe845 start work on annotation menu desing
Henry S. Thompson <ht@markup.co.uk>
parents:
diff changeset
16 menus.</p>
e46b3efbe845 start work on annotation menu desing
Henry S. Thompson <ht@markup.co.uk>
parents:
diff changeset
17 </div>
e46b3efbe845 start work on annotation menu desing
Henry S. Thompson <ht@markup.co.uk>
parents:
diff changeset
18 <div>
e46b3efbe845 start work on annotation menu desing
Henry S. Thompson <ht@markup.co.uk>
parents:
diff changeset
19 <title>Top-level menus</title>
63
9cf99d513197 intro complete
Henry S. Thompson <ht@markup.co.uk>
parents: 62
diff changeset
20 <note>If the selection is a single cell I guess we try popping up a selection type menu,
9cf99d513197 intro complete
Henry S. Thompson <ht@markup.co.uk>
parents: 62
diff changeset
21 with choices 'Row', 'Column', 'Matrix' and 'None' (the latter resulting in <code>_Nnnn</code>).</note>
62
e46b3efbe845 start work on annotation menu desing
Henry S. Thompson <ht@markup.co.uk>
parents:
diff changeset
22 <p>Right-clicking 'Annotate' when over a selected range will create a new
e46b3efbe845 start work on annotation menu desing
Henry S. Thompson <ht@markup.co.uk>
parents:
diff changeset
23 defined name of the form <code>_Xnnn</code>, where <code>X</code> is one of <code>R</code>,
e46b3efbe845 start work on annotation menu desing
Henry S. Thompson <ht@markup.co.uk>
parents:
diff changeset
24 <code>C</code> or <code>M</code> for <name>r</name>ows (horizontal range
e46b3efbe845 start work on annotation menu desing
Henry S. Thompson <ht@markup.co.uk>
parents:
diff changeset
25 selection), <name>c</name>olumns (vertical range selection) or
e46b3efbe845 start work on annotation menu desing
Henry S. Thompson <ht@markup.co.uk>
parents:
diff changeset
26 <name>m</name>atrix (for two-dimensional range selection) respectively, and
e46b3efbe845 start work on annotation menu desing
Henry S. Thompson <ht@markup.co.uk>
parents:
diff changeset
27 <code>nnn</code> is a serial number for the relevant selection type.</p>
63
9cf99d513197 intro complete
Henry S. Thompson <ht@markup.co.uk>
parents: 62
diff changeset
28 <p>The comment field (attribute in the XML) of the defined name should contain a
9cf99d513197 intro complete
Henry S. Thompson <ht@markup.co.uk>
parents: 62
diff changeset
29 feature-value dictionary, represented in JSON/Python style, that is, using the
9cf99d513197 intro complete
Henry S. Thompson <ht@markup.co.uk>
parents: 62
diff changeset
30 following BNF</p>:
9cf99d513197 intro complete
Henry S. Thompson <ht@markup.co.uk>
parents: 62
diff changeset
31 <display><code>fvd := '{' ( fvp ( ',' fvp )* )? '}'
9cf99d513197 intro complete
Henry S. Thompson <ht@markup.co.uk>
parents: 62
diff changeset
32 fvp := key ':' value
9cf99d513197 intro complete
Henry S. Thompson <ht@markup.co.uk>
parents: 62
diff changeset
33 key := string
9cf99d513197 intro complete
Henry S. Thompson <ht@markup.co.uk>
parents: 62
diff changeset
34 value := string | number | fvp | array
9cf99d513197 intro complete
Henry S. Thompson <ht@markup.co.uk>
parents: 62
diff changeset
35 string := '"' char* '"'
9cf99d513197 intro complete
Henry S. Thompson <ht@markup.co.uk>
parents: 62
diff changeset
36 array := '[' ( value ( ',' value )* )? ']'</code></display>
9cf99d513197 intro complete
Henry S. Thompson <ht@markup.co.uk>
parents: 62
diff changeset
37 <p>with whitespace ignored, 'number' being the usual integer or decimal
9cf99d513197 intro complete
Henry S. Thompson <ht@markup.co.uk>
parents: 62
diff changeset
38 representation and 'char' being ASCII-only (?).</p>
9cf99d513197 intro complete
Henry S. Thompson <ht@markup.co.uk>
parents: 62
diff changeset
39 <p>If possible, the selected range should appear as the value of the new
9cf99d513197 intro complete
Henry S. Thompson <ht@markup.co.uk>
parents: 62
diff changeset
40 name <emph>without</emph> single-quotes.</p>
9cf99d513197 intro complete
Henry S. Thompson <ht@markup.co.uk>
parents: 62
diff changeset
41 <p>Some top-level features should be computed, others require annotator
9cf99d513197 intro complete
Henry S. Thompson <ht@markup.co.uk>
parents: 62
diff changeset
42 decision. Some features are unique to a particular selection type, others are
9cf99d513197 intro complete
Henry S. Thompson <ht@markup.co.uk>
parents: 62
diff changeset
43 shared across all or some types.</p>
9cf99d513197 intro complete
Henry S. Thompson <ht@markup.co.uk>
parents: 62
diff changeset
44 <p>Accordingly, in order for the annotator to supply the required
9cf99d513197 intro complete
Henry S. Thompson <ht@markup.co.uk>
parents: 62
diff changeset
45 information, a form should pop up with all the features appropriate to the
9cf99d513197 intro complete
Henry S. Thompson <ht@markup.co.uk>
parents: 62
diff changeset
46 selection type. Literal or array-valued form fields will just require a value
9cf99d513197 intro complete
Henry S. Thompson <ht@markup.co.uk>
parents: 62
diff changeset
47 menu (allowing multiple selection in the array-valued case), but features with
9cf99d513197 intro complete
Henry S. Thompson <ht@markup.co.uk>
parents: 62
diff changeset
48 dictionary values will require cascading sub-forms.</p>
9cf99d513197 intro complete
Henry S. Thompson <ht@markup.co.uk>
parents: 62
diff changeset
49 <p>The sections below tabulate the annotator-supplied features and their
9cf99d513197 intro complete
Henry S. Thompson <ht@markup.co.uk>
parents: 62
diff changeset
50 possible values.</p>
62
e46b3efbe845 start work on annotation menu desing
Henry S. Thompson <ht@markup.co.uk>
parents:
diff changeset
51 </div>
e46b3efbe845 start work on annotation menu desing
Henry S. Thompson <ht@markup.co.uk>
parents:
diff changeset
52 </body>
e46b3efbe845 start work on annotation menu desing
Henry S. Thompson <ht@markup.co.uk>
parents:
diff changeset
53 </doc>