~ubuntu-branches/ubuntu/karmic/gnustep-base/karmic

« back to all changes in this revision

Viewing changes to Tools/gsdoc-1_0_1.rnc

  • Committer: Bazaar Package Importer
  • Author(s): Eric Heintzmann
  • Date: 2005-04-17 00:14:38 UTC
  • mfrom: (1.2.1 upstream) (2.1.2 hoary)
  • Revision ID: james.westby@ubuntu.com-20050417001438-enf0y07c9tku85z1
Tags: 1.10.3-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
2
# XML Document Type Definition for GNUstep Documentation Markup
 
3
# Language (gsdoc).
 
4
 
5
# Written by Richard Frith-Macdonald
 
6
# Based on GDML by 1997 Yoo C. Chung
 
7
 
 
8
# This is free software; you can redistribute it and/or
 
9
# modify it under the terms of the GNU General Public License
 
10
# as published by the Free Software Foundation; either
 
11
# version 2 of the License, or (at your option) any later
 
12
# version.
 
13
 
14
# This document is distributed in the hope that it will be
 
15
# useful, but WITHOUT ANY WARRANTY; without even the implied
 
16
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
 
17
# PURPOSE.  See the GNU General Public License for more details.
 
18
 
19
# You should have received a copy of the GNU General
 
20
# Public License along with this software; if not, write to the
 
21
# Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA
 
22
# 02139, USA.
 
23
 
 
24
#############################################################################
 
25
# Note, the normative form of this document is the DTD.
 
26
# This Relax-NG version generated by Adrian Robert using the trang tool.
 
27
# It can be used for realtime validation and autocompletion with the
 
28
# emacs nxml-mode by James Clark. Get it from
 
29
# http://www.thaiopensource.com/download/ .
 
30
#
 
31
# Set it up with '(load "nxml-mode-20040910/rng-auto.el")' in your .emacs.
 
32
# While you're at it, put insert this as well:
 
33
# (setq auto-mode-alist (cons '("\\.gsdoc$" . nxml-mode) auto-mode-alist))
 
34
#
 
35
# Fire up a new emacs and hit 'alt-x customize-apropos rng', then add a file
 
36
# "/pathToHome/[username]/.schemas.xml" to 'Rng Schema Locating Files'.
 
37
# Then make a file in your home directory called ".schemas.xml" and put in
 
38
# it the following lines:
 
39
#
 
40
#  <?xml version="1.0" encoding="utf-8"?>
 
41
#  <locatingRules xmlns="http://thaiopensource.com/ns/locating-rules/1.0">
 
42
#     <uri pathSuffix=".gsdoc"
 
43
#          uri="$GNUSTEP_SYSTEM_ROOT/Library/DTDs/gsdoc-1_0_1.rnc"/>
 
44
#  </locatingRules>
 
45
#
 
46
# (Replace GNUSTEP_SYSTEM_ROOT by the correct real path on your system.)
 
47
#
 
48
# Voila, whenever you edit a .gsdoc file its validity will be continuously
 
49
# checked, errors will be highlighted, and you can complete tags and
 
50
# attributes using 'ctrl-enter'.  'Ctrl-c ctrl-f' autocloses tags.
 
51
#############################################################################
 
52
 
 
53
 
 
54
# gsdoc is an XML language - Typical usage:
 
55
# <?xml version="1.0"?>
 
56
# <!DOCTYPE gsdoc PUBLIC "-//GNUstep//DTD gsdoc 1.0.1//EN"
 
57
#       "http://www.gnustep.org/gsdoc.xml">
 
58
# <gsdoc base="myDocName">
 
59
# </gsdoc>
 
60
 
 
61
# ***** Character entities. *****
 
62
 
 
63
# General purpose characters for gsdoc.
 
64
 
 
65
# copyright symbol
 
66
 
 
67
# trademark symbol
 
68
 
 
69
# ellipsis (...)
 
70
 
 
71
# non breakable space
 
72
 
 
73
# ampersand
 
74
 
 
75
# apos
 
76
 
 
77
# quotation mark (")
 
78
 
 
79
# lesser than symbol
 
80
 
 
81
# greater than symbol
 
82
 
 
83
namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0"
 
84
 
 
85
# ***** Entity declarations. *****
 
