[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook] DocBook XML 4.4 + XSLT = HTML
Hi Zoltán, On Fri, 25 May 2012 12:13:52 +0200 Zoltán János Jánosi <jazoja4@gmail.com> wrote: > I am working with DocBook XML v4.4. > I'd like to show it in a browser. > > So my questions are: > 1. What is the correct (and most simple) way of showing DocBook v4.4 > in browsers? Short answer: I would't do it. :) From my point of view, this method has several drawbacks: * Support of XSLT in browsers are limited * The DocBook stylesheets uses some extensions which may or may not be available in your browser * You can only view the document as a whole page, not in chunks * You can't pass parameters to the original stylesheet to customize certain behaviours * If your XML source is not well-formed, the hole process will break * Whenever you show your XML in your browser, it will load the DocBook stylesheets first. Lots of bandwidth is wasted each time. * It's not a very common approach in the DocBook community. I've never seen it (although it may be used in special cases) * There are better approaches (see text) (Yes, maybe my above points are not as absolute as they sound. There might be some who use this approach, but I've never seen it in production.) The supported, best, simplest, and easiest approach is to transform your DocBook source (regardless of its version) into HTML by the DocBook stylesheet. Be it with Saxon, xsltproc, or Xalan. That gives you all the flexibility. Remember, a browser is a tool to show _HTML_ files most efficiently. That's what he knows and was invented for. Some may know XML+CSS+XSLT, but that doesn't mean it is a well-supported method. I doubt most browsers can cope with the complexity of the DocBook stylesheets. > 2. What DocBook XSL versions should I use? (maybe the newers are for > v5+ only?) There are two incarnations of the DocBook stylesheets: the "normal" and the NS variant. Generally, you can use both regardless of the DocBook version. Of course, there are some differences: Internally the DocBook namespace is added or removed. See the following details for more information: http://sagehill.net/docbookxsl/ProcesingDb5.html#Db4XslForDb5 -- Gruß/Regards, Thomas Schraitle
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]