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