summaryrefslogtreecommitdiff
path: root/slides/schema/relaxng/callouts.rng
blob: 12c231c266de67dc271d85ef75f6284d827889cf (plain)
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
<?xml version="1.0" encoding="UTF-8"?>
<!--
  This file is part of DocBook V5.0
  
  Copyright 1992-2008 HaL Computer Systems, Inc.,
  O'Reilly & Associates, Inc., ArborText, Inc., Fujitsu Software
  Corporation, Norman Walsh, Sun Microsystems, Inc., and the
  Organization for the Advancement of Structured Information
  Standards (OASIS).
  
  Release: $Id: callouts.rnc 8931 2010-10-20 13:29:20Z nwalsh $
  
  Permission to use, copy, modify and distribute the DocBook schema
  and its accompanying documentation for any purpose and without fee
  is hereby granted in perpetuity, provided that the above copyright
  notice and this paragraph appear in all copies. The copyright
  holders make no representation about the suitability of the schema
  for any purpose. It is provided "as is" without expressed or implied
  warranty.
  
  If you modify the DocBook schema in any way, label your schema as a
  variant of DocBook. See the reference documentation
  (http://docbook.org/tdg5/en/html/ch05.html#s-notdocbook)
  for more information.
  
  Please direct all questions, bug reports, or suggestions for changes
  to the docbook@lists.oasis-open.org mailing list. For more
  information, see http://www.oasis-open.org/docbook/.
  
  ======================================================================
-->
<grammar ns="http://docbook.org/ns/docbook" xmlns:db="http://docbook.org/ns/docbook" xmlns:s="http://purl.oclc.org/dsdl/schematron" xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns:rng="http://relaxng.org/ns/structure/1.0" xmlns:ctrl="http://nwalsh.com/xmlns/schema-control/" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
  <start combine="choice">
    <choice>
      <ref name="db.calloutlist"/>
      <ref name="db.programlistingco"/>
      <ref name="db.screenco"/>
      <ref name="db.imageobjectco"/>
    </choice>
  </start>
  <define name="db.publishing.inlines" combine="choice">
    <ref name="db.coref"/>
  </define>
  <define name="db.list.blocks" combine="choice">
    <ref name="db.calloutlist"/>
  </define>
  <define name="db.verbatim.blocks" combine="choice">
    <choice>
      <ref name="db.programlistingco"/>
      <ref name="db.screenco"/>
    </choice>
  </define>
  <define name="db.computeroutput.inlines" combine="choice">
    <ref name="db.co"/>
  </define>
  <define name="db.verbatim.inlines" combine="choice">
    <ref name="db.co"/>
  </define>
  <define name="db.prompt.inlines" combine="choice">
    <ref name="db.co"/>
  </define>
  <define name="db.systemitem.inlines" combine="choice">
    <ref name="db.co"/>
  </define>
  <define name="db.userinput.inlines" combine="choice">
    <ref name="db.co"/>
  </define>
  <define name="db.replaceable.inlines" combine="choice">
    <ref name="db.co"/>
  </define>
  <define name="db.ubiq.inlines" combine="choice">
    <ref name="db.coref"/>
  </define>
  <define name="db.mediaobject.content" combine="choice">
    <ref name="db.imageobjectco"/>
  </define>
  <!-- ====================================================================== -->
  <ctrl:other-attribute name="area.units.attrib" enum-name="area.units-enum.attribute" other-name="area.units-other.attributes"/>
  <define name="db.area.units.enumeration">
    <choice>
      <value>calspair</value>
      <a:documentation>Coordinates expressed as a pair of CALS graphic coordinates.</a:documentation>
      <value>linecolumn</value>
      <a:documentation>Coordinates expressed as a line and column.</a:documentation>
      <value>linecolumnpair</value>
      <a:documentation>Coordinates expressed as a pair of lines and columns.</a:documentation>
      <value>linerange</value>
      <a:documentation>Coordinates expressed as a line range.</a:documentation>
    </choice>
  </define>
  <define name="db.area.units-enum.attribute">
    <optional>
      <attribute name="units">
        <db:refpurpose>Identifies the units used in the coords attribute. The default units vary according to the type of callout specified: <db:tag class="attvalue">calspair</db:tag>
 for graphics and <db:tag class="attvalue">linecolumn</db:tag>
 for line-oriented elements.</db:refpurpose>
        <ref name="db.area.units.enumeration"/>
      </attribute>
    </optional>
  </define>
  <define name="db.area.units-other.attributes">
    <optional>
      <attribute name="units">
        <db:refpurpose>Indicates that non-standard units are used for this <db:tag>area</db:tag>
. In this case <db:tag class="attribute">otherunits</db:tag>
 must be specified.</db:refpurpose>
        <value>other</value>
        <a:documentation>Coordinates expressed in some non-standard units.</a:documentation>
      </attribute>
    </optional>
    <attribute name="otherunits">
      <db:refpurpose>Identifies the units used in the <db:tag class="attribute">coords</db:tag>
 attribute when the <db:tag class="attribute">units</db:tag>
 attribute is <db:quote>other</db:quote>
. This attribute is forbidden otherwise.</db:refpurpose>
      <data type="NMTOKEN"/>
    </attribute>
  </define>
  <define name="db.area.units.attribute">
    <choice>
      <ref name="db.area.units-enum.attribute"/>
      <ref name="db.area.units-other.attributes"/>
    </choice>
  </define>
  <!-- ====================================================================== -->
  <div>
    <db:refname>calloutlist</db:refname>
    <db:refpurpose>A list of <db:tag>callout</db:tag>
s</db:refpurpose>
    <define name="db.calloutlist.role.attribute">
      <attribute name="role"/>
    </define>
    <define name="db.calloutlist.attlist">
      <interleave>
        <optional>
          <ref name="db.calloutlist.role.attribute"/>
        </optional>
        <ref name="db.common.attributes"/>
        <ref name="db.common.linking.attributes"/>
      </interleave>
    </define>
    <define name="db.calloutlist.info">
      <ref name="db._info.title.only"/>
    </define>
    <define name="db.calloutlist">
      <element name="calloutlist">
        <ref name="db.calloutlist.attlist"/>
        <ref name="db.calloutlist.info"/>
        <zeroOrMore>
          <ref name="db.all.blocks"/>
        </zeroOrMore>
        <oneOrMore>
          <ref name="db.callout"/>
        </oneOrMore>
      </element>
    </define>
  </div>
  <!-- ====================================================================== -->
  <div>
    <db:refname>callout</db:refname>
    <db:refpurpose>A <db:quote>called out</db:quote>
 description of a marked area</db:refpurpose>
    <define name="db.callout.role.attribute">
      <attribute name="role"/>
    </define>
    <define name="db.callout.arearefs.attribute">
      <attribute name="arearefs">
        <db:refpurpose>Identifies the areas described by this callout.</db:refpurpose>
        <data type="IDREFS"/>
      </attribute>
    </define>
    <define name="db.callout.attlist">
      <interleave>
        <optional>
          <ref name="db.callout.role.attribute"/>
        </optional>
        <ref name="db.common.attributes"/>
        <ref name="db.callout.arearefs.attribute"/>
      </interleave>
    </define>
    <define name="db.callout">
      <element name="callout">
        <ref name="db.callout.attlist"/>
        <oneOrMore>
          <ref name="db.all.blocks"/>
        </oneOrMore>
      </element>
    </define>
  </div>
  <!-- ====================================================================== -->
  <div>
    <db:refname>programlistingco</db:refname>
    <db:refpurpose>A program listing with associated areas used in callouts</db:refpurpose>
    <define name="db.programlistingco.role.attribute">
      <attribute name="role"/>
    </define>
    <define name="db.programlistingco.attlist">
      <interleave>
        <optional>
          <ref name="db.programlistingco.role.attribute"/>
        </optional>
        <ref name="db.common.attributes"/>
        <ref name="db.common.linking.attributes"/>
      </interleave>
    </define>
    <define name="db.programlistingco.info">
      <ref name="db._info.title.forbidden"/>
    </define>
    <define name="db.programlistingco">
      <element name="programlistingco">
        <ref name="db.programlistingco.attlist"/>
        <ref name="db.programlistingco.info"/>
        <ref name="db.areaspec"/>
        <ref name="db.programlisting"/>
        <zeroOrMore>
          <ref name="db.calloutlist"/>
        </zeroOrMore>
      </element>
    </define>
  </div>
  <!-- ====================================================================== -->
  <div>
    <db:refname>areaspec</db:refname>
    <db:refpurpose>A collection of regions in a graphic or code example</db:refpurpose>
    <define name="db.areaspec.role.attribute">
      <attribute name="role"/>
    </define>
    <define name="db.areaspec.attlist">
      <interleave>
        <optional>
          <ref name="db.areaspec.role.attribute"/>
        </optional>
        <ref name="db.common.attributes"/>
        <ref name="db.common.linking.attributes"/>
        <ref name="db.area.units.attribute"/>
      </interleave>
    </define>
    <define name="db.areaspec">
      <element name="areaspec">
        <ref name="db.areaspec.attlist"/>
        <oneOrMore>
          <choice>
            <ref name="db.area"/>
            <ref name="db.areaset"/>
          </choice>
        </oneOrMore>
      </element>
    </define>
  </div>
  <!-- ====================================================================== -->
  <div>
    <db:refname>area</db:refname>
    <db:refpurpose>A region defined for a callout in a graphic or code example</db:refpurpose>
    <define name="db.area.role.attribute">
      <attribute name="role"/>
    </define>
    <define name="db.area.linkends.attribute">
      <attribute name="linkends">
        <db:refpurpose>Point to the <db:tag>callout</db:tag>
s which refer to this area. (This provides bidirectional linking which may be useful in online presentation.)</db:refpurpose>
        <data type="IDREFS"/>
      </attribute>
    </define>
    <define name="db.area.label.attribute">
      <attribute name="label">
        <db:refpurpose>Specifies an identifying number or string that may be used in presentation. The area label might be drawn on top of the figure, for example, at the position indicated by the coords attribute.</db:refpurpose>
      </attribute>
    </define>
    <define name="db.area.coords.attribute">
      <attribute name="coords">
        <db:refpurpose>Provides the coordinates of the area. The coordinates must be interpreted using the <db:tag class="attribute">units</db:tag>
 specified.</db:refpurpose>
      </attribute>
    </define>
    <define name="db.area.attlist">
      <interleave>
        <optional>
          <ref name="db.area.role.attribute"/>
        </optional>
        <ref name="db.common.idreq.attributes"/>
        <ref name="db.area.units.attribute"/>
        <optional>
          <choice>
            <ref name="db.area.linkends.attribute"/>
            <ref name="db.href.attributes"/>
          </choice>
        </optional>
        <optional>
          <ref name="db.area.label.attribute"/>
        </optional>
        <ref name="db.area.coords.attribute"/>
      </interleave>
    </define>
    <define name="db.area">
      <element name="area">
        <ref name="db.area.attlist"/>
        <optional>
          <ref name="db.alt"/>
        </optional>
      </element>
    </define>
  </div>
  <!-- ====================================================================== -->
  <div>
    <db:refname>area</db:refname>
    <db:refpurpose>A region defined for a callout in a graphic or code example</db:refpurpose>
    <!-- The only difference is that xml:id is optional -->
    <define name="db.area.inareaset.attlist">
      <interleave>
        <optional>
          <ref name="db.area.role.attribute"/>
        </optional>
        <ref name="db.common.attributes"/>
        <ref name="db.area.units.attribute"/>
        <optional>
          <choice>
            <ref name="db.area.linkends.attribute"/>
            <ref name="db.href.attributes"/>
          </choice>
        </optional>
        <optional>
          <ref name="db.area.label.attribute"/>
        </optional>
        <ref name="db.area.coords.attribute"/>
      </interleave>
    </define>
    <define name="db.area.inareaset">
      <element name="area">
        <ref name="db.area.inareaset.attlist"/>
        <optional>
          <ref name="db.alt"/>
        </optional>
      </element>
    </define>
  </div>
  <!-- ====================================================================== -->
  <div>
    <db:refname>areaset</db:refname>
    <db:refpurpose>A set of related areas in a graphic or code example</db:refpurpose>
    <define name="db.areaset.role.attribute">
      <attribute name="role"/>
    </define>
    <define name="db.areaset.linkends.attribute">
      <ref name="db.linkends.attribute"/>
    </define>
    <define name="db.areaset.label.attribute">
      <ref name="db.label.attribute"/>
    </define>
    <define name="db.areaset.attlist">
      <interleave>
        <optional>
          <ref name="db.areaset.role.attribute"/>
        </optional>
        <ref name="db.common.idreq.attributes"/>
        <ref name="db.area.units.attribute"/>
        <optional>
          <choice>
            <ref name="db.areaset.linkends.attribute"/>
            <ref name="db.href.attributes"/>
          </choice>
        </optional>
        <optional>
          <ref name="db.areaset.label.attribute"/>
        </optional>
      </interleave>
    </define>
    <define name="db.areaset">
      <element name="areaset">
        <ref name="db.areaset.attlist"/>
        <oneOrMore>
          <ref name="db.area.inareaset"/>
        </oneOrMore>
      </element>
    </define>
  </div>
  <!-- ====================================================================== -->
  <div>
    <db:refname>screenco</db:refname>
    <db:refpurpose>A screen with associated areas used in callouts</db:refpurpose>
    <define name="db.screenco.role.attribute">
      <attribute name="role"/>
    </define>
    <define name="db.screenco.attlist">
      <interleave>
        <optional>
          <ref name="db.screenco.role.attribute"/>
        </optional>
        <ref name="db.common.attributes"/>
        <ref name="db.common.linking.attributes"/>
      </interleave>
    </define>
    <define name="db.screenco.info">
      <ref name="db._info.title.forbidden"/>
    </define>
    <define name="db.screenco">
      <element name="screenco">
        <ref name="db.screenco.attlist"/>
        <ref name="db.screenco.info"/>
        <ref name="db.areaspec"/>
        <ref name="db.screen"/>
        <zeroOrMore>
          <ref name="db.calloutlist"/>
        </zeroOrMore>
      </element>
    </define>
  </div>
  <!-- ====================================================================== -->
  <div>
    <db:refname>imageobjectco</db:refname>
    <db:refpurpose>A wrapper for an image object with callouts</db:refpurpose>
    <define name="db.imageobjectco.role.attribute">
      <attribute name="role"/>
    </define>
    <define name="db.imageobjectco.attlist">
      <interleave>
        <optional>
          <ref name="db.imageobjectco.role.attribute"/>
        </optional>
        <ref name="db.common.attributes"/>
        <ref name="db.common.linking.attributes"/>
      </interleave>
    </define>
    <define name="db.imageobjectco.info">
      <ref name="db._info.title.forbidden"/>
    </define>
    <define name="db.imageobjectco">
      <element name="imageobjectco">
        <ref name="db.imageobjectco.attlist"/>
        <ref name="db.imageobjectco.info"/>
        <ref name="db.areaspec"/>
        <oneOrMore>
          <ref name="db.imageobject"/>
        </oneOrMore>
        <zeroOrMore>
          <ref name="db.calloutlist"/>
        </zeroOrMore>
      </element>
    </define>
  </div>
  <!-- ====================================================================== -->
  <div>
    <db:refname>co</db:refname>
    <db:refpurpose>The location of a callout embedded in text</db:refpurpose>
    <define name="db.co.role.attribute">
      <attribute name="role"/>
    </define>
    <define name="db.co.linkends.attribute">
      <ref name="db.linkends.attribute"/>
    </define>
    <define name="db.co.label.attribute">
      <ref name="db.label.attribute"/>
    </define>
    <define name="db.co.attlist">
      <interleave>
        <optional>
          <ref name="db.co.role.attribute"/>
        </optional>
        <ref name="db.common.idreq.attributes"/>
        <optional>
          <ref name="db.co.linkends.attribute"/>
        </optional>
        <optional>
          <ref name="db.co.label.attribute"/>
        </optional>
      </interleave>
    </define>
    <define name="db.co">
      <element name="co">
        <ref name="db.co.attlist"/>
        <empty/>
      </element>
    </define>
  </div>
  <!-- ====================================================================== -->
  <div>
    <db:refname>coref</db:refname>
    <db:refpurpose>A cross reference to a co</db:refpurpose>
    <define name="db.coref.role.attribute">
      <attribute name="role"/>
    </define>
    <define name="db.coref.label.attribute">
      <ref name="db.label.attribute"/>
    </define>
    <define name="db.coref.attlist">
      <interleave>
        <optional>
          <ref name="db.coref.role.attribute"/>
        </optional>
        <ref name="db.common.attributes"/>
        <ref name="db.linkend.attribute"/>
        <optional>
          <ref name="db.coref.label.attribute"/>
        </optional>
      </interleave>
    </define>
    <define name="db.coref">
      <element name="coref">
        <ref name="db.coref.attlist"/>
        <empty/>
      </element>
    </define>
  </div>
</grammar>