2
This file is part of AdaBrowse.
4
Copyright (c) 2002-2003 by Thomas Wolf.
6
AdaBrowse is free software; you can redistribute it and/or modify it
7
under the terms of the GNU General Public License as published by the
8
Free Software Foundation; either version 2, or (at your option) any
9
later version. AdaBrowse is distributed in the hope that it will be
10
useful, but *without any warranty*; without even the implied warranty
11
of *merchantability or fitness for a particular purpose.* See the GNU
12
General Public License for more details. You should have received a
13
copy of the GNU General Public License with this distribution, see file
14
"GPL.txt". If not, write to the
16
Free Software Foundation
17
59 Temple Place - Suite 330
22
Thomas Wolf (TW) twolf@acm.org
25
XML 1.0 Document Type Definition for AdaBrowse XML files.
28
AdaBrowse DTD 1.1 (generated by AdaBrowse V3.4).
32
20-AUG-2002 TW Initial version.
33
28-AUG-2002 TW Corrections in cross-references.
34
30-MAY-2003 TW Added private attributes to UNIT and CHILD elements.
37
<!ENTITY % pure "#PCDATA|KEYWORD|ATTRIBUTE|XREF|LITERAL" >
38
<!ENTITY % inline "%pure;|ANCHOR|COMMENT|CODE" >
40
<!ENTITY % lib_no_container
45
A_PACKAGE_INSTANTIATION|
46
A_PROCEDURE_INSTANTIATION |
47
A_FUNCTION_INSTANTIATION |
49
A_PROCEDURE_RENAMING |
51
A_GENERIC_PACKAGE_RENAMING |
52
A_GENERIC_PROCEDURE_RENAMING |
53
A_GENERIC_FUNCTION_RENAMING" >
55
<!ENTITY % lib_container
58
A_GENERIC_SIGNATURE_PACKAGE" >
60
<!ENTITY % no_lib_no_container
70
AN_EXCEPTION_RENAMING |
72
A_PROTECTED_PROCEDURE |
73
A_PROTECTED_FUNCTION |
76
<!ENTITY % no_lib_container
85
<!ENTITY % lib "%lib_no_container; | %lib_container;" >
87
<!ENTITY % container "%lib_container; | %no_lib_container;" >
89
<!ENTITY % no_container "%lib_no_container; | %no_lib_no_container; | A_TASK_TYPE | A_TASK" >
90
<!-- Tasks and task types can also appear as items. -->
92
<!-- Inline elements -->
94
<!ELEMENT KEYWORD (#PCDATA) >
96
<!ELEMENT ATTRIBUTE (#PCDATA) >
98
<!ELEMENT LITERAL (#PCDATA) >
100
<!ELEMENT CODE (%inline;)* >
102
<!ELEMENT XREF (#PCDATA|LITERAL|KEYWORD)* >
103
<!-- Actually, I'd like to specify that an XREF may contain either
104
PCDATA, or a LITERAL, or a KEYWORD. It cannot contain PCDATA with
105
interspersed LITERALs and KEYWORDs (which is what the above spec
106
really says). However, there is *no* way in XML 1.0 to specify this!
108
Literals and keywords are allowed within an XREF because of operators
109
such as "&" or "or". -->
114
IS_TOP (%boolean;) "FALSE"
115
IS_LOCAL (%boolean;) "FALSE">
116
<!-- XREFs always contain the Unit, even if the cross-reference is local.
117
Local cross-references have IS_LOCAL="TRUE". Cross-references to
118
other compilation UNITs have IS_TOP="TRUE". -->
120
<!ELEMENT ANCHOR (%pure;)* >
124
IS_TOP (%boolean;) "FALSE">
125
<!-- ANCHORs always are local, so Unit always will equal the Name of the
126
enclosing compilation UNIT. It is still explicitly repeated in each
127
anchor to facilitate processing: there's no need to go look up the
128
enclosing UNIT's name. Is_Top is TRUE only for the anchor on that
129
compilation unit's name. -->
131
<!-- Note: I briefly considered using attribute types ID and IDREF for
132
ANCHORS and XREFs, respectively. However, that wouldn't have worked,
133
for any IDREF must correspond to some ID in the XML; but our XML may
134
contain references to units in other files. -->
136
<!ELEMENT COMMENT (%pure;|ANCHOR|CODE)* >
137
<!-- Comments cannot be nested -->
139
<!-- Block elements -->
141
<!ELEMENT UNIT (DEPENDENCIES?, DESCRIPTION?, (CONTAINER|ITEM)) >
144
KIND (%lib;) #REQUIRED
145
PRIVATE (%boolean;) "FALSE"
147
<!-- Name and Kind of a UNIT can be used to generate indices. Pos can be
148
used for cross-reference purposes; it is the position on the unit's
149
CONTAINER's or ITEM's defining name. PRIVATE is "TRUE" if it's a
150
private compilation unit. -->
152
<!ELEMENT ITEM (SNIPPET, DESCRIPTION?) >
155
KIND (%no_container;) #IMPLIED
158
<!-- Name and Kind of an Item can be used to generate indices. Unit and
159
Pos can be used for cross-reference purposes; it is the position on
160
the item's defining name. -->
162
<!ELEMENT SNIPPET (LINE)+ >
163
<!-- Used for code snippets. Implies <CODE> -->
165
<!ELEMENT LINE (%inline;)* >
167
<!ELEMENT DESCRIPTION (BLOCK)+ >
168
<!ELEMENT BLOCK (LINE)+ >
170
<!ELEMENT DEPENDENCIES (SNIPPET, DESCRIPTION?) >
172
<!ELEMENT CONTAINER (HEADER, CONTENT?, FOOTER) >
175
KIND (%container;) #IMPLIED
178
<!-- Name and Kind of a CONTAINER can be used to generate indices. Unit and
179
Pos can be used for cross-reference purposes; it is the position on the
180
container's defining name. -->
182
<!ELEMENT HEADER (LINE)* >
184
<!ELEMENT FOOTER (LINE)* >
186
<!ELEMENT CONTENT (TOP_ITEM?, CHILDREN?, EXCEPTIONS?, TYPE_SUMMARY?,
187
CONSTANTS?, VARIABLES?, OTHERS?, PRIVATE?) >
189
<!ELEMENT TOP_ITEM (SNIPPET?, DESCRIPTION?) >
191
<!ELEMENT CHILDREN (CHILD)+ >
193
<!ELEMENT CHILD (#PCDATA|XREF)* >
194
<!-- Actually, I'd like to specify that a CHILD may contain either
195
PCDATA, or an XREF. It cannot contain PCDATA with interspersed
196
XREFs (which is what the above spec really says). However, there
197
is *no* way in XML 1.0 to specify this! -->
201
KIND (%lib;) #IMPLIED
202
PRIVATE (%boolean;) "FALSE">
204
<!ELEMENT PRIVATE EMPTY >
206
<!ELEMENT EXCEPTIONS (EXCEPTION)+ >
208
<!ELEMENT EXCEPTION ((EXCEPTION_NAME)+, EXCEPTION_RENAME?, ULTIMATE_EXCEPTION?, DESCRIPTION?) >
210
<!ELEMENT EXCEPTION_NAME (#PCDATA|ANCHOR)* >
211
<!-- Actually, I'd like to specify that an EXCEPTION_NAME may contain either
212
PCDATA, or an ANCHOR. It cannot contain PCDATA with interspersed ANCHORs
213
(which is what the above spec really says). However, there is *no* way
214
in XML 1.0 to specify this! -->
216
<!ELEMENT EXCEPTION_RENAME (%inline;)*>
218
<!ELEMENT ULTIMATE_EXCEPTION (%inline;)*>
220
<!ELEMENT OTHERS (CONTAINER|ITEM|PRIVATE)+ >
222
<!ELEMENT CONSTANTS (ITEM)+ >
224
<!ELEMENT VARIABLES (ITEM)+ >
226
<!ELEMENT TYPE_SUMMARY (TYPE)+ >
228
<!ELEMENT TYPE (TYPE_NAME, TYPE_KIND?, PARENT_TYPE?, OPERATIONS?) >
230
<!ELEMENT TYPE_NAME (#PCDATA|XREF)* >
231
<!-- Actually, I'd like to specify that a TYPE_NAME may contain either
232
PCDATA, or an XREF. It cannot contain PCDATA with interspersed
233
XREFs (which is what the above spec really says). However, there
234
is *no* way in XML 1.0 to specify this! -->
236
<!ELEMENT TYPE_KIND (#PCDATA)>
238
<!ELEMENT PARENT_TYPE (#PCDATA|XREF)* >
239
<!-- Actually, I'd like to specify that a PARENT_TYPE may contain either
240
PCDATA, or an XREF. It cannot contain PCDATA with interspersed XREFs
241
(which is what the above spec really says). However, there is *no*
242
way in XML 1.0 to specify this! -->
244
<!ELEMENT OPERATIONS (OPLIST)+ >
246
<!ELEMENT OPLIST (XREF)+ >
248
KIND (OVERRIDDEN|OWN|INHERITED) #REQUIRED>
250
<!-- Document root -->
252
<!ELEMENT ADABROWSE (UNIT)+ >