DTDs for Internal IT Documents?
Saqib Ali asks: "A DTD (Documentation Type Definition) defines the document structure with a list of legal elements. DocBook DTD is being widely used in creating Linux related documentation. However I am looking for a XML DTD that is more suited to internal IT documentation, and easy to learn and use. Preferably I would like to use a DTD that can be used with OpenOffice. What DTDs are other Slashdot readers using for for internal IT documentation? I have created documentation using DocBook DTD and hosted them on a Apache Cocoon . Cocoon lets me transform the XML to HTML or PDF. I would like to keep the same backend infrastructure (i.e. Cocoon) but try out other DTDs that are suited for IT related documentation. Any ideas?"
few reasons:
1) I have been using DocBook for few years. So I know it pretty well. However to newbies, DocBook can be overwhelming (I have been there). I know there is also Simplified DocBook, but no good WYSIWYG editors for it either.
2) OpenOffice doesn't have very good support for DocBook. Setting up OpenOffice to support DocBook can be very tricky.
3) Not many good WYSIWYG editors support DocBook DTD. And if they do, it is not that easy to setup.
What I am looking for is a "Open Standard" DTD can be used to create simple documentation, and is well suited for IT related stuff.
Consensus is good, but informed dictatorship is better
I usually use XSD with JAXB (Java XML Bindings) because it provides me with an Object-Oriented approach to reading/writing that specific format. There are also a couple projects to do that for C++ (Rogue Wave). Personally, I *love* XML Data Binding, because I no longer have to deal with DOM or SAX.
http://www.google.com/profiles/malachid
DTDs are '90s technology.
What you want is a Relax-NG Schema.
I think you are confused about what a DTD is. It stands for Document Type Definition, and includes all the human-readable specification that describes what all the elements mean as well as the formal, machine-readable part of the specification.
You absolutely cannot get away from DTDs if you are to edit XML sanely. It's essentially editing with a blindfold on otherwise.
This is a completely different matter to what you should use for validation. Relax NG is pretty decent, as you say. But don't confuse validation with the type of the document.
Morphon is a good WYSIWYG editor for DocBook and other XML dialects. It comes with DocBook stylesheets built in. Morphon is now free (as in beer).
Software sucks. Open Source sucks less.
Except that DTDs are also currently the only standard way to expand general entities in a document. I wish there was a standard entity definition language independent of validation languages such as RELAX NG. Tim Bray once had an idea, but that seems to have gone nowhere. :-( XSLT could be used to do it, but transformations of that nature are slow and clunky when compared with entities. XML 2.0 needs a new doctype declaration mechanism. The SGML-inherited one is too limited!
It is impossible to enjoy idling thoroughly unless one has plenty of work to do.
- Jerome Klapka Jerome
Just off the top of my head, I recall TEI and TEI-lite being in wide spread use. There are quite a few subsets of both. In general it's often easier to strip an existing DTD down to what you need than to try to make a new one from scratch.
Docbook, as others have mentioned, is good for simple documents, or ISO-12083 for more complex ones are additional options.
Beta is broken and the link to classic doesn't work. Stop wasting our time or there won't be anybody left here.
I think /you/ are completely confused.
It stands for Document Type Definition, and includes all the human-readable specification that describes what all the elements mean as well as the formal, machine-readable part of the specification
Hmm. You mean it has comments? Because a DTD is nothing more than a machine-readable specification, which often (but not always) comes with comments.
If you somehow came to the conclusion that xml schemas (in general) are not meant to be human readable, take a look at the compact syntax for RNG.
Norm Walsh (ie Mr DocBook) is already making progress replacing the DTD infrastructure of DocBook with RNG. And guess what, he uses an editor (nXML-mode for GNU Emacs) that supports RNG!
I guess he must wear a blindfold? Or maybe you should take a read of James Clark's paper on the design of Relax NG?
Have you tried the XML plug-ins with jEdit? Validate as you go. Also, Eclipse, with XMLBuddy.
I'm in daily debt to the folks who wrote these.
How about MS Word 2003?
Laugh it up, but Infopath would allow you to define a schema (DocBook) and let you use Word as an engine to enter the data as one gigantic "form".
Caveats:
1) I have no idea how well it would handle "non-form based" data such as this. It seems it was meant for work-flow enhancement for smaller amounts of data than a book.
2) Infopath seems to be really, really expensive. It is probably outside of the budget of any open-source project.
That said, the solution does exist.