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?"
Is there some reason why Docbook is insuffient? More info at www.docbook.org.
-molo
Using your sig line to advertise for friends is lame.
What you want is a Relax-NG Schema. DTDs only define the barest bones of XML structure. Validating against a schema lets you verify all kinds of things that a DTD can't even express.
(Don't be confused by W3C Schemas. That format stinks.)
Is a schema important for documentation? It depends on how much structure you need, which largely depends on how many uses you have for the documents. My employer actually puts the documentation itself in the schema, and generates manuals from the same text that validates important input files.
Use ReST (ReStructured Text) and DocUtils. DocUtils outputs perfectly nice XML (ignore the HTML, LaTeX, and other options). It's then easy enough to use XSL:FO and FOP/XEP to transform the XML to PDF.
Been using it for a year, and I'm absolutely flippin' delighted with it. Structured documentation that's both open-standard and imminently readable, yet delivers great PDFs.
--
Don't like it? Respond with words, not karma.
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
If you choose to make your own XML document schema, you lose out on the preprepared stylesheets and converters. On the other hand, a schema made for the task at hand is usually easier to use and understand.
As a compromise, you might to check out the progress on XHTML 2.0. It has a syntax not too far removed from the HTML we've all seen before, but 2.0 is closer to the DocBook model of semantics rather than presentation. It is also more likely to be supported by 3rd party clients in the future. (There is already an XHTML 2.0 renderer available for Mozilla.)
Whatever you do, make sure the markup relates to meaning and NOT how it looks. Looks change, but if you don't take care to the meaning/semantics from the beginning, it is prohibitively difficult to put in in later. For example, it's easy to make all annotations and citations red. It's not so cut and dried to change all red text to annotations (when citations or emphasized text may be formatted in red).
- I don't need to go outside, my CRT tan'll do me just fine.
Is PDF too simple? Too cross platform? Too non-needing-its-own-application-infrastructure? It sounds like you have too much time on your hands. Concentrate on getting your tech people to document things, take whatever they'll produce, as long as it's better than:
/*Fred says this needed to be here*/
foo=bar*.734
I want to delete my account but Slashdot doesn't allow it.
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.
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.
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.