ModularDocbook

Norman Walsh edited this page Oct 3, 2015 · 2 revisions

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?

A Journal Article:

PUBLIC "-//OASIS//DTD JournalArticle [DocBook](DocBook) XML V5.0//EN" "http://www.oasis-open.org/docbook/xml/5.0/journalarticle.dtd"

. . dc:titleModular Docbook: An Introduction</dc:title> dc:creatorNorm Walsh</dc:creator> dc:date2003-07-04</dc:date> . . <title>Introduction</title> . This article is about modular docbook...

A FAQ:

PUBLIC "-//OASIS//DTD FAQ [DocBook](DocBook) XML V5.0//EN" "http://www.oasis-open.org/docbook/xml/5.0/faq.dtd"

. . 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?

---Craeg Strong

Other modularized DTDs

The DocBook Publishers schema uses a modular approach to DocBook v5.0.

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.

see also http://sources.redhat.com/ml/docbook/2003-06/msg00081.html

There are also Modules in TEI (TextEncodingInitiative - http://www.tei-c.org/)

---Jakob Voß

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.