syntax highlighting in webhelp format

53 views
Skip to first unread message

natk

unread,
May 6, 2014, 10:21:56 PM5/6/14
to docbkx-to...@googlegroups.com
Hi,

I asked this question over on docbook-apps, but still haven't managed to resolve this.

What is the easiest way to do syntax highlighting in the webhelp output format?

For HTML and PDF, I just add the following line to my customization layer:

  <xsl:import href="urn:docbkx:stylesheet/highlight.xsl"/>

But highlight.xsl does not exist in the webhelp directory. I've tried using a relative path to the HTML version but this doesn't work:

  <xsl:import href="urn:docbkx:stylesheet/../../xhtml/highlight.xsl"/>

Nat 

David Cramer

unread,
May 7, 2014, 11:37:24 AM5/7/14
to docbkx-to...@googlegroups.com
On 5/6/14, 9:21 PM, natk wrote:
> What is the easiest way to do syntax highlighting in the webhelp output
> format?
>
> For HTML and PDF, I just add the following line to my customization layer:
>
> <xsl:import href="urn:docbkx:stylesheet/highlight.xsl"/>
>
> But highlight.xsl does not exist in the webhelp directory. I've tried
> using a relative path to the HTML version but this doesn't work:
>
> <xsl:import href="urn:docbkx:stylesheet/../../xhtml/highlight.xsl"/>

Try this:

<xsl:import href="urn:docbkx:stylesheet/xhtml/highlight.xsl"/>

Compare this repo (a heavy customization of the docbkx plugin:

https://github.com/stackforge/clouddocs-maven-plugin/blob/master/src/main/resources/cloud/webhelp/webhelp.xsl

Regards,
David

natk

unread,
Jul 3, 2014, 10:26:47 PM7/3/14
to docbkx-to...@googlegroups.com
Just following up on this question I asked earlier. Does anyone have any more information on this?

Nat 

David Cramer

unread,
Jul 3, 2014, 11:46:43 PM7/3/14
to docbkx-to...@googlegroups.com
Not ideal, but you could copy highlight.xsl to your customization layer
location and import it relative to that.

David
> --
> You received this message because you are subscribed to the Google
> Groups "Docbkx Tools Users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to docbkx-tools-us...@googlegroups.com
> <mailto:docbkx-tools-us...@googlegroups.com>.
> To post to this group, send email to docbkx-to...@googlegroups.com
> <mailto:docbkx-to...@googlegroups.com>.
> Visit this group at http://groups.google.com/group/docbkx-tools-users.
> For more options, visit https://groups.google.com/d/optout.

Nat

unread,
Aug 5, 2014, 10:31:08 PM8/5/14
to docbkx-to...@googlegroups.com
My apologies - I didn't get this reply emailed to me, and I missed it. I tried your suggestion, but it cannot find the file:

Error at xsl:import on line 7 of file:/Users/nat/Develop/xsl/webhelp.xsl:
  Failure reading jar:file:/Users/nat/.m2/repository/net/sf/docbook/docbook-xsl/1.78.1/docbook-xsl-1.78.1-ns-resources.zip!/docbook/webhelp/xsl/xhtml/highlight.xsl: JAR entry docbook/webhelp/xsl/xhtml/highlight.xsl not found in /Users/nat/.m2/repository/net/sf/docbook/docbook-xsl/1.78.1/docbook-xsl-1.78.1-ns-resources.zip

I also had a look at your customization, but I'm not sure what parts of this you are suggesting would be useful for my issue here. Are you able to post more information on this?

Nat 
Reply all
Reply to author
Forward
0 new messages