Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
What if docbook were restructured into a set of modular pieces?
How might the DTD files be structured?
- docbook-common.mod -- This defines the set of elements shared by every type of docbook document. This file includes others which define the common entities, and other items that should be available everywhere. Because several elements are recursively defined, there should be only on the order of 100 elements here.
- metadata.mod -- This defines metadata that can be used in every type of docbook document. This file will include others such as dublin core. It should also be extensible (c.f. Adobe "extensible metadata platform":http://www.adobe.com/products/xmp/)
- article.dtd -- This defines the doctype for articles. It includes metadata.mod and docbook-common.mod, and defines the elements and entities that are unique to articles.
- faq.dtd -- This defines the doctype for faqs. It includes metadata.mod and docbook-common.mod, and defines the elements and entities that are unique to faqs.
- whitepaper.dtd -- This defines the doctype for whitepapers. It includes metadata.mod and docbook-common.mod, and defines the elements and entities that are unique to whitepapers.
- techreport.dtd -- This defines the doctype for technical reports. It includes metadata.mod and docbook-common.mod, and defines the elements and entities that are unique to techreports.
- docbook.dtd -- This DTD includes all docbook document types. Its use is deprecated, but is included for backwards compatibility.
What might ModularDocbook documents look like?
PUBLIC "-//OASIS//DTD JournalArticle [DocBook](DocBook) XML V5.0//EN" "http://www.oasis-open.org/docbook/xml/5.0/journalarticle.dtd" A Journal Article:
PUBLIC "-//OASIS//DTD FAQ [DocBook](DocBook) XML V5.0//EN" "http://www.oasis-open.org/docbook/xml/5.0/faq.dtd" A FAQ:
. . dc:titleModular Docbook: Frequently Asked Questions</dc:title> dc:creatorNorm Walsh</dc:creator> dc:date2003-07-04</dc:date> . . Can I use WYSIWYG tools with Docbook? . . See http://xml.openoffice.org/xmerge/docbook/ ...
Notes and Observations:
- Making every docbook document start with the same outer element ('document') simplifies transformation by XSLT and other tools.
- New types of documents can be added easily with minimal disruption. Thoughts?
Other modularized DTDs
I just finished my work at the Computer and Media Service of Humboldt University, Berlin. Have a look at the '''Dissertation Markup Language''' (DiML). It's modularized and stored as XML. You select the modules and then create a DTD and a reference as you can see there: http://edoc.hu-berlin.de/diml/ Unfortunately the system to manage the modules is only documented in German.
There are also Modules in TEI (TextEncodingInitiative - http://www.tei-c.org/)