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 coloring of programlisting

||*()*||    [\..konnichi wa, ogenki desu ka, Frans../]

FE> I looked around a bit, and the most portable, simplest, solution appeared to
FE> me to be to write templates which marked up the code; XSLT 2.0 have pretty 
FE> good support for text-tokenization, judging from my shallow reading of what's 
FE> new, compared to 1.0..

FE> The customization layer would add an attribute("code","programming-language"?)
FE> to the programlisting tag, which contained what programming language its 
FE> content was, such that the templates could invoke as appropriate. 
FE> Alternatively, could the Condition[2] attribute be used.

The most portable and simplest are incompatible solutions. =)
PHP Manual uses regular expressions to find and highlight DocBook
output <code> sections. If you need Java or C solution - take a look
onto http://colorer.sf.net. It is free library, plugins available for
Eclipse and Far Manager. Colorer uses XML files to store infomation
about dozens of file formats. I think it is rather complicated task
for XSLT stylesheet. Though it is possible that colorer uses some
similar techniques, since it's highlightning configuration is
at least well-formed. =)

                   //Old Rusty Cans Killers [ORCK]:
                   //technically yours, techtonik

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