THIS ENTIRE DOCUMENT IS WORK IN PROGRESS
Power users may immediately go to the DTD definition.
This example is the file xdoc/book.xml for this documentation.
1: <?xml version="1.0" encoding="UTF-8"?>
2:
3: <!DOCTYPE xbook SYSTEM "nl/justobjects/xbook/rsc/dtd/xbook.dtd">
4:
5: <xbook titleImage="assets/xbook-logo.gif" title="XBook Documentation" bgColor="#001E32" fgColor="white" default="main.xml" >
6:
7: <folder label="About" desc="general stuff">
8: <document label="home" desc="Readme" src="main.xml" />
9: <external label="readme" desc="Readme" url="readme.txt" />
10: <external label="version" desc="Version" url="version.txt" />
11: <external label="todo" desc="todo list" url="todo.txt" />
12: <external label="license" desc="License" url="license.txt" />
13: <external label="download" desc="Download" url="http://www.justobjects.org/download/xbook" />
14: </folder>
15:
16: <folder label="Documentation" desc="documentation">
17: <document label="overview" desc="XBook Overview" src="overview.xml" />
18: <folder label="Authoring" desc="Authoring">
19: <document label="authoring overview" desc="XBook Authoring Guide" src="authoring-guide.xml" />
20: <document label="book authoring" desc="XBook Authoring Guide" src="authoring-book.xml" />
21: <document label="text authoring" desc="XBook Authoring Guide" src="authoring-text.xml" />
22: <document label="doc authoring" desc="XBook Authoring Guide" src="authoring-doc.xml" />
23: <document label="page authoring" desc="XBook Authoring Guide" src="authoring-page.xml" />
24: <document label="album authoring" desc="XBook Authoring Guide" src="authoring-album.xml" />
25: <document label="menu authoring" desc="XBook Authoring Guide" src="authoring-menu.xml" />
26: </folder>
27: <folder label="Generation" desc="Generation">
28: <document label="generation guide" desc="XBook Generation Guide" src="generation-guide.xml" />
29: </folder>
30: <folder label="Developer" desc="Developer">
31: <document label="extensibility guide" desc="XBook Generation Guide" src="extensibility-guide.xml" />
32: <external label="api" desc="XBook API" url="api/index.html" target="ext" />
33: </folder>
34:
35: </folder>
36:
37: </xbook>
|
|
Below is the actual DTD file.
1: <?xml encoding='US-ASCII'?>
2:
3: <!--
4: This DTD describes the hierarchical structure of a book. A book assembles
5: and organizes all documents and external links.
6: Folders give structure to menu bars. They do not have to reflect
7: the directory structure of actual files. Within a folder other folders can
8: be contained or one of two types of elements: "document" or 'external".
9:
10: - document element
11: A document is a source
12: XML document to be transformed by xdoc according to the rules set
13: for its DTD. For example a document with doc.dtd will use
14: doc2html.xsl for transformation. A document with album.dtd will
15: use album2html.xsl.
16:
17: - external element
18: External documents that don't require transformation are added
19: using the "external" element. External documents may be just hyperlinks
20: to remote websites like http://www.javasoft.com or local documents
21: like readme.txt. The "copy" attribute specifies whether the document
22: should be copied to the destination directory. Note: this does not apply
23: to "http://" hyperlink documents.
24:
25: An xbook file is typically processed into a set of webpages. The structure
26: of the folders, documents and external links is reflected into the menu
27: structure.
28:
29: Version: $Id: xbook.dtd,v 1.12 2003/01/06 10:27:22 just Exp $
30: -->
31:
32: <!ENTITY % content "folder|document|external">
33:
34: <!-- Toplevel, fgColor/bgColor are for the menu (icons).
35: ONLY white and black are allowed currently for fgColor when not using -lite option!!
36: Default: the default page to display in the content frame (e.g. main.xml)
37: The titleImage is optional. If present it may be placed at the top of the lite menu.
38: -->
39: <!ELEMENT xbook (%content;)+>
40: <!ATTLIST xbook
41: titleImage CDATA #IMPLIED
42: title CDATA #REQUIRED
43: default CDATA #REQUIRED
44: fgColor CDATA 'white'
45: bgColor CDATA '#222222'
46: >
47:
48: <!-- Container for folders, documents or external urls. -->
49: <!ELEMENT folder (%content;)+>
50: <!ATTLIST folder label CDATA #REQUIRED
51: desc CDATA #REQUIRED>
52:
53: <!-- Element to be transformed by xdoc from src to url. -->
54: <!ELEMENT document EMPTY>
55: <!ATTLIST document label CDATA #REQUIRED
56: desc CDATA #REQUIRED
57: src CDATA #REQUIRED
58: url CDATA ''
59: target CDATA 'text'
60: >
61:
62: <!-- External link or file, optionally copied if copy is "y". -->
63: <!ELEMENT external EMPTY>
64: <!ATTLIST external label CDATA #REQUIRED
65: desc CDATA #REQUIRED
66: url CDATA #REQUIRED
67: target CDATA 'text'
68: copy CDATA 'n'
69: >
70:
71: <!--
72: History
73: $Log: xbook.dtd,v $
74: Revision 1.12 2003/01/06 10:27:22 just
75: removed Arial fonts from default styles
76:
77: Revision 1.11 2002/07/09 23:17:32 just
78: allow images to be used in top of menu frame
79:
80: Revision 1.10 2002/07/09 11:57:13 just
81: remove album element (not required)
82:
83: Revision 1.9 2002/07/09 11:54:14 just
84: only comments and moving Log section to end of document.
85:
86: Revision 1.8 2002/06/18 11:03:55 just
87: url attr emtpy for default with document element
88:
89: Revision 1.7 2002/06/18 10:50:00 just
90: added comments
91:
92: Revision 1.6 2002/06/18 10:35:39 just
93: removed resources element and added target attr to document element
94:
95: Revision 1.5 2002/06/17 15:10:27 just
96: no chnages
97:
98: Revision 1.4 2002/01/03 15:32:11 just
99: changes required for upgrade to Xalan 2.2D14
100:
101: Revision 1.3 2001/12/13 10:13:35 just
102: various changes
103:
104: Revision 1.2 2001/12/11 16:26:40 just
105: removed dest attrs in document
106:
107: Revision 1.1 2001/12/11 14:05:35 just
108: new
109:
110: Revision 1.2 2000/12/07 16:02:59 just
111: changes
112:
113:
114: -->
115:
|
|