File: adabrowse_1_1.dtd

package info (click to toggle)
adabrowse 4.0.2-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 2,316 kB
  • ctags: 253
  • sloc: ada: 29,761; makefile: 150; ansic: 4
file content (252 lines) | stat: -rw-r--r-- 8,211 bytes parent folder | download | duplicates (3)
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
<!--
This file is part of AdaBrowse.

Copyright (c) 2002-2003 by Thomas Wolf.

AdaBrowse is free software; you can redistribute it and/or modify it
under the terms of the  GNU General Public License as published by the
Free Software  Foundation; either version 2, or (at your option) any
later version. AdaBrowse is distributed in the hope that it will be
useful, but *without any warranty*; without even the implied warranty
of *merchantability or fitness for a particular purpose.* See the GNU
General Public License for  more details. You should have received a
copy of the GNU General Public License with this distribution, see file
"GPL.txt". If not, write to the 

  Free Software Foundation
  59 Temple Place - Suite 330
  Boston, MA 02111-1307
  USA.

Author:
   Thomas Wolf  (TW)  twolf@acm.org

Purpose:
   XML 1.0 Document Type Definition for AdaBrowse XML files.

Version:
   AdaBrowse DTD 1.1 (generated by AdaBrowse V3.4).
   
Revision History

   20-AUG-2002   TW  Initial version.
   28-AUG-2002   TW  Corrections in cross-references.
   30-MAY-2003   TW  Added private attributes to UNIT and CHILD elements.
-->
   
<!ENTITY % pure   "#PCDATA|KEYWORD|ATTRIBUTE|XREF|LITERAL" >
<!ENTITY % inline "%pure;|ANCHOR|COMMENT|CODE" >

<!ENTITY % lib_no_container 
   "A_PROCEDURE |
    A_FUNCTION |
    A_GENERIC_PROCEDURE |
    A_GENERIC_FUNCTION |
    A_PACKAGE_INSTANTIATION|
    A_PROCEDURE_INSTANTIATION |
    A_FUNCTION_INSTANTIATION |
    A_PACKAGE_RENAMING |
    A_PROCEDURE_RENAMING |
    A_FUNCTION_RENAMING |
    A_GENERIC_PACKAGE_RENAMING |
    A_GENERIC_PROCEDURE_RENAMING |
    A_GENERIC_FUNCTION_RENAMING" >

<!ENTITY % lib_container
   "A_PACKAGE | 
    A_GENERIC_PACKAGE |
    A_GENERIC_SIGNATURE_PACKAGE" >

<!ENTITY % no_lib_no_container
   "A_PRAGMA |
    A_USE_CLAUSE |
    A_USE_TYPE_CLAUSE |
    A_TYPE | 
    A_SUBTYPE |
    A_VARIABLE |
    A_CONSTANT |
    A_DEFERRED_CONSTANT |
    AN_OBJECT_RENAMING |
    AN_EXCEPTION_RENAMING |
    AN_ENTRY |
    A_PROTECTED_PROCEDURE | 
    A_PROTECTED_FUNCTION | 
    AN_EXCEPTION" >

<!ENTITY % no_lib_container
   "A_TASK_TYPE |
    A_PROTECTED_TYPE |
    A_TASK |
    A_PROTECTED_OBJECT" >

<!ENTITY % boolean
   "FALSE | TRUE" >
   
<!ENTITY % lib "%lib_no_container; | %lib_container;" >

<!ENTITY % container "%lib_container; | %no_lib_container;" >

<!ENTITY % no_container "%lib_no_container; | %no_lib_no_container; | A_TASK_TYPE | A_TASK" >
<!-- Tasks and task types can also appear as items. -->

<!-- Inline elements -->

