11. DTD Definition

Below is the actual DTD file.

1: <?xml version="1.0" encoding="UTF-8"?> 2: 3: <!-- 4: Definitions for simple HTML-like formatting. 5: 6: $Id: text.dtd,v 1.11 2003/01/06 10:27:22 just Exp $ 7: --> 8: 9: 10: <!-- START DTD data types: 11: 12: entity description 13: ====== =============================================== 14: URI/URL e.g., "http://www.justobjects.nl/" 15: ATEXT printable ASCII text (no line-terminators) for attributes 16: CTEXT printable ASCII text (no line-terminators) for elements 17: TEXT character data for elements 18: --> 19: <!ENTITY % FILEPATH "CDATA"> 20: <!ENTITY % URI "CDATA"> 21: <!ENTITY % URL "CDATA"> 22: <!ENTITY % ATEXT "CDATA"> 23: <!ENTITY % CTEXT "#PCDATA"> 24: <!ENTITY % TEXT "#PCDATA"> 25: 26: <!-- Boolean --> 27: <!ENTITY % boolean "true|false"> 28: 29: <!-- END DTD data types --> 30: 31: <!-- START basic text entities --> 32: 33: <!ENTITY % text "#PCDATA|para|break|strong|bold|italic|center|code|as-is| 34: image|anchor|link|include|list|listing|sequence|dictionary|table1|split|xhtml"> 35: 36: <!-- Standard formatting stuff; --> 37: <!ELEMENT as-is (%text;)*> 38: <!ELEMENT break EMPTY> 39: <!ELEMENT center (%text;)*> 40: <!ELEMENT code (%text;)*> 41: <!ELEMENT bold (%text;)*> 42: <!ELEMENT italic (%text;)*> 43: <!ELEMENT para (%text;)*> 44: <!ELEMENT strong (%text;)*> 45: 46: 47: <!-- Like HTML image tag --> 48: <!ELEMENT image EMPTY> 49: <!ATTLIST image 50: href %URL; #REQUIRED 51: > 52: 53: <!-- Like HTML 'A name=' tag --> 54: <!ELEMENT anchor EMPTY> 55: <!ATTLIST anchor 56: id ID #REQUIRED 57: > 58: 59: <!-- Like HTML 'A' tag --> 60: <!ELEMENT link (%text;)*> 61: <!ATTLIST link 62: href %URL; #REQUIRED 63: target %ATEXT; '_self' 64: > 65: 66: 67: <!-- Allows inclusion of files; either entire file or range within file --> 68: <!ELEMENT include EMPTY> 69: <!ATTLIST include 70: href %FILEPATH; #REQUIRED 71: range NMTOKEN #IMPLIED 72: > 73: 74: <!-- Like HTML list types --> 75: <!ELEMENT list (item)+> 76: <!ELEMENT item (%text;)*> 77: 78: <!-- Code listing types --> 79: <!ELEMENT listing (%text;)*> 80: 81: <!-- Like HTML numbered list types --> 82: <!ELEMENT sequence (step)+> 83: <!ELEMENT step (%text;)*> 84: 85: <!-- Definition list (HTML does not have a usable feature for this) --> 86: <!ELEMENT dictionary (defitem)+> 87: <!ELEMENT defitem (term,def)> 88: <!ELEMENT def (%text;)*> 89: <!ELEMENT term (%text;)*> 90: 91: <!-- Many possibilities for tables, but start simple --> 92: <!ELEMENT table1 (row)+> 93: <!ATTLIST table1 94: title CDATA #IMPLIED 95: border (%boolean;) 'false' 96: > 97: 98: <!ELEMENT row (cell)+> 99: 100: <!ELEMENT cell (%text;)*> 101: <!ATTLIST cell 102: colspan NMTOKEN #IMPLIED 103: rowspan NMTOKEN #IMPLIED 104: > 105: 106: <!ELEMENT split (left,right)> 107: <!ELEMENT left (%text;)*> 108: <!ELEMENT right (%text;)*> 109: 110: <!-- Escape to include raw HTML --> 111: <!ELEMENT xhtml ANY> 112: 113: <!-- END Basic text entities --> 114: 115: <!-- Document Structuring with section* --> 116: 117: <!-- Like HTML H1 tag --> 118: <!ELEMENT section1 (%text; | section2)*> 119: <!ATTLIST section1 120: id ID #IMPLIED 121: title %ATEXT; #REQUIRED> 122: 123: <!-- Like HTML H2 tag --> 124: <!ELEMENT section2 (%text; | section3)*> 125: <!ATTLIST section2 126: id ID #IMPLIED 127: title %ATEXT; #REQUIRED> 128: 129: <!-- Like HTML H3 tag --> 130: <!ELEMENT section3 (%text; | section4)*> 131: <!ATTLIST section3 132: id ID #IMPLIED 133: title %ATEXT; #REQUIRED> 134: 135: <!-- Like HTML H4 tag: not in index. --> 136: <!ELEMENT section4 (%text; | section5)*> 137: <!ATTLIST section4 138: id ID #IMPLIED 139: title %ATEXT; #REQUIRED> 140: 141: <!-- Like HTML H5 tag: not in index. --> 142: <!ELEMENT section5 (%text; | section6)*> 143: <!ATTLIST section5 144: id ID #IMPLIED 145: title %ATEXT; #REQUIRED> 146: 147: <!-- Like HTML H6 tag: not in index. --> 148: <!ELEMENT section6 (%text; | section7)*> 149: <!ATTLIST section6 150: id ID #IMPLIED 151: title %ATEXT; #REQUIRED> 152: 153: <!-- Like HTML H7 tag: not in index. --> 154: <!ELEMENT section7 (%text; | section8)*> 155: <!ATTLIST section7 156: id ID #IMPLIED 157: title %ATEXT; #REQUIRED> 158: 159: <!-- Like HTML H8 tag: not in index. --> 160: <!ELEMENT section8 (%text;)*> 161: <!ATTLIST section8 162: id ID #IMPLIED 163: title %ATEXT; #REQUIRED> 164: 165: <!-- 166: $Log: text.dtd,v $ 167: Revision 1.11 2003/01/06 10:27:22 just 168: removed Arial fonts from default styles 169: 170: Revision 1.10 2002/08/21 21:24:48 just 171: allow sectionN element nesting upto 8 levels 172: 173: Revision 1.9 2002/07/11 12:03:07 just 174: general cleanup 175: 176: Revision 1.8 2002/07/09 11:53:50 just 177: some fixes for term (dictionary) 178: 179: Revision 1.7 2002/07/07 21:49:18 just 180: cleanup text.dtd 181: 182: Revision 1.6 2002/07/05 23:56:00 just 183: introduction of page.dtd and page2html.xsl 184: 185: Revision 1.5 2002/07/04 15:35:34 just 186: comments 187: 188: Revision 1.4 2002/07/01 22:04:29 just 189: updates for refactoring 190: 191: Revision 1.3 2002/03/27 20:08:26 just 192: support for html escape with xhtml tag in text.dtd and text2html.xsl 193: 194: Revision 1.2 2001/12/13 10:13:35 just 195: various changes 196: 197: Revision 1.1 2001/12/11 14:05:35 just 198: new 199: 200: 201: -->