2
# XML Document Type Definition for GNUstep Documentation Markup
5
# Written by Richard Frith-Macdonald
6
# Based on GDML by 1997 Yoo C. Chung
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
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.
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
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/ .
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))
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:
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"/>
46
# (Replace GNUSTEP_SYSTEM_ROOT by the correct real path on your system.)
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
#############################################################################
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">
61
# ***** Character entities. *****
63
# General purpose characters for gsdoc.
83
namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0"
85
# ***** Entity declarations. *****
87
# Boolean values for attributes
88
boolean = "yes" | "no"
90
# Entity for phrase elements.
100
# Entity for cross references.
108
# Entity for anchors.
109
anchor = element.label | element.entry
111
# Entity for simple text level elements.
112
\text = text | xref | anchor | phrase | element.footnote | element.br
114
# Entity for list elements.
122
# Entity for block level elements.
131
# Entity for definition elements and blocks.
151
# ********** End entity declarations
154
# Used for describing something.
155
element.desc = element desc { attlist.desc, block* }
156
attlist.desc &= empty
159
element.footnote = element footnote { attlist.footnote, \text* }
160
attlist.footnote &= empty
163
# ***** Phrase elements. *****
165
# The content is a metasyntactic variable or argument name.
166
element.var = element var { attlist.var, \text* }
169
# The content is a metasyntactic ivariable name.
170
element.ivar = element ivar { attlist.ivar, \text* }
171
attlist.ivar &= empty
173
# Emphasize the content.
174
element.em = element em { attlist.em, \text* }
177
# The content is too important that simple emphasizing isn't enough.
178
element.strong = element strong { attlist.strong, \text* }
179
attlist.strong &= empty
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
186
# The content is a file name.
187
element.file = element file { attlist.file, text* }
188
attlist.file &= empty
190
# The content is a fully qualified domain name on the Internet.
191
element.site = element site { attlist.site, text* }
192
attlist.site &= empty
195
# ***** List elements. *****
198
element.item = element item { attlist.item, block* }
199
attlist.item &= empty
201
# An enumerated list.
202
element.enum = element enum { attlist.enum, element.item+ }
203
attlist.enum &= empty
205
# A ordinary, unnumbered list.
206
element.list = element list { attlist.list, element.item+ }
207
attlist.list &= empty
209
# A term to defined in a definition list.
210
element.term = element term { attlist.term, \text* }
211
attlist.term &= empty
215
element deflist { attlist.deflist, (element.term, element.desc)+ }
216
attlist.deflist &= empty
218
# A question for a question and answer list.
219
element.question = element question { attlist.question, \text* }
220
attlist.question &= empty
222
# An answer for a question and answer list.
223
element.answer = element answer { attlist.answer, block* }
224
attlist.answer &= empty
226
# A question and answer list.
228
element qalist { attlist.qalist, (element.question, element.answer)+ }
229
attlist.qalist &= empty
234
# ***** Cross references. *****
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* }
243
attribute id { text },
244
[ a:defaultValue = "label" ]
261
attribute class { text }?
264
element.email = element email { attlist.email, \text* }
265
attlist.email &= attribute address { text }?
268
element.url = element url { attlist.url, empty }
269
attlist.url &= attribute url { text }?
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 }
276
# A reference to a project.
277
# The text contained appears in the output.
278
element.prjref = element prjref { attlist.prjref, \text* }
280
attribute prjname { text }?,
281
attribute file { text }?
284
# ***** Anchors. *****
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 }?
292
# An entry for the general index.
293
# The text that is contained appears in the index, and never in
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 }?
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
311
# A standard that something is or isn't compliant with.
315
| element.NotOpenStep
318
element.standards = element standards { attlist.standards, standard* }
319
attlist.standards &= empty
322
# ***** Argument elements. *****
325
element.arg = element arg { attlist.arg, text* }
326
attlist.arg &= attribute type { text }?
328
# Denotes that the rest of the arguments is a variable list,
330
element.vararg = element vararg { attlist.vararg, empty }
331
attlist.vararg &= empty
334
# ***** Method elements. *****
336
# A component for a method selector.
337
element.sel = element sel { attlist.sel, text* }
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
343
# If factory not set, instance method
347
((element.sel, element.arg?),
348
(element.sel, element.arg)*,
354
attribute type { text }?,
355
[ a:defaultValue = "no" ] attribute factory { boolean }?,
356
[ a:defaultValue = "no" ] attribute init { boolean }?,
357
attribute override { "subclass" | "never" }?
360
# ***** Elements for definitions of classes, functions, etc. *****
362
# Show what header file something lives in.
363
element.declared = element declared { attlist.declared, text* }
364
attlist.declared &= empty
366
# A macro definition.
370
(element.arg*, element.vararg?),
375
attlist.macro &= attribute name { text }
380
attlist.type, element.declared?, element.desc?, element.standards?
383
attribute name { text },
384
attribute type { text }
386
# Variable definition.
387
# VALUE may be set for a constant or a default value
396
attribute name { text },
397
attribute type { text },
398
attribute value { text }?
400
# Ivariable definition.
403
attlist.ivariable, element.desc?, element.standards?
406
attribute name { text },
407
attribute type { text },
408
[ a:defaultValue = "public" ]
409
attribute validity { "public" | "protected" | "private" }?
411
# Constant definition.
412
# VALUE may be set for a constant or a default value
421
attribute name { text },
422
attribute type { text },
423
attribute value { text }?,
424
attribute role { "except" | "defaults" | "notify" | "key" }?
426
# A function definition.
430
(element.arg*, element.vararg?),
436
attribute name { text },
437
attribute type { text }
439
# Protocol definition.
449
attlist.protocol &= attribute name { text }
451
# Category definition.
462
attribute name { text },
463
attribute class { text }
465
# Show a protocol a class conforms to.
466
element.conform = element conform { attlist.conform, text* }
467
attlist.conform &= empty
479
attribute name { text },
480
attribute super { text }?
483
# ***** Elements for definitions of EOModels, etc. *****
486
element.dictionaryItem =
487
element dictionaryItem { attlist.dictionaryItem, block* }
488
attlist.dictionaryItem &=
489
attribute key { text },
490
attribute value { text }?
494
element dictionary { attlist.dictionary, element.dictionaryItem+ }
495
attlist.dictionary &= empty
496
element.EOConnectionDictionary =
497
element EOConnectionDictionary {
498
attlist.EOConnectionDictionary, element.dictionaryItem+
500
attlist.EOConnectionDictionary &= empty
501
element.EOUserDictionary =
502
element EOUserDictionary {
503
attlist.EOUserDictionary, element.dictionaryItem+
505
attlist.EOUserDictionary &= empty
507
# EORelationshipComponent
508
element.EORelationshipComponent =
509
element EORelationshipComponent {
510
attlist.EORelationshipComponent, element.EORelationshipComponent*
512
attlist.EORelationshipComponent &= attribute definition { text }
515
element.EOJoin = element EOJoin { attlist.EOJoin, element.desc? }
517
attribute relationshipName { text }?,
518
attribute joinOperator { text },
519
attribute joinSemantic { text },
520
attribute sourceAttribute { text },
521
attribute destinationAttribute { text }
524
element.EORelationship =
525
element EORelationship {
526
attlist.EORelationship,
527
(element.EORelationshipComponent | element.EOJoin*),
528
element.EOUserDictionary?,
531
attlist.EORelationship &=
532
attribute entityName { text },
533
attribute destinationEntityName { text },
534
attribute name { text },
535
attribute isToMany { text }?
538
element.EOAttributeRef =
539
element EOAttributeRef { attlist.EOAttributeRef, empty }
540
attlist.EOAttributeRef &= attribute name { text }
542
# EOPrimaryKeyAttributes
543
element.EOPrimaryKeyAttributes =
544
element EOPrimaryKeyAttributes {
545
attlist.EOPrimaryKeyAttributes, element.EOAttributeRef+
547
attlist.EOPrimaryKeyAttributes &= empty
550
element.EOClassProperties =
551
element EOClassProperties {
552
attlist.EOClassProperties, element.EOAttributeRef+
554
attlist.EOClassProperties &= empty
556
# EOAttributesUsedForLocking
557
element.EOAttributesUsedForLocking =
558
element EOAttributesUsedForLocking {
559
attlist.EOAttributesUsedForLocking, element.EOAttributeRef+
561
attlist.EOAttributesUsedForLocking &= empty
564
element.EOAttribute =
565
element EOAttribute {
566
attlist.EOAttribute, element.EOUserDictionary?, element.desc?
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 }?
584
element.EOAttribute*,
585
element.EOAttributesUsedForLocking?,
586
element.EOClassProperties?,
587
element.EOPrimaryKeyAttributes?,
588
element.EORelationship*,
589
element.EOUserDictionary?,
593
attribute name { text },
594
attribute externalName { text }?,
595
attribute className { text }?,
596
attribute modelName { text }?,
597
attribute isReadOnly { text }?
603
element.EOConnectionDictionary?,
604
(element.EOEntity+ | element.list),
605
element.EOUserDictionary?,
609
attribute name { text },
610
attribute version { text }?,
611
attribute adaptorName { text },
612
attribute adaptorClassName { text }
615
# ***** Elements for ordinary block level elements. *****
618
element.br = element br { attlist.br, empty }
622
element.p = element p { attlist.p, \text* }
626
element.example = element example { attlist.example, text* }
627
attlist.example &= attribute caption { text }?
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* }
637
attribute refer { "file" | "url" }?,
638
attribute src { text },
639
attribute type { text }?,
640
attribute title { text }?
643
# ***** Elements for document structure such as chapters. *****
645
# A heading for chapters, sections, ...
646
element.heading = element heading { attlist.heading, \text* }
647
attlist.heading &= empty
651
element subsubsect { attlist.subsubsect, defblock* }
652
attlist.subsubsect &= attribute id { text }?
656
element subsect { attlist.subsect, (defblock | element.subsubsect)* }
657
attlist.subsect &= attribute id { text }?
661
element section { attlist.section, (defblock | element.subsect)* }
662
attlist.section &= attribute id { text }?
666
element chapter { attlist.chapter, (defblock | element.section)* }
667
attlist.chapter &= attribute id { text }?
670
# ***** Elements that make searching for things easier. *****
673
element.contents = element contents { attlist.contents, empty }
674
attlist.contents &= empty
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 }
688
[ a:defaultValue = "label" ]
706
[ a:defaultValue = "file" ]
707
attribute scope { "file" | "project" | "global" }?,
708
[ a:defaultValue = "normal" ] attribute style { "normal" | "bare" }?,
709
attribute target { text }?
712
# ***** Elements that describe the document itself. *****
714
# Copyright of the document.
715
element.copy = element copy { attlist.copy, \text* }
716
attlist.copy &= empty
719
element.abstract = element abstract { attlist.abstract, \text* }
720
attlist.abstract &= empty
722
# The version of the document.
723
element.version = element version { attlist.version, \text* }
724
attlist.version &= empty
726
# The date the document was written.
727
element.date = element date { attlist.date, \text* }
728
attlist.date &= empty
733
attlist.author, element.email?, element.url?, element.desc?
735
attlist.author &= attribute name { text }
737
# The title of the document.
738
element.title = element title { attlist.title, \text* }
739
attlist.title &= empty
742
# ***** The topmost structures for the document body. *****
744
# Unnumbered parts appearing in the front, such as a preface.
746
element front { attlist.front, element.contents?, element.chapter* }
747
attlist.front &= empty
749
# Unnumbered parts appearing in the back, such as an afterword and/or
752
element back { attlist.back, element.chapter*, element.index* }
753
attlist.back &= empty
756
# ***** The topmost structures for the document. *****
758
# The head containing general information about the document.
769
attlist.head &= empty
771
# The main part of the document.
774
attlist.body, element.front?, element.chapter+, element.back?
776
attlist.body &= empty
780
# The entire document.
782
element gsdoc { attlist.gsdoc, element.head, element.body }
784
attribute base { text }?,
785
attribute next { text }?,
786
attribute prev { text }?,
787
attribute up { text }?,
788
attribute stylesheeturl { text }?
789
start = element.gsdoc