Slashdot Mirror


Using the DocBook DTD for Internal Documents?

Saqib Ali asks: "These days, most of the Linux Documentation is created using DocBook DTD. I was wondering if it will be useful for a large Enterprise to create Internal IT documents using DocBook DTD. Any success stories where a large enterprise converted all of its internal IT documentation to DocBook, with management's support? Any other things/issues to keep in mind before embarking on such a mission?"

15 of 58 comments (clear)

  1. I end up having a lot of the same questions by quinto2000 · · Score: 3, Interesting

    I was looking into doing this for a while with a number of the formatted documents my school needs to deal with. It turned out that the DTD was much more complex than warranted for the kind of stuff we were doing, but of course YMMV.

    --
    Ceci n'est pas un post
    1. Re:I end up having a lot of the same questions by ichimunki · · Score: 3, Interesting

      I was recently looking heavily at DocBook/XML and comparing it to (La)TeX. I found all the tools for docbook completely lacking, and the XML format to be completely unfriendly to actually writing. LaTeX on the other hand, seems to kick ass for writing, since the markup is short, sweet and easy to learn/use. Not to mention that the algorithms used to perform the layout were designed by a damn genius instead of mere mortals. I've now used LaTeX in conjunction with pdflatex and latex2html to use a single set of source docs to generate both a web site and a PDF file (not to mention that you could also crank out postscript or just about anything you might need to do with documentation... TeX was designed so Knuth could write computer books after all).

      DocBook, on the other hand, has a lot of complicated markup-- I mean who enjoys using the PARA tag to open and close each and every paragraph? It would drive me insane. Then, after you finally find an editor that suits your needs, you still have to monkey around trying to convert the documents. I was able to get a DB file into HTML without too much pain, but PDF? Never managed it. I spent too many hours on what essentially would have translated the DB XML into TeX source anyway! Why not just write in TeX and be done with it.

      Finally, there is LyX for LaTeX which looks to be a WYSIaboutWYG editor, although I find it very convenient to just use emacs. I think the only problem I've had so far is getting figures to lay out on within text how I want, whereas TeX is pretty happy shoving them later, so that the body of the text can remain as fluid as possible. You can see the results on my site (where I suppose I ought to include a tarball of the actual LaTeX source files and the simple shell script that drives all the processing).

      --
      I do not have a signature
    2. Re:I end up having a lot of the same questions by ttfkam · · Score: 4, Informative

      There is also a Simplified DocBook DTD. We used it at my last job. It is a small but useful subset of DocBook that can get you started.

      All Simplified DocBook files are also completely valid DocBook documents. But there are far fewer elements and constructs to keep in your head. It's also geared toward smaller items such as articles instead of complete books. At my company, we made a couple of template documents and then just had people fill in the blanks. People ended up working faster once we got them to stop worrying about formatting and styling (non-trivial).

      Start writing in SD and as the collection of documents grows, you can look into combining them into a cohesive DocBook collection as time permits and your experience level grows.

      --

      - I don't need to go outside, my CRT tan'll do me just fine.
  2. one open source approach ... by Boiotos · · Score: 4, Informative

    uses Cocoon2 as a web-publication engine. The Norm Walsh xslt sheets are your best general-purpose transformation, but they sometimes choke on Xalan. This Wiki Page should clear up that problem.

  3. I try using XML to structure my docs... by scrytch · · Score: 3, Insightful

    But the structure navigator in every single bloody XML editor I have ever tried, free or commercial, tends to look like this:


    book
    |
    +--chapter
    +--chapter
    | |
    | +--section
    | +--section
    |
    |--chapter


    ad nauseum. Not chapter titles, not section titles, the literal words chapter and section. Multiply this by hundreds of sections.

    How. Completely. Useless.

    Until I can find an XML editor with some bloody sense to its structure navigator, I would rather use word. And no, I don't really want to use a WYSIWYG editor, because I want to know what XML it generates for my custom xslt snippets (which I might add I also have similar problems navigating with these brain dead editors)

    --
    I've finally had it: until slashdot gets article moderation, I am not coming back.
    1. Re:I try using XML to structure my docs... by Fweeky · · Score: 3, Interesting

      Um, then you tell it, using XPath, or even better; generate the listview using an XSLT like IE and Mozilla.

    2. Re:I try using XML to structure my docs... by Enry · · Score: 3, Interesting

      Look at how the Linux Documentation Project handles SGML/XML files. There are ways of handling this a lot better.

  4. We did it. by Some+guy+named+Chris · · Score: 5, Insightful

    It was a nightmare.

    Anyone who was not a programmer balked at the idea of having to write documentation in a (Gasp!) markup language. "Just give me Word!" they would whine.

    There is a lot of overhead associated with DocBook that most non-technical people don't want to deal with. They want a WYSIWYG editor, and will cry, kick, scream, and intentionally be completely unproductive until they get it.

    1. Re:We did it. by Hard_Code · · Score: 3, Funny

      "There is no place for someone who is deliberately not doing their job."

      Except a union apparently.

      --

      It's 10 PM. Do you know if you're un-American?
    2. Re:We did it. by pete-classic · · Score: 3, Interesting

      How about WYSIWYM (What You See Is What You Mean)?

      Try LyX.

      Just click "title" and type the title. Click a button to turn italics on/off, etc.

      See http://bgu.chez.tiscali.fr/doc/db4lyx/ and http://www.lyx.org/help/xml/xml.php

      -Peter

  5. No Suitable Editors by GOD_ALMIGHTY · · Score: 4, Interesting

    Essentially your choices are Adobe Framemaker (~$800), Lyx (Open Source) and XMLmind (Freeware). There may be some others, but these are the ones I've looked at. These are the ones you can use like a WYSIWYG, but are more WYSIWYM (What you see is what you mean). For more info on WYSIWYM, look at Lyx's site.

    DocBook is a great spec, but the editors suck for the most part. Lyx can't import DocBook in reliably, and your Docbook is stored as a lyx file (latex I think). Lyx's Docbook stuff can be a bear to set up, even on a system like RedHat where most of the software comes installed. I only recommend Lyx to people who have experience with Lyx, to someone who just wants to write docs, it tends to be more trouble than it's worth.

    Framemaker will probably do everything you want and be a godsend with lots of nice features, but you'll pay for it, $800 for Win/Mac and ~$1300 for Unix.

    XMLmind is pretty cool, it does Docbook well but is a little slow, it has a little bit of a learning curve, but is prolly the best Docbook editor I've found for free. It's not Open Source though. It is written in Java, so you might have some speed issues, depending on the platform you run it on. I've been recommending XMLmind to everyone I know that asks about Docbook, it has a tree view of the DOM as well as a WYSIWYM view with stylesheets applied on the fly. It has property editors and a pretty smart insert tool that follows the DTD, only allowing you to insert allowed tags into other tags. It feels like more of a programmer's tool than Framemaker, but it should be fairly easy for most WYSIWYG users to adjust.

    <rant>
    I don't understand why on God's green earth OpenOffice or Abiword or KOffice, or anyone else in the OpenSource world has neglected this area. It's been three years since the LDP went to DocBook, GNOME uses DocBook as their doc format. Why in the hell don't we have decent document writing tools when everyone is always screaming about the lack of documentation in the OpenSource world?

    If we want more docs written, it needs to be easier to write them and shouldn't involve learning all about SGML or XML engines as well as a markup language to do it. DocBook is too big to keep in my head and I shouldn't have to think hard about how to write docs when my focus is the content I want to write for. Organizing technical info on a difficult subject is hard enough, stopping every five minutes to look up a DocBook tag or trying to better understand the structure is a huge barrier to getting the work done.
    </rant>

    But that's just my $.02

    --
    Arrogance is Confidence which lacks integrity. -- me
  6. Your site.. by Fweeky · · Score: 3, Interesting
    http://www.ichimunki.com/: (pretend I have <cite> around that ;)
    ``Deep'' linking discouraged because the page names are dynamic

    Ignoring the utterly braindead ``foo'' quotes, those filenames are ultra lame.

    DocBook lets you specify a section ID which ends up being mapped to a filename when generating HTML; doesn't LaTeX haeve something like that?
    1. Re:Your site.. by ttfkam · · Score: 3, Informative
      But then I limited myself to Free Software, whereas someone willing to use non-Free software might easily find an off-the-shelf package to get around the PS/PDF hurdle.

      Check out Apache Cocoon and Norman Walsh's DocBook stylesheets at Sourceforge. It sounds very much like what you are looking for both for batch processing of documents (using command-line mode) and for online dynamic presentation. There is even a serializer to PCL5 in case you ever wanted to send directly to HP-compatible printers.
      --

      - I don't need to go outside, my CRT tan'll do me just fine.
  7. What about OpenOffice.org by stonebeat.org · · Score: 3, Interesting

    At one point in time I was very involved in OpenOffice.org. Now I have lost track of the developement. There were some talk to including DocBook DTD in the distribution. Does anyone, if any progress has been made on that?

  8. Re:Oh for heaven's sake by ttfkam · · Score: 3, Informative
    Yes, this isn't documented well enough. (I'm not being sarcastic -- it actually took a bit of hunting to find this)

    From http://xslt-process.sourceforge.net/docbook.php

    A better solution is to create a local copy of the DocBook DTD files. To do this go to http://www.oasis-open.org/docbook/xml/4.1.2/ and download the ZIP file containing the DocBook DTD. Put it in an accesible place on your file system, for example in /usr/local/share/docbook-4.1.2. Then modify the DOCTYPE of your DocBook documents to be:
    <!DOCTYPE book
    PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
    "file:/usr/local/share/docbook-4.1.2/docbookx.dtd" >

    I also know that there's a way to specify it as a general resource and to have a catalog that keeps from having to hardcode each file to a path, but I don't remember the syntax or the steps offhand.

    Hope this helps with your laptop problem.
    --

    - I don't need to go outside, my CRT tan'll do me just fine.