<!ELEMENT KEYWORD (#PCDATA) >

<!ELEMENT ATTRIBUTE (#PCDATA) >

<!ELEMENT LITERAL (#PCDATA) >

<!ELEMENT CODE (%inline;)* >

<!ELEMENT XREF (#PCDATA|LITERAL|KEYWORD)* >
<!-- Actually, I'd like to specify that an XREF may contain either
     PCDATA, or a LITERAL, or a KEYWORD. It cannot contain PCDATA with
     interspersed LITERALs and KEYWORDs (which is what the above spec
     really says). However, there is *no* way in XML 1.0 to specify this! 
     
     Literals and keywords are allowed within an XREF because of operators
     such as "&" or "or". -->
     
<!ATTLIST XREF 
          UNIT     CDATA       #REQUIRED
          POS      CDATA       #REQUIRED
          IS_TOP   (%boolean;) "FALSE"
          IS_LOCAL (%boolean;) "FALSE">
<!-- XREFs always contain the Unit, even if the cross-reference is local.
     Local cross-references have IS_LOCAL="TRUE". Cross-references to
     other compilation UNITs have IS_TOP="TRUE". -->
     
<!ELEMENT ANCHOR (%pure;)* >
<!ATTLIST ANCHOR 
          UNIT   CDATA       #REQUIRED
          POS    CDATA       #REQUIRED
          IS_TOP (%boolean;) "FALSE">
<!-- ANCHORs always are local, so Unit always will equal the Name of the
     enclosing compilation UNIT. It is still explicitly repeated in each
     anchor to facilitate processing: there's no need to go look up the
     enclosing UNIT's name. Is_Top is TRUE only for the anchor on that
     compilation unit's name. -->

<!-- Note: I briefly considered using attribute types ID and IDREF for
     ANCHORS and XREFs, respectively. However, that wouldn't have worked,
     for any IDREF must correspond to some ID in the XML; but our XML may
     contain references to units in other files. -->
     
<!ELEMENT COMMENT (%pure;|ANCHOR|CODE)* >
<!-- Comments cannot be nested -->

<!-- Block elements -->

<!ELEMENT UNIT (DEPENDENCIES?, DESCRIPTION?, (CONTAINER|ITEM)) >
<!ATTLIST UNIT
          NAME  CDATA         #REQUIRED
          KIND  (%lib;)       #REQUIRED
          PRIVATE (%boolean;) "FALSE"
          POS   CDATA         #IMPLIED>
<!-- Name and Kind of a UNIT can be used to generate indices. Pos can be
     used for cross-reference purposes; it is the position on the unit's
     CONTAINER's or ITEM's defining name. PRIVATE is "TRUE" if it's a
     private compilation unit. -->

<!ELEMENT ITEM (SNIPPET, DESCRIPTION?) >
<!ATTLIST ITEM
          NAME  CDATA            #IMPLIED
          KIND  (%no_container;) #IMPLIED
          UNIT  CDATA            #IMPLIED
          POS   CDATA            #IMPLIED>
<!-- Name and Kind of an Item can be used to generate indices.  Unit and
     Pos can be used for cross-reference purposes; it is the position on
     the item's defining name. -->
     
<!ELEMENT SNIPPET (LINE)+ >
<!-- Used for code snippets. Implies <CODE> -->

<!ELEMENT LINE    (%inline;)* >

<!ELEMENT DESCRIPTION (BLOCK)+ >
<!ELEMENT BLOCK       (LINE)+ >
     
<!ELEMENT DEPENDENCIES (SNIPPET, DESCRIPTION?) >

<!ELEMENT CONTAINER    (HEADER, CONTENT?, FOOTER) >
<!ATTLIST CONTAINER
          NAME  CDATA         #IMPLIED
          KIND  (%container;) #IMPLIED
          UNIT  CDATA         #IMPLIED
          POS   CDATA         #IMPLIED>
<!-- Name and Kind of a CONTAINER can be used to generate indices. Unit and
     Pos can be used for cross-reference purposes; it is the position on the
     container's defining name. -->

<!ELEMENT HEADER  (LINE)* >

<!ELEMENT FOOTER  (LINE)* >

<!ELEMENT CONTENT  (TOP_ITEM?, CHILDREN?, EXCEPTIONS?, TYPE_SUMMARY?, 
                    CONSTANTS?, VARIABLES?, OTHERS?, PRIVATE?) >
                    
<!ELEMENT TOP_ITEM (SNIPPET?, DESCRIPTION?) >

<!ELEMENT CHILDREN (CHILD)+ >

<!ELEMENT CHILD (#PCDATA|XREF)* >
<!-- Actually, I'd like to specify that a CHILD may contain either
     PCDATA, or an XREF. It cannot contain PCDATA with interspersed
     XREFs (which is what the above spec really says). However, there
     is *no* way in XML 1.0 to specify this! -->

<!ATTLIST CHILD
          NAME    CDATA       #IMPLIED
          KIND    (%lib;)     #IMPLIED
          PRIVATE (%boolean;) "FALSE">

<!ELEMENT PRIVATE EMPTY >

<!ELEMENT EXCEPTIONS (EXCEPTION)+ >

<!ELEMENT EXCEPTION ((EXCEPTION_NAME)+, EXCEPTION_RENAME?, ULTIMATE_EXCEPTION?, DESCRIPTION?) >

<!ELEMENT EXCEPTION_NAME (#PCDATA|ANCHOR)* >
<!-- Actually, I'd like to specify that an EXCEPTION_NAME may contain either
     PCDATA, or an ANCHOR. It cannot contain PCDATA with interspersed ANCHORs
     (which is what the above spec really says). However, there is *no* way
     in XML 1.0 to specify this! -->

<!ELEMENT EXCEPTION_RENAME (%inline;)*>
          
<!ELEMENT ULTIMATE_EXCEPTION (%inline;)*>
          
<!ELEMENT OTHERS (CONTAINER|ITEM|PRIVATE)+ >

<!ELEMENT CONSTANTS (ITEM)+ >

<!ELEMENT VARIABLES (ITEM)+ >

<!ELEMENT TYPE_SUMMARY (TYPE)+ >

<!ELEMENT TYPE (TYPE_NAME, TYPE_KIND?, PARENT_TYPE?, OPERATIONS?) >

<!ELEMENT TYPE_NAME (#PCDATA|XREF)* >
<!-- Actually, I'd like to specify that a TYPE_NAME may contain either
     PCDATA, or an XREF. It cannot contain PCDATA with  interspersed
     XREFs (which is what the above spec really says). However, there
     is *no* way in XML 1.0 to specify this! -->

<!ELEMENT TYPE_KIND (#PCDATA)>

<!ELEMENT PARENT_TYPE (#PCDATA|XREF)* >
<!-- Actually, I'd like to specify that a PARENT_TYPE may contain either
     PCDATA, or an XREF. It cannot contain PCDATA with interspersed XREFs
     (which is what the above spec really says). However, there is *no*
     way in XML 1.0 to specify this! -->
          
<!ELEMENT OPERATIONS (OPLIST)+ >

<!ELEMENT OPLIST (XREF)+ >
<!ATTLIST OPLIST
          KIND (OVERRIDDEN|OWN|INHERITED) #REQUIRED>

<!-- Document root -->

<!ELEMENT ADABROWSE (UNIT)+ >