86
 
 
87
# Boolean values for attributes
 
88
boolean = "yes" | "no"
 
89
 
 
90
# Entity for phrase elements.
 
91
phrase =
 
92
    element.var
 
93
  | element.ivar
 
94
  | element.em
 
95
  | element.code
 
96
  | element.strong
 
97
  | element.file
 
98
  | element.site
 
99
 
 
100
# Entity for cross references.
 
101
xref =
 
102
    element.ref
 
103
  | element.uref
 
104
  | element.url
 
105
  | element.email
 
106
  | element.prjref
 
107
 
 
108
# Entity for anchors.
 
109
anchor = element.label | element.entry
 
110
 
 
111
# Entity for simple text level elements.
 
112
\text = text | xref | anchor | phrase | element.footnote | element.br
 
113
 
 
114
# Entity for list elements.
 
115
\list =
 
116
    element.list
 
117
  | element.enum
 
118
  | element.deflist
 
119
  | element.qalist
 
120
  | element.dictionary
 
121
 
 
122
# Entity for block level elements.
 
123
block =
 
124
    \text
 
125
  | \list
 
126
  | element.p
 
127
  | element.example
 
128
  | element.embed
 
129
  | element.index
 
130
 
 
131
# Entity for definition elements and blocks.
 
132
defblock =
 
133
    \text
 
134
  | \list
 
135
  | element.heading
 
136
  | element.p
 
137
  | element.example
 
138
  | element.embed
 
139
  | element.index
 
140
  | element.class
 
141
  | element.category
 
142
  | element.protocol
 
143
  | element.function
 
144
  | element.macro
 
145
  | element.type
 
146
  | element.variable
 
147
  | element.constant
 
148
  | element.EOModel
 
149
  | element.EOEntity
 
150
 
 
151
# ********** End entity declarations
 
152
 
 
153
 
 
154
# Used for describing something.
 
155
element.desc = element desc { attlist.desc, block* }
 
156
attlist.desc &= empty
 
157
 
 
158
# A footnote.
 
159
element.footnote = element footnote { attlist.footnote, \text* }
 
160
attlist.footnote &= empty
 
161
 
 
162
 
 
163
# ***** Phrase elements. *****
 
164
 
 
165
# The content is a metasyntactic variable or argument name.
 
166
element.var = element var { attlist.var, \text* }
 
167
attlist.var &= empty
 
168
 
 
169
# The content is a metasyntactic ivariable name.
 
170
element.ivar = element ivar { attlist.ivar, \text* }
 
171
attlist.ivar &= empty
 
172
 
 
173
# Emphasize the content.
 
174
element.em = element em { attlist.em, \text* }
 
175
attlist.em &= empty
 
176
 
 
177
# The content is too important that simple emphasizing isn't enough.
 
178
element.strong = element strong { attlist.strong, \text* }
 
179
attlist.strong &= empty
 
180
 
 
181
# The content is either a name for code (e.g. class names), or a
 
182
# relatively short code fragment.
 
183
element.code = element code { attlist.code, \text* }
 
184
attlist.code &= empty
 
185
 
 
186
# The content is a file name.
 
187
element.file = element file { attlist.file, text* }
 
188
attlist.file &= empty
 
189
 
 
190
# The content is a fully qualified domain name on the Internet.
 
191
element.site = element site { attlist.site, text* }
 
192
attlist.site &= empty
 
193
 
 
194
 
 
195
# ***** List elements. *****
 
196
 
 
197
# An item in a list.
 
198
element.item = element item { attlist.item, block* }
 
199
attlist.item &= empty
 
200
 
 
201
# An enumerated list.
 
202
element.enum = element enum { attlist.enum, element.item+ }
 
203
attlist.enum &= empty
 
204
 
 
205
# A ordinary, unnumbered list.
 
206
element.list = element list { attlist.list, element.item+ }
 
207
attlist.list &= empty
 
208
 
 
209
# A term to defined in a definition list.
 
210
element.term = element term { attlist.term, \text* }
 
211
attlist.term &= empty
 
212
 
 
213
# A definition list.
 
214
element.deflist =
 
215
  element deflist { attlist.deflist, (element.term, element.desc)+ }
 
216
attlist.deflist &= empty
 
