3
XML Document Type Definition for GNUstep Documentation Markup
6
Written by Richard Frith-Macdonald
7
Based on GDML by 1997 Yoo C. Chung
9
This is free software; you can redistribute it and/or
10
modify it under the terms of the GNU General Public License
11
as published by the Free Software Foundation; either
12
version 2 of the License, or (at your option) any later
15
This document is distributed in the hope that it will be
16
useful, but WITHOUT ANY WARRANTY; without even the implied
17
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
18
PURPOSE. See the GNU General Public License for more details.
20
You should have received a copy of the GNU General
21
Public License along with this software; if not, write to the
22
Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA
29
gsdoc is an XML language - Typical usage:
31
<!DOCTYPE gsdoc PUBLIC "-//GNUstep//DTD gsdoc 1.0.1//EN"
32
"http://www.gnustep.org/gsdoc.xml">
33
<gsdoc base="myDocName">
38
<!--***** Character entities. *****-->
40
<!-- General purpose characters for gsdoc. -->
41
<!ENTITY copy "©"> <!-- copyright symbol -->
42
<!ENTITY tm "®"> <!-- trademark symbol -->
43
<!ENTITY reg "®">
44
<!ENTITY dots "…"> <!-- ellipsis (...) -->
45
<!ENTITY nbsp " "> <!-- non breakable space -->
46
<!ENTITY amp "&#38;"> <!-- ampersand -->
47
<!ENTITY apos "'"> <!-- apos -->
48
<!ENTITY quot """> <!-- quotation mark (") -->
49
<!ENTITY lt "&#60;"> <!-- lesser than symbol -->
50
<!ENTITY gt ">"> <!-- greater than symbol -->
52
<!--***** Entity declarations. *****-->
54
<!-- Boolean values for attributes -->
55
<!ENTITY % boolean "(yes|no)">
57
<!-- Entity for phrase elements. -->
58
<!ENTITY % phrase "var | ivar | em | code | strong | file | site">
60
<!-- Entity for cross references. -->
61
<!ENTITY % xref "ref | uref | url | email | prjref">
63
<!-- Entity for anchors. -->
64
<!ENTITY % anchor "label | entry">
66
<!-- Entity for simple text level elements. -->
67
<!ENTITY % text "#PCDATA | %xref; | %anchor; | %phrase; | footnote | br">
69
<!-- Entity for list elements. -->
70
<!ENTITY % list "list | enum | deflist | qalist | dictionary">
72
<!-- Entity for block level elements. -->
73
<!ENTITY % block "%text; | %list; | p | example | embed | index">
75
<!-- Entity for definition elements and blocks. -->
76
<!ENTITY % defblock "%text; | %list; | heading | p | example | embed | index | class | category | protocol | function | macro | type | variable | constant | EOModel | EOEntity">
81
<!-- Used for describing something. -->
82
<!ELEMENT desc (%block;)*>
85
<!ELEMENT footnote (%text;)*>
88
<!--***** Phrase elements. *****-->
90
<!-- The content is a metasyntactic variable or argument name. -->
91
<!ELEMENT var (%text;)*>
93
<!-- The content is a metasyntactic ivariable name. -->
94
<!ELEMENT ivar (%text;)*>
96
<!-- Emphasize the content. -->
97
<!ELEMENT em (%text;)*>
99
<!-- The content is too important that simple emphasizing isn't
101
<!ELEMENT strong (%text;)*>
103
<!-- The content is either a name for code (e.g. class names), or a
104
relatively short code fragment. -->
105
<!ELEMENT code (%text;)*>
107
<!-- The content is a file name. -->
108
<!ELEMENT file (#PCDATA)*>
110
<!-- The content is a fully qualified domain name on the Internet. -->
111
<!ELEMENT site (#PCDATA)*>
113
<!--***** List elements. *****-->
115
<!-- An item in a list. -->
116
<!ELEMENT item (%block;)*>
118
<!-- An enumerated list. -->
119
<!ELEMENT enum (item+)>
121
<!-- A ordinary, unnumbered list. -->
122
<!ELEMENT list (item+)>
124
<!-- A term to defined in a definition list. -->
125
<!ELEMENT term (%text;)*>
127
<!-- A definition list. -->
128
<!ELEMENT deflist (term, desc)+>
130
<!-- A question for a question and answer list. -->
131
<!ELEMENT question (%text;)*>
133
<!-- An answer for a question and answer list. -->
134
<!ELEMENT answer (%block;)*>
136
<!-- A question and answer list. -->
137
<!ELEMENT qalist (question, answer)+>
142
<!--***** Cross references. *****-->
146
TYPE of reference, if implied, a reference to a label.
147
CLASS specific class for a method, may be one of the following formats -
148
classname, classname(categoryname), (protocolname)
150
<!ELEMENT ref (%text;)*>
153
type (class|category|protocol|method|ivariable|function|type|macro|variable|constant|label|EOModel|EOEntity|tool) "label"
157
<!-- An e-mail address. -->
158
<!ELEMENT email (%text;)*>
160
address CDATA #IMPLIED
169
<!-- A reference to a URL.
170
The text contained appears in the output.
172
<!ELEMENT uref (%text;)*>
177
<!-- A reference to a project.
178
The text contained appears in the output.
180
<!ELEMENT prjref (%text;)*>
182
prjname CDATA #IMPLIED
186
<!--***** Anchors. *****-->
188
<!-- An anchor for a general reference.
189
The text contained appears in the output.
190
If the id attribute is omitted, the text is used in its place.
192
<!ELEMENT label (%text;)*>
197
<!-- An entry for the general index.
198
The text that is contained appears in the index, and never in
200
If the id attribute is omitted, the text is used in its place.
202
<!ELEMENT entry (%text;)*>
207
<!-- Entity for standard elements. -->
208
<!ELEMENT GNUstep EMPTY>
209
<!ELEMENT OpenStep EMPTY>
210
<!ELEMENT NotOpenStep EMPTY>
211
<!ELEMENT MacOS-X EMPTY>
212
<!ELEMENT NotMacOS-X EMPTY>
214
<!-- A standard that something is or isn't compliant with. -->
215
<!ENTITY % standard "GNUstep | OpenStep | NotOpenStep | MacOS-X | NotMacOS-X">
217
<!ELEMENT standards (%standard;)*>
219
<!--***** Argument elements. *****-->
221
<!-- An argument. -->
222
<!ELEMENT arg (#PCDATA)*>
227
<!-- Denotes that the rest of the arguments is a variable list,
230
<!ELEMENT vararg EMPTY>
233
<!--***** Method elements. *****-->
235
<!-- A component for a method selector. -->
236
<!ELEMENT sel (#PCDATA)*>
238
<!-- A method. If there is no DESC, it is understood that the element
239
is used to override some information from the same method in the
241
If factory not set, instance method
243
<!ELEMENT method (((sel, arg?), (sel, arg)*, vararg?), desc?, standards?)>
246
factory %boolean; "no"
248
override (subclass|never) #IMPLIED
251
<!--***** Elements for definitions of classes, functions, etc. *****-->
253
<!-- Show what header file something lives in. -->
254
<!ELEMENT declared (#PCDATA)*>
256
<!-- A macro definition. -->
257
<!ELEMENT macro ((arg*, vararg?), declared?, desc?, standards?)>
262
<!-- A type definition. -->
263
<!ELEMENT type (declared?, desc?, standards?)>
269
<!-- Variable definition.
270
VALUE may be set for a constant or a default value
272
<!ELEMENT variable (declared?, desc?, standards?)>
279
<!-- Ivariable definition.
281
<!ELEMENT ivariable (desc?, standards?)>
285
validity (public|protected|private) "public"
288
<!-- Constant definition.
289
VALUE may be set for a constant or a default value
291
<!ELEMENT constant (declared?, desc?, standards?)>
296
role (except|defaults|notify|key) #IMPLIED
299
<!-- A function definition. -->
300
<!ELEMENT function ((arg*, vararg?), declared?, desc?, standards?)>
306
<!-- Protocol definition. -->
307
<!ELEMENT protocol (declared?, conform*, desc?, method*, standards?)>
312
<!-- Category definition. -->
313
<!ELEMENT category (declared?, conform*, desc?, method*, standards?)>
316
class CDATA #REQUIRED
319
<!-- Show a protocol a class conforms to. -->
320
<!ELEMENT conform (#PCDATA)*>
322
<!ELEMENT class (declared?, conform*, desc?, ivariable*, method*, standards?)>
328
<!--***** Elements for definitions of EOModels, etc. *****-->
330
<!-- a dictionary Item. -->
331
<!ELEMENT dictionaryItem (%block;)*>
332
<!ATTLIST dictionaryItem
337
<!-- a dictionary -->
338
<!ELEMENT dictionary (dictionaryItem+)>
340
<!ELEMENT EOConnectionDictionary (dictionaryItem+)>
342
<!ELEMENT EOUserDictionary (dictionaryItem+)>
344
<!--***** Elements for definitions of EOModels, etc. *****-->
346
<!-- EORelationshipComponent -->
347
<!ELEMENT EORelationshipComponent (EORelationshipComponent*)>
348
<!ATTLIST EORelationshipComponent
349
definition CDATA #REQUIRED
353
<!ELEMENT EOJoin (desc?)>
355
relationshipName CDATA #IMPLIED
356
joinOperator CDATA #REQUIRED
357
joinSemantic CDATA #REQUIRED
358
sourceAttribute CDATA #REQUIRED
359
destinationAttribute CDATA #REQUIRED
362
<!-- EORelationship -->
363
<!ELEMENT EORelationship ((EORelationshipComponent | (EOJoin*)), EOUserDictionary?, desc?)>
364
<!ATTLIST EORelationship
365
entityName CDATA #REQUIRED
366
destinationEntityName CDATA #REQUIRED
368
isToMany CDATA #IMPLIED
371
<!-- EOAttributeRef -->
372
<!ELEMENT EOAttributeRef EMPTY>
373
<!ATTLIST EOAttributeRef
377
<!-- EOPrimaryKeyAttributes -->
378
<!ELEMENT EOPrimaryKeyAttributes (EOAttributeRef+)>
380
<!-- EOClassProperties -->
381
<!ELEMENT EOClassProperties ((EOAttributeRef)+)>
383
<!-- EOAttributesUsedForLocking -->
384
<!ELEMENT EOAttributesUsedForLocking (EOAttributeRef+)>
387
<!ELEMENT EOAttribute (EOUserDictionary?, desc?)>
388
<!ATTLIST EOAttribute
389
columnName CDATA #IMPLIED
390
definition CDATA #IMPLIED
391
externalType CDATA #IMPLIED
393
valueClassName CDATA #IMPLIED
394
valueType CDATA #IMPLIED
395
entityName CDATA #IMPLIED
396
isReadOnly CDATA #IMPLIED
397
isDerived CDATA #IMPLIED
398
isFlattened CDATA #IMPLIED
402
<!ELEMENT EOEntity (EOAttribute*, EOAttributesUsedForLocking?, EOClassProperties?, EOPrimaryKeyAttributes?, EORelationship*, EOUserDictionary?, desc?)>
405
externalName CDATA #IMPLIED
406
className CDATA #IMPLIED
407
modelName CDATA #IMPLIED
408
isReadOnly CDATA #IMPLIED
412
<!ELEMENT EOModel (EOConnectionDictionary?, (EOEntity+ | list), EOUserDictionary?, desc?)>
415
version CDATA #IMPLIED
416
adaptorName CDATA #REQUIRED
417
adaptorClassName CDATA #REQUIRED
420
<!--***** Elements for ordinary block level elements. *****-->
422
<!-- A line break. -->
425
<!-- A paragraph. -->
426
<!ELEMENT p (%text;)*>
429
<!ELEMENT example (#PCDATA)*>
431
caption CDATA #IMPLIED
434
<!-- An embedded object. If it is of a type that the SGML processor
435
cannot handle, then use the content, which is ignored otherwise.
436
refer - method of referring to object (default is file)
437
src - the reference to the object
438
type - Internet media type of the objec
439
title - optional title describing object
441
<!ELEMENT embed (%block;)*>
443
refer (file|url) #IMPLIED
449
<!--***** Elements for document structure such as chapters. *****-->
451
<!-- A heading for chapters, sections, ... -->
452
<!ELEMENT heading (%text;)*>
454
<!-- A subsubsection. -->
455
<!ELEMENT subsubsect (%defblock;)*>
460
<!-- A subsection. -->
461
<!ELEMENT subsect (%defblock; | subsubsect)*>
467
<!ELEMENT section (%defblock; | subsect)*>
473
<!ELEMENT chapter (%defblock; | section)*>
479
<!--***** Elements that make searching for things easier. *****-->
481
<!-- Table of contents. -->
482
<!ELEMENT contents EMPTY>
484
<!-- Index ... generates an index of the specified type of elements.
485
'scope' determines whether the index is generated for the current file
486
or for the whole of the current project, or for everything the software
487
can find (global) ... if the document is processed in a standalone manner,
488
the scope if always file. For method or ivariable indexing, if the index
489
is inside a class, protocol, or category, only indexes for that unit
491
'type' determines the type of entry listed in the index. The 'title'
492
type really only makes sense for a project scope index as it produces
493
a list of the files in the project (by title).
495
<!ELEMENT index EMPTY>
497
type (class | category | protocol | method | ivariable | function | type | macro | variable | constant | EOModel | EOEntity | label | title | tool) "label"
498
scope (file | project | global) "file"
499
style ( normal | bare ) "normal"
500
target CDATA #IMPLIED
504
<!--***** Elements that describe the document itself. *****-->
506
<!-- Copyright of the document. -->
507
<!ELEMENT copy (%text;)*>
509
<!-- An abstract. -->
510
<!ELEMENT abstract (%text;)*>
512
<!-- The version of the document. -->
513
<!ELEMENT version (%text;)*>
515
<!-- The date the document was written. -->
516
<!ELEMENT date (%text;)*>
519
<!ELEMENT author (email?, url?, desc?)>
524
<!-- The title of the document. -->
525
<!ELEMENT title (%text;)*>
528
<!--***** The topmost structures for the document body. *****-->
530
<!-- Unnumbered parts appearing in the front, such as a preface. -->
531
<!ELEMENT front (contents?, chapter*)>
533
<!-- Unnumbered parts appearing in the back, such as an afterword and/or
536
<!ELEMENT back (chapter*, index*)>
539
<!--***** The topmost structures for the document. *****-->
541
<!-- The head containing general information about the document. -->
542
<!ELEMENT head (title, author*, version?, date?, abstract?, copy?)>
544
<!-- The main part of the document. -->
545
<!ELEMENT body (front?, chapter+, back?)>
550
<!-- The entire document. -->
551
<!ELEMENT gsdoc (head, body)>
557
stylesheeturl CDATA #IMPLIED