Next Previous Contents

## 4. Comparing LinuxDoc to DocBook

One way to do this is to go to the LDP site http://www.tldp.org click on HOWTOs and then compare the sources of the same HOWTO in the two formats: LinuxDoc and DocBook. The DocBook tags are often longer than the equivalent LinuxDoc tags and there are sometimes more of them needed to do the same task. DocBook uses <para> and </para> tags to enclose each paragraph while LinuxDoc uses only a blank line to separate paragraphs (no tags needed). For some examples see Comparison of DocBook to LinuxDoc

So there's much more to type with DocBook if you're typing in tags manually. But DocBook has all sorts of tags that don't exist in LinuxDoc so it's more advanced in a way. Just using a subset of DocBook doesn't help as you can see from the examples reached by the above link, partly because DocBook nests tags (uses more tags to do the same thing). With a more and longer tags the DocBook source becomes harder to read unless you use an editor that hides them. But hiding them has it's drawbacks since it's nice to see what tags you've used.

Still, the number of people who use DocBook greatly exceeds the number using LinuxDoc. But if you do decide to migrate to DocBook there's a program by Reuben Thomas (ld2db) which can help make the conversion. It's not 100% perfect and you may have to do some manual editing. The LDP also automatically converts a LinuxDoc HOWTO to DocBook after you submit it.

The ease of LinuxDoc is due to it being SGML which allows omission of tags (like using blank lines for paragraph markers). In most cases ending tags like </title> may also be omitted. This save a lot of time for the author but puts more work on the software to find the missing tags. If you were to look at a LinusDoc text after the software has found and added all the missing tags, including tags that most users don't even know exist, it would look just as complex and unreadable as DocBook. But users of LinuxDoc normally never see this since it's looked at mainly by people debugging the software, etc. So while DocBook is more advanced because it has more tags, LinuxDoc is more advanced since it's able to figure out where tags omitted by the author should go. DocBook can't do this and the inferior XML doesn't allow it.

Next Previous Contents