217
 
 
218
# A question for a question and answer list.
 
219
element.question = element question { attlist.question, \text* }
 
220
attlist.question &= empty
 
221
 
 
222
# An answer for a question and answer list.
 
223
element.answer = element answer { attlist.answer, block* }
 
224
attlist.answer &= empty
 
225
 
 
226
# A question and answer list.
 
227
element.qalist =
 
228
  element qalist { attlist.qalist, (element.question, element.answer)+ }
 
229
attlist.qalist &= empty
 
230
 
 
231
# **********
 
232
 
 
233
 
 
234
# ***** Cross references. *****
 
235
 
 
236
# A reference.
 
237
# ID of the reference.
 
238
# TYPE of reference, if implied, a reference to a label.
 
239
# CLASS specific class for a method, may be one of the following formats -
 
240
#   classname, classname(categoryname), (protocolname)
 
241
element.ref = element ref { attlist.ref, \text* }
 
242
attlist.ref &=
 
243
  attribute id { text },
 
244
  [ a:defaultValue = "label" ]
 
245
  attribute type {
 
246
      "class"
 
247
    | "category"
 
248
    | "protocol"
 
249
    | "method"
 
250
    | "ivariable"
 
251
    | "function"
 
252
    | "type"
 
253
    | "macro"
 
254
    | "variable"
 
255
    | "constant"
 
256
    | "label"
 
257
    | "EOModel"
 
258
    | "EOEntity"
 
259
    | "tool"
 
260
  }?,
 
261
  attribute class { text }?
 
262
 
 
263
# An e-mail address.
 
264
element.email = element email { attlist.email, \text* }
 
265
attlist.email &= attribute address { text }?
 
266
 
 
267
# A URL.
 
268
element.url = element url { attlist.url, empty }
 
269
attlist.url &= attribute url { text }?
 
270
 
 
271
# A reference to a URL.
 
272
# The text contained appears in the output.
 
273
element.uref = element uref { attlist.uref, \text* }
 
274
attlist.uref &= attribute url { text }
 
275
 
 
276
# A reference to a project.
 
277
# The text contained appears in the output.
 
278
element.prjref = element prjref { attlist.prjref, \text* }
 
279
attlist.prjref &=
 
280
  attribute prjname { text }?,
 
281
  attribute file { text }?
 
282
 
 
283
 
 
284
# ***** Anchors. *****
 
285
 
 
286
# An anchor for a general reference.
 
287
# The text contained appears in the output.
 
288
# If the id attribute is omitted, the text is used in its place.
 
289
element.label = element label { attlist.label, \text* }
 
290
attlist.label &= attribute id { text }?
 
291
 
 
292
# An entry for the general index. 
 
293
#  The text that is contained appears in the index, and never in
 
294
#  the text itself.
 
295
# If the id attribute is omitted, the text is used in its place.
 
296
element.entry = element entry { attlist.entry, \text* }
 
297
attlist.entry &= attribute id { text }?
 
298
 
 
299
# Entity for standard elements.
 
300
element.GNUstep = element GNUstep { attlist.GNUstep, empty }
 
301
attlist.GNUstep &= empty
 
302
element.OpenStep = element OpenStep { attlist.OpenStep, empty }
 
303
attlist.OpenStep &= empty
 
304
element.NotOpenStep = element NotOpenStep { attlist.NotOpenStep, empty }
 
305
attlist.NotOpenStep &= empty
 
306
element.MacOS-X = element MacOS-X { attlist.MacOS-X, empty }
 
307
attlist.MacOS-X &= empty
 
308
element.NotMacOS-X = element NotMacOS-X { attlist.NotMacOS-X, empty }
 
309
attlist.NotMacOS-X &= empty
 
310
 
 
311
# A standard that something is or isn't  compliant with.
 
312
standard =
 
313
  element.GNUstep
 
314
  | element.OpenStep
 
315
  | element.NotOpenStep
 
316
  | element.MacOS-X
 
317
  | element.NotMacOS-X
 
318
element.standards = element standards { attlist.standards, standard* }
 
319
attlist.standards &= empty
 
320
 
 
321
 
 
322
# ***** Argument elements. *****
 
323
 
 
324
# An argument.
 
325
element.arg = element arg { attlist.arg, text* }
 
