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

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

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


Subject: Re: [docbook-apps] Syntax highlighting, HTML, PDF, XSLT,extensibility


Shlomi Fish <shlomif@iglu.org.il> wrote on Mon, 13 Sep 2004 14:30:01
+0300:

> On Mon, 13 Sep 2004 02:11 pm, cali wrote:
>> 2) Markup the programlisting with manually with <code role=keyword"></code>
>> or something, and put in the XSLT how to render a keyword and so on.
>> ...
>> 4) Same as 2 but have another program automatically do the markup from a
>> source file.
>>
>> Has anyone else been thinking about this?

I have, I have come to the same conclusions as you, and I have
implemented Option 4 for myself. However, I'll probably abandon it and
do instead something like the following to convert a file to DocBook
XML markup:

- call emacs as a batch job, using
  http://fly.srk.fer.hr/~hniksic/emacs/htmlize.el to convert the
  font-lock-highlighted buffer to HTML.

- Run the output through an XSLT processor to convert it to DocBook
  XML, using a stylesheet that is yet to be written :-).

htmlize.el claims to produce HTML 4.01, but my quick test validated as
XHTML 1.1. The output looks quite clean; highlighting uses class
attributes and an embedded <style type="text/css"> definition. It
should be easy to write an XSLT style sheet to transform it to DocBook
XML. 

Or, one could change htmlize and call it docbookize. Or, perhaps
ideally, one could turn it into an xmlize and give it customization
options or different entry functions for different output
formats. Talk to its maintainer...

> Good syntax highlighters:
>
> 1. a2ps (supports PostScript and HTML)

But it does not do HTML output, does it?

-- 
Justus H. Piater, Ph.D.         http://www.montefiore.ulg.ac.be/~piater/
Institut Montefiore, B28        Phone: +32-4-366-2279
Université de Liège, Belgium    Fax:   +32-4-366-2620



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