OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

docbook message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: RE: [docbook] DocBook XML 4.4 + XSLT = HTML

>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
>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.

Not only to mention the impact on the server. XSL transformations are not
cheap (in the sense of computational expensive).

If you're only half as lazy as me, you would set up a deployment that bears
less hazzle as possible in the future. I for instance would set up a
mercurial repository that automatically builds the docbook to HTML whenever
I decide to publish (in terms of mercurial it would be "to push") an update.
All you need for that is a mercurial repository, a python xsl transformer as
described at [1], post push hook as described at [2] and an update hook as
described at [3]. The update hook should finally start the XSL
transformation of the docbook source.

Setting it up like this I could modify the website as needed and once I am
done with that and want to publish it, all I have to do is run:

$ hg push http://my.web.server/hg/website-repository


[1] http://bytes.com/topic/python/answers/22945-xml-xslt-python

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]