326
attlist.arg &= attribute type { text }?
 
327
 
 
328
# Denotes that the rest of the arguments is a variable list,
 
329
# like in printf().
 
330
element.vararg = element vararg { attlist.vararg, empty }
 
331
attlist.vararg &= empty
 
332
 
 
333
 
 
334
# ***** Method elements. *****
 
335
 
 
336
# A component for a method selector.
 
337
element.sel = element sel { attlist.sel, text* }
 
338
attlist.sel &= empty
 
339
 
 
340
# A method.  If there is no DESC, it is understood that the element
 
341
#    is used to override some information from the same method in the
 
342
#    superclass.
 
343
# If factory not set, instance method
 
344
element.method =
 
345
  element method {
 
346
    attlist.method,
 
347
    ((element.sel, element.arg?),
 
348
     (element.sel, element.arg)*,
 
349
     element.vararg?),
 
350
    element.desc?,
 
351
    element.standards?
 
352
  }
 
353
attlist.method &=
 
354
  attribute type { text }?,
 
355
  [ a:defaultValue = "no" ] attribute factory { boolean }?,
 
356
  [ a:defaultValue = "no" ] attribute init { boolean }?,
 
357
  attribute override { "subclass" | "never" }?
 
358
 
 
359
 
 
360
# ***** Elements for definitions of classes, functions, etc. *****
 
361
 
 
362
# Show what header file something lives in.
 
363
element.declared = element declared { attlist.declared, text* }
 
364
attlist.declared &= empty
 
365
 
 
366
# A macro definition.
 
367
element.macro =
 
368
  element macro {
 
369
    attlist.macro,
 
370
    (element.arg*, element.vararg?),
 
371
    element.declared?,
 
372
    element.desc?,
 
373
    element.standards?
 
374
  }
 
375
attlist.macro &= attribute name { text }
 
376
 
 
377
# A type definition.
 
378
element.type =
 
379
  element type {
 
380
    attlist.type, element.declared?, element.desc?, element.standards?
 
381
  }
 
382
attlist.type &=
 
383
  attribute name { text },
 
384
  attribute type { text }
 
385
 
 
386
# Variable definition.
 
387
# VALUE may be set for a constant or a default value
 
388
element.variable =
 
389
  element variable {
 
390
    attlist.variable,
 
391
    element.declared?,
 
392
    element.desc?,
 
393
    element.standards?
 
394
  }
 
395
attlist.variable &=
 
396
  attribute name { text },
 
397
  attribute type { text },
 
398
  attribute value { text }?
 
399
 
 
400
# Ivariable definition.
 
401
element.ivariable =
 
402
  element ivariable {
 
403
    attlist.ivariable, element.desc?, element.standards?
 
404
  }
 
405
attlist.ivariable &=
 
406
  attribute name { text },
 
407
  attribute type { text },
 
408
  [ a:defaultValue = "public" ]
 
409
  attribute validity { "public" | "protected" | "private" }?
 
410
 
 
411
# Constant definition.
 
412
# VALUE may be set for a constant or a default value
 
413
element.constant =
 
414
  element constant {
 
415
    attlist.constant,
 
416
    element.declared?,
 
417
    element.desc?,
 
418
    element.standards?
 
419
  }
 
420
attlist.constant &=
 
421
  attribute name { text },
 
422
  attribute type { text },
 
423
  attribute value { text }?,
 
424
  attribute role { "except" | "defaults" | "notify" | "key" }?
 
425
 
 
426
# A function definition.
 
427
element.function =
 
428
  element function {
 
429
    attlist.function,
 
430
    (element.arg*, element.vararg?),
 
431
    element.declared?,
 
432
    element.desc?,
 
433
    element.standards?
 
434
  }
 
435
attlist.function &=
 
436
  attribute name { text },
 
437
  attribute type { text }
 
438
 
 
439
# Protocol definition.
 
440
element.protocol =
 
441
  element protocol {
 
442
    attlist.protocol,
 
443
    element.declared?,
 
444
    element.conform*,
 
445
    element.desc?,
 
446
    element.method*,
 
447
    element.standards?
 
448
  }
 
449
attlist.protocol &= attribute name { text }
 
450
 
 
451
# Category definition.
 
452
element.category =
 
