Re: [docbook-apps] Syntax highlighting - setting colours

2013-04-17 Thread Jirka Kosek
On 16.4.2013 18:36, John Brown wrote:

   xsl:template match=xslthl:keyword

You must have this templates in xslthl mode like

xsl:template match=xslthl:keyword mode=xslthl

Jirka

-- 
--
  Jirka Kosek  e-mail: ji...@kosek.cz  http://xmlguru.cz
--
   Professional XML consulting and training services
  DocBook customization, custom XSLT/XSL-FO document processing
--
 OASIS DocBook TC member, W3C Invited Expert, ISO JTC1/SC34 rep.
--
Bringing you XML Prague conferencehttp://xmlprague.cz
--



signature.asc
Description: OpenPGP digital signature


[docbook-apps] Syntax highlighting - setting colours

2013-04-16 Thread John Brown
Hello All,

It seems that by default, keywords are bold. In addition to that,
I want to make keywords blue and comments green. I copied the code
to do it from
http://www.sagehill.net/docbookxsl/SyntaxHighlighting.html,
but it is not working. The text in the program listing is bold
but black.

My customisation layer looks like this:


  ?xml version=1.0 encoding=UTF-8?
xsl:stylesheet
    version=1.0
    xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
    xmlns:fo=http://www.w3.org/1999/XSL/Format;
    xmlns:xslthl=http://xslthl.sf.net;
    exclude-result-prefixes=xslthl

  xsl:import 
href=file:///c:/mingw/local/share/docbook-xsl-ns-1.78.1/fo/docbook.xsl /
  xsl:import 
href=file:///c:/mingw/local/share/docbook-xsl-ns-1.78.1/fo/highlight.xsl /
  xsl:param name=highlight.source select=1/

  xsl:template match=xslthl:keyword
  fo:inline font-weight=bold color=bluexsl:apply-templates//fo:inline
/xsl:template

xsl:template match=xslthl:comment
  fo:inline font-style=italic 
color=greenxsl:apply-templates//fo:inline
/xsl:template
  
/xsl:stylesheet


The relevant section of my DocBook 5.0 sub-document (XIncluded in main
document notes.xml) is

programlisting language=sql92
...
/programlisting

I transform notes.xml like this:

xmllint --xinclude -o notesi.xml notes.xml

%JAVA% -cp %CLASSPATH% -Dxslthl.config=/path/to/xslthl-config.xml 
com.icl.saxon.Stylesheet -o notes.fo notesi.xml notes.xsl

%FOP% notes.fo notes.pdf

What am I doing wrong?

Regards,
John Brown.   
-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org