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] Pretty printing source code

>On Sat, Nov 22, 2003 at 08:06:03AM -0500, Norman Walsh wrote:
>Um, Norm, it is a little terse to send an attachment
>with no explanation beyond the subject line.  can you
>provide a little background about this attachment?

I thought the same thing as well, and that it was highly uncharacteristic
of Norm.  However, when I looked at the attachment, I found the text
included below.

My guess is that somehow his mailer:
      User-Agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (gnu/linux)
(which is close to my reader...) didn't quite form it correctly, since
the email was structured like so:
    Initial text
   Multipart-boundary: content-type: text/xml
    XSL code
    Norm's usual insightful footer
   Multipart boundary: content-type: text/plain
    Docbook unsubscribe info.

I'm not sure why the "Initial text" was not within a multipart boundary,
of type text/plain.  But it caused my reader to ignore it as well.

Anyway, below are the textual contents of his email (sans XSLT code ;-) ).


>Hash: SHA1
>Every now and then someone asks about pretty-printing source code.
>It's certainly possible to put inline markup inside a programlisting
>to do it, the trick is getting some pretty-printing engine to generate
>the right markup.
>Today I stumbled over 'htmlize', an emacs function that converts the
>font-lock highlighting of emacs into HTML:
>  http://fly.srk.fer.hr/~hniksic/emacs/htmlize.el
>It turns out that this is nicely well-formed XHTML except for the
>So, if you htmlize a buffer and then edit it so that it has an XHTML
>namespace and appropriate doctype declaration (or none), you can
>process it with the attached stylesheet to generate "pretty printing
>YMMV, etc. And no, I haven't updated the DocBook XSLT stylesheets to
>do anything with the roles etc. used by this stylesheet. But I'll get
>there eventually.

[htmlize XSLT code deleted]
>                                        Be seeing you,
>                                          norm
>P.S. I've sent in a request to the author of htmlize to add an XHTML
>- -- 
>Norman Walsh <ndw@nwalsh.com>      | Unprovided with original learning,
>http://www.oasis-open.org/docbook/ | unformed in the habits of
>Chair, DocBook Technical Committee | thinking, unskilled in the arts of
>                                   | composition, I resolved to write a
>                                   | book.--Edward Gibbon

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