2
|
1 |
README:
|
|
2 |
|
|
3 |
This directory contains a program to read a DTD, and produce a compressed
|
|
4 |
representation of it. It's intended that this program be run at build
|
|
5 |
time, and the resultant .bdtd binary DTD file be read at program startup.
|
|
6 |
|
|
7 |
|
|
8 |
.dtdb FILE FORMAT
|
|
9 |
|
|
10 |
file ::= version_no:int num_names:short name[]:string num_entities entity[]
|
|
11 |
num_elements element[]
|
|
12 |
|
|
13 |
entity ::= name_id:short type:byte data:string
|
|
14 |
|
|
15 |
element ::= name_id:short type:byte
|
|
16 |
flags:byte (&0x01 = omit start, &0x02 = omit end)
|
|
17 |
content_model
|
|
18 |
num_exclusions:byte name_id[]
|
|
19 |
num_inclusions:byte name_id[]
|
|
20 |
num_attributes:byte attribute[]
|
|
21 |
|
|
22 |
attribute ::= name_id:short type:byte modifier:byte
|
|
23 |
value:name_id (or -1 for null)
|
|
24 |
num_values:short name_id[]
|
|
25 |
|
|
26 |
content_model ::= content_c | content_e | content_null
|
|
27 |
|
|
28 |
content_null ::= flag:byte=0
|
|
29 |
|
|
30 |
content_c ::= flag:byte=1 type:int content:content_model next:content_model
|
|
31 |
|
|
32 |
content_e ::= flag:byte=2 type:int element_name_id next:content_model
|
|
33 |
|
|
34 |
string ::= modified UTF-8 encoding of a string
|
|
35 |
|
|
36 |
See the java.io.InputStream class description for the specification of modified
|
|
37 |
UTF-8.
|