453
  element category {
 
454
    attlist.category,
 
455
    element.declared?,
 
456
    element.conform*,
 
457
    element.desc?,
 
458
    element.method*,
 
459
    element.standards?
 
460
  }
 
461
attlist.category &=
 
462
  attribute name { text },
 
463
  attribute class { text }
 
464
 
 
465
# Show a protocol a class conforms to.
 
466
element.conform = element conform { attlist.conform, text* }
 
467
attlist.conform &= empty
 
468
element.class =
 
469
  element class {
 
470
    attlist.class,
 
471
    element.declared?,
 
472
    element.conform*,
 
473
    element.desc?,
 
474
    element.ivariable*,
 
475
    element.method*,
 
476
    element.standards?
 
477
  }
 
478
attlist.class &=
 
479
  attribute name { text },
 
480
  attribute super { text }?
 
481
 
 
482
 
 
483
# ***** Elements for definitions of EOModels, etc. *****
 
484
 
 
485
# a dictionary Item.
 
486
element.dictionaryItem =
 
487
  element dictionaryItem { attlist.dictionaryItem, block* }
 
488
attlist.dictionaryItem &=
 
489
  attribute key { text },
 
490
  attribute value { text }?
 
491
 
 
492
# a dictionary
 
493
element.dictionary =
 
494
  element dictionary { attlist.dictionary, element.dictionaryItem+ }
 
495
attlist.dictionary &= empty
 
496
element.EOConnectionDictionary =
 
497
  element EOConnectionDictionary {
 
498
    attlist.EOConnectionDictionary, element.dictionaryItem+
 
499
  }
 
500
attlist.EOConnectionDictionary &= empty
 
501
element.EOUserDictionary =
 
502
  element EOUserDictionary {
 
503
    attlist.EOUserDictionary, element.dictionaryItem+
 
504
  }
 
505
attlist.EOUserDictionary &= empty
 
506
 
 
507
# EORelationshipComponent
 
508
element.EORelationshipComponent =
 
509
  element EORelationshipComponent {
 
510
    attlist.EORelationshipComponent, element.EORelationshipComponent*
 
511
  }
 
512
attlist.EORelationshipComponent &= attribute definition { text }
 
513
 
 
514
# EOJoin
 
515
element.EOJoin = element EOJoin { attlist.EOJoin, element.desc? }
 
516
attlist.EOJoin &=
 
517
  attribute relationshipName { text }?,
 
518
  attribute joinOperator { text },
 
519
  attribute joinSemantic { text },
 
520
  attribute sourceAttribute { text },
 
521
  attribute destinationAttribute { text }
 
522
 
 
523
# EORelationship
 
524
element.EORelationship =
 
525
  element EORelationship {
 
526
    attlist.EORelationship,
 
527
    (element.EORelationshipComponent | element.EOJoin*),
 
528
    element.EOUserDictionary?,
 
529
    element.desc?
 
530
  }
 
531
attlist.EORelationship &=
 
532
  attribute entityName { text },
 
533
  attribute destinationEntityName { text },
 
534
  attribute name { text },
 
535
  attribute isToMany { text }?
 
536
 
 
537
# EOAttributeRef
 
538
element.EOAttributeRef =
 
539
  element EOAttributeRef { attlist.EOAttributeRef, empty }
 
540
attlist.EOAttributeRef &= attribute name { text }
 
541
 
 
542
# EOPrimaryKeyAttributes
 
543
element.EOPrimaryKeyAttributes =
 
544
  element EOPrimaryKeyAttributes {
 
545
    attlist.EOPrimaryKeyAttributes, element.EOAttributeRef+
 
546
  }
 
547
attlist.EOPrimaryKeyAttributes &= empty
 
548
 
 
549
# EOClassProperties
 
550
element.EOClassProperties =
 
551
  element EOClassProperties {
 
552
    attlist.EOClassProperties, element.EOAttributeRef+
 
553
  }
 
554
attlist.EOClassProperties &= empty
 
555
 
 
556
# EOAttributesUsedForLocking
 
557
element.EOAttributesUsedForLocking =
 
558
  element EOAttributesUsedForLocking {
 
559
    attlist.EOAttributesUsedForLocking, element.EOAttributeRef+
 
560
  }
 
