-
Notifications
You must be signed in to change notification settings - Fork 0
/
PRMinXML.txt
1663 lines (1282 loc) · 63.9 KB
/
PRMinXML.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
Structure of PRM documentation (1.03)
=====================================
Introduction
------------
This document describes the structure of the XML documentation format to be
used by myself and others. The aims of the documentation format are simple :
* To be structured
* To provide a flexible base for documentation
* To be translatable to other formats easily
* To provide cross-referencing facilities
These aims have been, for the most part, met by the current DTD and reference
transformation (HTML).
Within this document, descriptions of elements are made with pseudo-SGML
entity description notation. This is mostly to simplify description. Where
the DTD and the descriptions in this document differ, the DTD should be
regarded as correct, with this document merely giving guidance on the use
of elements.
HTML transformation
-------------------
There are two major HTML transformations present in this release of the
PRM-in-XML stylesheets - the HTML 3.2 transformation (called `prm-html`
in the stylesheet and `html` in the riscos-prminxml tool) and
the HTML 5/CSS transformation (called `prm-html5` in the stylesheet, and
`html5` in the riscos-prminxml tool).
The transformation provided by the HTML stylesheets is intended to be as close
to that of the PRMs themselves. The HTML 3.2 is intended for use on legacy
browsers where stylesheets are not available. The HTML 5 layout, however,
can be used with modern browsers and takes advantage of many CSS features
as part of its layout. As such it is much more flexible than the original
transformation.
Whilst the HTML transformations are the current reference transformations,
there is no reason why others, such as StrongHelp or Impression DDF could
not be created.
Document validation
-------------------
XML has two primary definitions of correctness of documents.
'Well-formedness' is the term used where all the element start and end tags
match up and are correctly written. All XML documents must be well-formed.
The second form is that of 'validity'. This is where the structure is laid
out in a manner which is consistent with the DTD - all the tags occur in the
orders they should, and no attribute values have been added which are not
understood.
For the document to be translated, they need only be well-formed. However,
we strongly encourage all authors to ensure that their documents are both
well-formed and valid to reduce the likelihood of problems in the future.
In addition to this, the HTML transformation will apply a number of checks
itself on the document content. Where a problem is encountered, a message
will be displayed to indicate the issue which has been identified. Some
issues may not be a problem for the author - for example a reference to
an external document whose name has not been given (href="?...") which is
purely a placeholder until the document exists. Some messages will indicate
more serious problems. Authors should read the messages that are presented
to ensure they understand any issues that the transformation has raised.
When locating faults, the transformation will display an XPath like description
of the fault location. This can take one of two forms (depending on the
configuration of the stylesheet). The first of these forms is the simple
index form, for example :
Message definition for Window_Info not found at
/riscos-prm/chapter/section[2]/subsection[2]/subsubsection[3]/category[5]/p/list/item[3]/reference.
This form indicates the relative position of elements within the document,
whilst retaining the names of the elements and is quite compact. The
alternate, and default, form of describing the position is more verbose :
Message definition for Window_Info not found at
/
riscos-prm/
chapter[@title='Pinboard']/
section[@title='Technical details']/
subsection[@title='The iconise protocol']/
subsubsection[@title='Shift held down when the close tool of a window is clicked']/
category[@title='New application']/
p/
list/
item[3]/
reference[@name='Window_Info'].
This form splits across multiple lines for clarity, but provides a more
human-readable description of the location of the fault.
For further information on fault-finding, see the section on 'Finding
mistakes'.
Entities
--------
The DTD describes a number of entities which should be used within the PRM
documentation. The DTD will contain the most up-to-date examples of entities
that are required. It is expected that the list of entities expected in this
file be expanded with time, and as they are found to be necessary.
Some of the entities that can be used are :
no-breaking space, for keeping words together.
× multiplication symbol. Do not use 'x'.
≠ not equal. Do not use '!=' or '<>'
≡ equivalence. Try to get the difference between equality and
equivalence correct.
≤ less than, or equal to. Do not use '<='.
≥ greater than, or equal to. Do not use '>='.
µ micro symbol (u with a stick). Do not use 'u'.
&implies; implies symbol (rightward arrow, generally). Try to avoid if
possible. Symbols are less obvious than words.
&hex; hex value follows. Try not to use & to precede hex symbols
as this ties the output to RISC OS. Changing the definition
of &hex; should be all that is required to change the indicator
of a hex constant from & to 0x, or 16_ or some similar prefix.
This precludes the use of H suffixed, but we'll just suffer
that.
&lsl; logical shift left (bitwise)
&lsr; logical shift right (bitwise)
&asr; arithmetic shift right (bitwise, sign extending)
If you require some other entities, please contact me at gerph@gerph.org
and I'll decide whether it might be better to represent things with a
different form or to accept the entity. Most of the time text is
sufficient, but for certain applications this will be impossible.
Structural elements
-------------------
The PRMs have a number of structural elements which provide the basic
framework upon which the rest of the information exists.
Structurally, the document consists of :
<riscos-prm>
<chapter title="Component title">
<section title="Section title">
<p />
<subsection title="SubSection title">
<p />
<subsubsection title="SubSubSection title">
<p />
<category title="Category title">
<p />
</category>
</subsubsection>
</subsection>
<section>
<chapter>
<meta>
<maintainer>
<email name="someone" address="a@b.c" />
</maintainer>
<disclaimer>
<p />
</disclaimer>
<history>
<revision number="1" author="initials" title="Release name">
<change>Description</change>
</revision>
</history>
<related>
<reference type="document" href="file" name="Document title">
</related>
</meta>
</riscos-prm>
Element: riscos-prm
Attributes: (none)
Children: (chapter*), meta
The riscos-prm element is the top level element, within which other PRM
elements are contained.
Element: chapter
Attributes: title, docgroup, docgroup-part
Children: section*
The chapter equates to a chapter in the PRMs. The 'title' attribute should
be set to the title of the chapter. This is usually the component name, for
example 'Window Manager', 'ChangeFSI'. Whilst multiple chapters can be held
in a single file, it is expected that usually only a single chapter will be
held in the file at any one time.
The 'docgroup' may be set to some prefix that declares the category of
the documentation. By default, this is set to "RISC OS Programmers
Reference Manuals". Because of the diversity of the documentation that may
be produced, this value can be modified to suit the class being documented.
Examples of documentation groups might be :
Network Protocols
Zap Developer Documentation
Bogons Ltd Internal Documentation
The 'docgroup-part' is used to separate groups of documentation, such as
by volumes. For example this might be set to 'III' for the 3rd volume of
the documentation. By default, this is an empty string, which removes any
sequence number.
Element: section
Attributes: title
Children: (p | subsection | category | %apis;)*
The section equates to the 'new page and large heading' in the PRMs. The
'title' attribute should be set to the title of the section. Usually
sections are given in the order :
Introduction
- a brief introduction to what the component does
Overview (sometimes these are joined to make Introduction and
Overview)
- an overview of how the component is viewed by the outside world;
what it does and the manner in which it does it.
Terminology
- any terminology specific to this chapter which is assumed knowledge
for readers. Most components do not require the terms to be defined.
Technical details
- technical details about how to operate the component; this is usually
the largest section and fleshes out the summaries described above
and in the following sections with the 'whys', the 'hows' and the
specifics on the usage.
VDU codes
- lists the VDU codes, using vdu-definition, which are provided by
this component.
System variables
- lists the system variables, using sysvar-definition, which are used
by this component.
Service calls
- lists the service calls, using service-definition, which are defined
or used by this component.
SWI calls
- lists the SWI calls, using swi-definition, which are defined or used
by this component.
Software vectors
- lists the vector calls, using vector-definition, which are defined or
used by this component.
UpCalls
- lists the UpCalls, using upcall-definition, which are generated by
this component.
Entry points
- lists the Entry-points, using entry-definition, which are used by
this component. These would usually describe the entry points of
functions registered with your component.
Error messages
- lists the errors, using error-definition, which are reported by this
component.
Wimp messages
- lists the Wimp messages, using message-definition, which are generated
or received by this component.
Toolbox methods
- method calls for Toolbox components, described using
tboxmethod-definition.
Toolbox events
- events generated by Toolbox components, described using
tboxmessage-definition. The element name reflects the derivation (both
in implementation and documentation from the message-definition block,
rather than the more usually documented term 'event'.
*Commands
- lists the CLI commands, using command-definition, which are provided
by this component.
Examples
- any long examples which describe the overall use of the components
APIs
This does not preclude the use of any other order or sections being added,
but is a helpful convention to follow.
Element: subsection
Attributes: title
Children: (p | subsubsection | category)*
The subsection equates to the 'left of the page heading' in the PRMs. The
'title' attribute should be set to the title of the subsection. A subsection
describes something within the section, breaking it down into smaller
chunks. Examples of subsections (given for the 'Technical details' section)
might be 'Implementation', 'Interaction with xxx', 'Data formats', etc.
Element: subsubsection
Attributes: title
Children: (p | category)*
The subsubsection equates to the 'half indented headings' in the PRMs. Like
the subsection within a section, these describe something within a
subsection, breaking it into smaller chunks. An example of a subsubsection
might be individual data block descriptions within a 'Data formats'
subsection.
Element: category
Attributes: title
Children: (p)*
The category equates to the 'text level heading' in the PRMs. A category
does not truly equate to a subsubsubsection, but is intended to be used to
provide a distinction between different descriptions within the body of
the text. Categories tend to be used to describe alternate operation under
different circumstances, or to further describe particular features
which would be cumbersome to explain in the middle of a body of text;
for example, to define a term and provide examples - this allows it to be
found more easily via the contents page.
Element: p
Attributes: <none>
Children: (<many>)*
The p equates to a paragraph in the PRMs. It is used as the primary
descriptive block. In some cases it is also used as the holder for alternate
meanings, but these will be described where necessary.
Element: meta
Attributes: <none>
Children: (maintainer | history | disclaimer | related)*
The meta element describes meta-information about the document itself.
Metadata must be included at the end of the document, and should provide
sufficient detail about the document to describe what it's for and its
lineage. It must also describe who to contact about the document.
Document metadata
-----------------
Document metadata, held within the 'meta' element must be present within
the document to provide general information about the document itself.
It is very important that this section be kept up to date, particularly
with reference to the history of the document and the maintainers contact
details.
Metadata will usually be presented by the stylesheet at the bottom of the
document (or on a separate page, if the stylesheet allows this). This
ensures that is it easily accessible, without distracting from the content
of the document.
Element: maintainer
Attributes: <none>
Children: email*
The maintainer provides information on who maintains the document and should
be contacted for details about it. More than one maintainer may be provided,
where the document has been designed by, or is maintained by, more than one
person.
Element: history
Attributes: <none>
Children: revision*
The history provides information about the development of the document,
allowing users of the document to identify differences between different
documents without having to manually check for every change.
Element: revision
Attributes: number, date, author, title
Children: change*
number: describes the revision number of the document; these should be
in increasing value, and will usually be numeric. An alphabetic
character may be appended to indicate a minor revision whilst a
work is in progress.
date: may optionally provide a date on which the revision was made, in
the form 'dd mmm yyyy'.
author: should be the authors initials - the entity releasing the revision
should be given here
title: may optionally provide a title for the change. This should only
be provided where there is a distinct name for the release of
the documentation; for example, it may coincide with a component
release, in which case it should be appropriately named.
Intermediate changes will probably not require a title.
The revision element marks a major revision of the document. Each revision
indicates a distinct version of the document. Whilst earlier revisions need
not be kept by the maintainers, the revision history indicates the changes
that have taken place, thus allowing readers of the document to be aware of
the changes between those revisions.
Element: change
Attributes: <none>
Children: <text>
The change element describes an individual change of the document. Multiple
changes will usually apply to a single revision. It is expected that a
sentence or paragraph be used to describe the change. Examples of such
changes might be 'Updates Toaster_Heat API to include a flags word' or
'Removed restriction in the section documenting buffers that users of the
buffer hold their breath whilst the operations are performed. This was
resulting in the death of too many programmers during development'. Both API
and documentation changes should be noted within the change element.
Remember, the only indication of how things have developed is this record.
If something important is modified, and users of the document must be very
aware of the change, then drawing attention to it within the change element
is vital.
Element: disclaimer
Attributes: <none>
Children: (<many>)*
The disclaimer element provides a block of text where copyright
information, trademark acknowledgements, and statements of rights may
be made. You should ensure that all relevant information is included here.
References
----------
References are a means of linking one section of the document to another.
They can exist between local and external sections of documents. Because
the references need to refer to particular instances within the document
regularly, a 'type' is provided to indicate the object being referred to.
This will usually modify the manner in which the reference is presented,
although the methods used by the HTML transformation are preferred for
consistency.
Element: reference
Attributes: type, href, name, reason, use-description
Children: <text>?
type: may be one of :
link - an external link, given by 'href', with its description
as 'name'. The link will not be interpreted by the stylesheet
and may be any URI.
swi - a reference to a SWI whose name (and possibly reason code)
is given by 'name' and 'reason'.
sysvar - a reference to a System variable given by 'name'.
command - a reference to a *Command, given by 'name'.
vector - a reference to a Vector, given by 'name' and possibly
'reason'.
upcall - a reference to an UpCall, given by 'name' and possibly
'reason'.
service - a reference to a Service call, given by 'name' and
possibly 'reason'.
entry - a reference to an Entry point, given by 'name' and
possibly 'reason'.
message - a reference to a Wimp Message, given by 'name' and
possibly 'reason'.
document - a reference to a document, given by 'href', with its
description as 'name'. The document referenced should
not include any extension; one will be added by the
stylesheet should it be necessary.
error - a reference to an error message, given by 'name'
tboxmessage - a reference to a Toolbox message
tboxmethod - a reference to a Toolbox method
chapter - a reference to a chapter element, given by the 'title'.
section - a reference to a section element, given by the 'title'.
subsection - a reference to a subsection element, given by the 'title'.
subsubsection - a reference to a subsection element, given by the 'title'.
category - a reference to a subsection element, given by the 'title'.
name: describes the thing referred to (for non-link elements).
reason: describes a reason code on the referenced section (for non-link
elements)
use-description: may be one of :
yes - If the referenced element exists locally, then the link text
will be the description as given in the definition. This does
not apply to 'link' type references.
href: should point to the document referenced, if the reference is external.
If the reference is external, but no external document is known to
exist for it to point to, the href '?' should be used as the first
character to allow easy searching for these - this will be relied on
in the XSLT for providing warnings.
References may have content if they wish to override the default link
text associated with the element type being referenced. Where possible,
the stylesheet may warn over the bad use of references.
A failed reference may raise a warning on the console. This takes the form
of the path through the document to reach the faulty element. An example
might be :
SWI definition for CompressJPEG_WriteLiner not found at
/riscos-prm/chapter/section/p[4]/reference[2].
This means that there is a reference to CompressJPEG_WriteLiner for which
no corresponding local definition exists. To find the element, you start
at the root of the document and step through :
* Find the first root riscos-prm element.
* Inside this, find the 1st element; this is a chapter.
* Inside this, find the 1st element; this is a section.
* Inside this, find the 4th element; this is a p.
* Inside this, find the 2nd element; this is a reference.
* This is the faulty element.
Document inclusion
------------------
Under some circumstances, references to other documents are unsuitable, and
the document needs to include information from another in its own body.
Rather than duplicating the information within the document, the import
element gives an opportunity to import elements from elsewhere.
The primary uses for this kind of import would be to provide an amalgamated
document, comprising different sections from related documents, or to
produce a different view on to the document.
Element: import
Attributes: document, path
Children: <none>
document: path to the document being included, relative to the current
document.
path: XPath string describing the nodes to be imported
Imported elements can be used in many different places within the document
structure. This allows much greater freedom in producing documents than the
plain XML-based structure. You should use import with extreme care and only
to reconstruct documents, not as a matter of course.
Linking to external resources
-----------------------------
At present only one external resource is explicitly given; that of an email
reference.
Element: email
Attributes: name, address
Children: <none>
name: optional (but recommended) name of the recipient.
address: email address to send to.
The Email element provides a means for contacting people.
Technical elements
------------------
There are a number of elements that may be used within a normal body of
text to indicate a technical feature or instance. Examples of these are
file names, replaceable text, and system variables.
Element: userinput
Attributes: <none>
Children: (<text> | userreplace)*
User input is something that the user might give, by way of a short example
which is not a fully formed example.
Element: userreplace
Attributes: <none>
Children: <text>
The userreplace is represented in the PRMs by italic text. This element
describes something that the user is expected to replace with something else,
or is variable.
Example: <userreplace>FileSystem</userreplace>_DiscOp
Element: systemoutput
Attributes: <none>
Children: (<text> | userreplace)*
The systemoutput is represented in the PRMs by typewriter text. This element
describes the output from the system, usually in response to *Commands or
other command-like user interaction.
Element: menuoption
Attributes: <none>
Children: (<text> | userreplace)*
The menuoption is not represented in the PRMs. This element describes a
menu option. Its representation in a transformation is undefined; it may be
used only as an indexing entry.
Element: actionbutton
Attributes: <none>
Children: (<text>)*
The actionbutton is not represented in the PRMs. This element describes a
button in the interface. Its representation in a transformation is undefined;
it may be used only as an indexing entry.
Element: filename
Attributes: type
Children: (<text> | userreplace)*
type: (optional) type of filename represented:
riscos - a RISC OS filename (default)
windows - a Windows filename
unix - a Unix (POSIX) filename
uri - a URI
The filename is usually represented in the PRMs by typewriter text. This
element describes a filename which should be, or can be, supplied to the
system. Because filenames may be transferred from different systems, and
some filenames may need to be given in alternative formats, the type should
be used to differentiate the semantics of the filename.
Element: variable
Attributes: <none>
Children: (<text> | userreplace)*
The variable is usually represented in the PRMs by typewriter text. This
element describes a variable which should be, or can be, supplied to the
system.
Element: command
Attributes: <none>
Children: (<text> | userreplace)*
The command is usually represented in the PRMs by typewriter text. This
element describes a command that might be issued by the user, or programmer.
Element: function
Attributes: <none>
Children: (<text> | userreplace)*
The function is usually represented in the PRMs by typewriter text. This
element describes a command that might be issued by a programmer in a
programming language, including C, BASIC, Pascal or Assembler. The
distinction between function and routine is not made by this element -
a PROC in basic will be referenced as a function.
Element: code
Attributes: type
Children: (<text> | userreplace | br)*
type: the type of the code which is described, which may be one of :
c - C code
basic - BASIC code
asm - assembler code
format - a file format
pseudo - pseudocode in no particular language
The code element is usually represented in the PRMs by typewriter text.
This element describes a section of code which can be used to provide
a particular function either as an example or as a means of describing
file formats. This element is recommended for example code sections
for single-line or simple examples.
Element: extended-example
Attributes: type
Children: <text>*
type: the type of the code which is described, which may be one of :
c - C code
basic - BASIC code
asm - assembler code
format - a file format
pseudo - pseudocode in no particular language
The extended-example element is usually represented in the PRMs by a block
of typewriter text which may be a code fragment.
This element describes a section of code which can be used to provide
a particular function either as an example or as a means of describing
file formats. This element is recommended for example code sections
for multi-line examples, where pre-formatted text is expected.
Element: sysvar
Attributes: <none>
Children: (<text> | userreplace)*
The sysvar is usually represented in the PRMs by typewriter text. This
element describes a system variable. Where the system variable can be
indexed, we recommend you use <reference type="sysvar" ...>.
Element: input
Attributes: <none>
Children: (key | mouse)*
The input element contains a sequence of input device actions. The two
input device actions currently supported, key and mouse, may be placed
within this element to describe an actions sequence.
Element: key
Attributes: name, repeat, action
Children: <none>
name: the name of the keyboard button which is being activated. The
standard named keys may be used, in lower case. Regular keys
may also be used but will not be translated to the presentation
format. Standard key names:
shift ctrl alt meta fn
up down left right pageup
pagedown backspace tab return escape
enter insert delete home end
copy print break capslock scrolllock
numlock space
f1 f2 f3 f4 f5
f6 f7 f8 f9 f10
f11 f12
repeat: number of repetitions, which may be 1 (the default), 2, 3 or
4. Higher numbers of repetitions should be explained manually.
action: the action which the user performs. Named actions should be
used:
click press release hold
The key element is used to represent a key action (such as a key
press and release) which is performed by the user. The keys are given
standard names so that they may be transformed appropriately by
stylesheets for a given presentational style. Capitalised strings
should be used for the names of special buttons, or standard letter
keys.
Element: mouse
Attributes: name, repeat, action
Children: <none>
name: the name of the mouse input which is being activated. The
standard named buttons may be used, in lower case. Additional
buttons should be described in upper case. Standard button
names:
select menu adjust
scrollwheel
repeat: number of repetitions, which may be 1 (the default), 2, 3 or
4. Higher numbers of repetitions should be explained manually.
action: the action which the user performs. Named actions should be
used:
click press release hold drag
up down left right
The mouse element is used to present a mouse action which is being
performed by the user. The standard RISC OS names should be used
where possible - the physical position of the buttons should only
be used when describing a translation between other operating
systems and uses, or the specific behaviour of a given mouse
driver.
The scrollwheel name is intended for use when describing the actions
of the scroll wheel which may be horizontal or vertical. The actions
should be the direction that the scroll wheel is moved.
Data structures
---------------
There are a few types of data structures provided by this definition. These
are the 'bitfield-table', 'value-table', 'offset-table', 'message-table'
and 'definition-table'.
These are grouped into table/value pairs :
bitfield-table & bit
value-table & value
offset-table & offset
message-table & message
definition-table & definition
version-table & version
message-tables are solely for use within descriptions of Wimp message
blocks.
value-tables are intended for numeric data, whilst definition-tables are
indented for textual definitions.
version-tables are for describing compatibility and differences in
behaviour between versions of a component or protocol.
Element: bitfield-table
Attributes: <none>
Children: (bit)*
The bitfield element is conventionally represented as a table of bits and
their meanings. Usually the table is headed by 'Bit' and 'Meaning if set'
(and possibly 'name' where name values are given). If the bits within the
table have 'state' elements then the 'Meaning if set' title changes to
'Meaning'. You should format your descriptions accordingly.
Element: bit
Attributes: number, name, state
Children: <text>
number: the number of the bits, or a range of bits separated by a hyphen.
name: (optional) a name to assign to this bit (or range of bits).
state: (optional) describes the state of the bit. There are a few ways
to use this :
content : the default, refers to the content as being the only
information for this bit
set : the content describes the meaning if the bit is set
clear : the content describes the meaning if the bit is unset
reserved : this bit is reserved and must be zero.
A bit is an element of a bitfield-table, describing one or more bits. Usually
it is represented as a component of a table comprising the bit values. The
meaning of the bit is described by the content of the element. The meaning
is implicitly the meaning if that bit is set if none of the bit elements
have a 'state' attribute. For a range of bits it is conventional to provide
a value-table, or describe the meaning within the body of the description.
Element: value-table
Attributes: head-number, head-name, head-value
Children: (value)*
head-number: (optional) a heading for the number field
head-name: (optional) a heading for the name field
head-value: (optional) a heading for the value field (the body of the
element)
The value-table element is conventionally represented as a table of values
and their meanings. Usually the table is headed by 'value' and 'meaning'
(and possibly 'name' where name values are given). Where heading values are
given, these will be used to provide further indication of the fields.
Whilst it is possible to subvert the meaning of the value-table by changing
these headings, this should only be done with care.
Element: value
Attributes: number, name
Children: <text>
number: the value, or a range of values separated by a hyphen.
name: (optional) a name to assign to this value (or range of values).
A value is an element of a value-table, describing the meaning of one or
more values. Usually it is represented as a component of a table comprising
the values. The meaning of the value is described by the content of the
element.
Element: offset-table
Attributes: head-number, head-name, head-data-size, head-value
Children: (offset)*
head-number: (optional) a heading for the number field
head-name: (optional) a heading for the name field
head-data-size: (optional) a heading for the data-size field
head-value: (optional) a heading for the value field (the body of the
element)
The offset-table element is conventionally represented as a table of offsets
and their meanings. Usually the table is headed by 'offset' and 'contents'.
There may also be columns to name the offset, and to give the size of the data.
Where heading values are given, these will be used to provide further
indication of the fields.
Whilst it is possible to subvert the meaning of the offset-table by changing
these headings, this should only be done with care.
Element: offset
Attributes: number, data-size, name, state
Children: <text>
number: the offset, or a range of offsets separated by a hyphen.
name: (optional) a name to assign to this offset (or range of offsets).
data-size: (optional) a width to use for the field, in bytes.
state: (optional) describes the state of the field. There are a few ways
to use this :
content : the default, refers to the content as being the only
information for this field
reserved : this field is reserved and must be zero
undefined : this field is undefined and its value is should not
be interpreted
An offset is an element of a offset-table, describing the meaning of one or
more offsets into a structure. Usually it is represented as a component of a
table comprising the structure offsets. The meaning of the offset is
described by the content of the element. In the translated version, offsets
will always be described preceded by a '+' symbol to indicate that they
are offsets.
Element: message-table
Attributes: <none>
Children: (message)*
The message-table element is conventionally represented as a table of
offsets into a message block and their meanings. The table is headed by
'offset' and 'contents'.
Element: message
Attributes: offset, data-size, name, state
Children: <text>
offset: the offset, or a range of offsets separated by a hyphen.
name: (optional) a name to assign to this offset (or range of offsets).
data-size: (optional) a width to use for the field, in bytes.
state: (optional) describes the state of the field. There are a few ways
to use this :
content : the default, refers to the content as being the only
information for this field
reserved : this field is reserved and must be zero
undefined : this field is undefined and its value is should not
be interpreted
A message is an element of a message-table, describing the meaning of one or
more offsets into a message block. Usually it is represented as a component
of a table comprising the message block. The meaning of the offset is
described by the content of the element. In the translated version, offsets
will always be described preceded by 'R1+' to indicate that they are from
the message block pointer in register 1 (as supplied to
Wimp_SendMessage/Wimp_Poll[Idle])
Element: definition-table
Attributes: head-name, head-extra, head-value
Children: (value)*
head-name: (optional) a heading for the number field
head-exra: (optional, but recommended) a heading for the extra field
head-value: (optional) a heading for the value field (the body of the
element)
The definition-table element is conventionally represented as a table of
textual definitions. Usually the table is headed by 'name' and 'meaning'
(and possibly 'extra' when an extra field is supplied). Where heading
values are given, these will be used to provide further indication of
the fields. The definition-table is intended to make it possible to
describe terms and labels, whilst the value-table is intended for numbers.
Element: definition
Attributes: name, extra
Children: <text>
name: the textual string being defined
extra: (optional) an additional field if required in the table
A definition is an element of a definition-table, describing the meaning
of one or more terms. Usually it is represented as a component of a
table comprising the definitions. The meaning of the definition is
described by the content of the element.
Element: version-table
Attributes: <none>
Children: (version)*
The version-table element is represented as a set of rows describing
the differences between different versions of a component or protocol.
Unlike the other tables above, this information is not (in the standard
layout) presented as tabular data, but as an indented list.
Element: version
Attributes: module-name, module-lt, module-eq, module-ge,
riscos-lt, riscos-eq, riscos-ge,
supplier, hardware, architecture,
state
module-name: (optional) The name of a module within which this version applies
(defaults to not saying the module, assumed to be the one
documented in the chapter)
module-lt: (optional) The documentation details versions up to the version
given.
module-eq: (optional) The documentation details an explicit version.
module-ge: (optional) The documentation details versions after the version given.
riscos-lt: (optional) The documentation details versions of the OS up to the
version given.
riscos-eq: (optional) The documentation details an explicit version of the OS.
riscos-ge: (optional) The documentation details versions of the OS after the
version given.
supplier: (optional) Qualifies the supplier of the component (RISC OS/module).
For example, to discuss RISC OS Ltd versions, RISC OS Open versions,
RISC OS Direct versions (for the OS), or the supplier of a module
as might be the case for different hardware manufacturers of some
modules (like Joystick).