561
attlist.EOAttributesUsedForLocking &= empty
 
562
 
 
563
# EOAttribute
 
564
element.EOAttribute =
 
565
  element EOAttribute {
 
566
    attlist.EOAttribute, element.EOUserDictionary?, element.desc?
 
567
  }
 
568
attlist.EOAttribute &=
 
569
  attribute columnName { text }?,
 
570
  attribute definition { text }?,
 
571
  attribute externalType { text }?,
 
572
  attribute name { text },
 
573
  attribute valueClassName { text }?,
 
574
  attribute valueType { text }?,
 
575
  attribute entityName { text }?,
 
576
  attribute isReadOnly { text }?,
 
577
  attribute isDerived { text }?,
 
578
  attribute isFlattened { text }?
 
579
 
 
580
# EOEntity
 
581
element.EOEntity =
 
582
  element EOEntity {
 
583
    attlist.EOEntity,
 
584
    element.EOAttribute*,
 
585
    element.EOAttributesUsedForLocking?,
 
586
    element.EOClassProperties?,
 
587
    element.EOPrimaryKeyAttributes?,
 
588
    element.EORelationship*,
 
589
    element.EOUserDictionary?,
 
590
    element.desc?
 
591
  }
 
592
attlist.EOEntity &=
 
593
  attribute name { text },
 
594
  attribute externalName { text }?,
 
595
  attribute className { text }?,
 
596
  attribute modelName { text }?,
 
597
  attribute isReadOnly { text }?
 
598
 
 
599
# EOModel
 
600
element.EOModel =
 
601
  element EOModel {
 
602
    attlist.EOModel,
 
603
    element.EOConnectionDictionary?,
 
604
    (element.EOEntity+ | element.list),
 
605
    element.EOUserDictionary?,
 
606
    element.desc?
 
607
  }
 
608
attlist.EOModel &=
 
609
  attribute name { text },
 
610
  attribute version { text }?,
 
611
  attribute adaptorName { text },
 
612
  attribute adaptorClassName { text }
 
613
 
 
614
 
 
615
# ***** Elements for ordinary block level elements. *****
 
616
 
 
617
# A line break.
 
618
element.br = element br { attlist.br, empty }
 
619
attlist.br &= empty
 
620
 
 
621
# A paragraph.
 
622
element.p = element p { attlist.p, \text* }
 
623
attlist.p &= empty
 
624
 
 
625
# An example.
 
626
element.example = element example { attlist.example, text* }
 
627
attlist.example &= attribute caption { text }?
 
628
 
 
629
# An embedded object.  If it is of a type that the SGML processor
 
630
# cannot handle, then use the content, which is ignored otherwise.
 
631
# refer - method of referring to object (default is file)
 
632
# src - the reference to the object
 
633
# type - Internet media type of the objec
 
634
# title - optional title describing object
 
635
element.embed = element embed { attlist.embed, block* }
 
636
attlist.embed &=
 
637
  attribute refer { "file" | "url" }?,
 
638
  attribute src { text },
 
639
  attribute type { text }?,
 
640
  attribute title { text }?
 
641
 
 
642
 
 
643
# ***** Elements for document structure such as chapters. *****
 
644
 
 
645
# A heading for chapters, sections, ...
 
646
element.heading = element heading { attlist.heading, \text* }
 
647
attlist.heading &= empty
 
648
 
 
649
# A subsubsection.
 
650
element.subsubsect =
 
651
  element subsubsect { attlist.subsubsect, defblock* }
 
652
attlist.subsubsect &= attribute id { text }?
 
653
 
 
654
# A subsection.
 
655
element.subsect =
 
656
  element subsect { attlist.subsect, (defblock | element.subsubsect)* }
 
657
attlist.subsect &= attribute id { text }?
 
658
 
 
659
# A section.
 
660
element.section =
 
661
  element section { attlist.section, (defblock | element.subsect)* }
 
662
attlist.section &= attribute id { text }?
 
663
 
 
664
# A chapter.
 
665
element.chapter =
 
666
  element chapter { attlist.chapter, (defblock | element.section)* }
 
667
attlist.chapter &= attribute id { text }?
 
668
 
 
669
 
 
670
# ***** Elements that make searching for things easier. *****
 
671
 
 
672
# Table of contents.
 
673
element.contents = element contents { attlist.contents, empty }
 
674
attlist.contents &= empty
 
675
 
 
676
# Index  ... generates an index of the specified type of elements.
 
677
# 'scope' determines whether the index is generated for the current file
 
678
# or for the whole of the current project, or for everything the software
 
679
# can find (global) ... if the document is processed in a standalone manner,
 
680
# the scope if always file.  For method or ivariable indexing, if the index
 
681
# is inside a class, protocol, or category, only  indexes for that unit
 
682
# should be generated.
 
683
# 'type' determines the type of entry listed in the index.  The 'title'
 
684
# type really only makes sense for a project scope index as it produces
 
685
# a list of the files in the project (by title).
 
686
element.index = element index { attlist.index, empty }
 
687
attlist.index &=
 
688
  [ a:defaultValue = "label" ]
 
689
  attribute type {
 
690
      "class"
 
691
    | "category"
 
692
    | "protocol"
 
693
    | "method"
 
694
    | "ivariable"
 
695
    | "function"
 
696
    | "type"
 
697
    | "macro"
 
698
    | "variable"
 
699
    | "constant"
 
700
    | "EOModel"
 
701
    | "EOEntity"
 
702
    | "label"
 
703
    | "title"
 
704
    | "tool"
 
705
  }?,
 
706
  [ a:defaultValue = "file" ]
 
707
  attribute scope { "file" | "project" | "global" }?,
 
708
  [ a:defaultValue = "normal" ] attribute style { "normal" | "bare" }?,
 
709
  attribute target { text }?
 
710
 
 
711
 
 
712
# ***** Elements that describe the document itself. *****
 
713
 
 
714
# Copyright of the document.
 
715
element.copy = element copy { attlist.copy, \text* }
 
716
attlist.copy &= empty
 
717
 
 
718
# An abstract.
 
719
element.abstract = element abstract { attlist.abstract, \text* }
 
720
attlist.abstract &= empty
 
721
 
 
722
# The version of the document.
 
723
element.version = element version { attlist.version, \text* }
 
724
attlist.version &= empty
 
725
 
 
726
# The date the document was written.
 
727
element.date = element date { attlist.date, \text* }
 
728
attlist.date &= empty
 
729
 
 
730
# An author.
 
731
element.author =
 
732
  element author {
 
733
    attlist.author, element.email?, element.url?, element.desc?
 
734
  }
 
735
attlist.author &= attribute name { text }
 
736
 
 
737
# The title of the document.
 
738
element.title = element title { attlist.title, \text* }
 
739
attlist.title &= empty
 
740
 
 
741
 
 
742
# ***** The topmost structures for the document body. *****
 
743
 
 
744
# Unnumbered parts appearing in the front, such as a preface.
 
745
element.front =
 
746
  element front { attlist.front, element.contents?, element.chapter* }
 
747
attlist.front &= empty
 
748
 
 
749
# Unnumbered parts appearing in the back, such as an afterword and/or
 
750
# indices.
 
751
element.back =
 
752
  element back { attlist.back, element.chapter*, element.index* }
 
753
attlist.back &= empty
 
754
 
 
755
 
 
756
# ***** The topmost structures for the document. *****
 
757
 
 
758
# The head containing general information about the document.
 
759
element.head =
 
760
  element head {
 
761
    attlist.head,
 
762
    element.title,
 
763
    element.author*,
 
764
    element.version?,
 
765
    element.date?,
 
766
    element.abstract?,
 
767
    element.copy?
 
768
  }
 
769
attlist.head &= empty
 
770
 
 
771
# The main part of the document.
 
772
element.body =
 
773
  element body {
 
774
    attlist.body, element.front?, element.chapter+, element.back?
 
775
  }
 
776
attlist.body &= empty
 
777
# **********
 
778
 
 
779
 
 
780
# The entire document.
 
781
element.gsdoc =
 
782
  element gsdoc { attlist.gsdoc, element.head, element.body }
 
783
attlist.gsdoc &=
 
784
  attribute base { text }?,
 
785
  attribute next { text }?,
 
786
  attribute prev { text }?,
 
787
  attribute up { text }?,
 
788
  attribute stylesheeturl { text }?
 
789
start = element.gsdoc