Subject: Re: [xsl] Highlight.js available as a XPath extension function From: "Christophe Marchand cmarchand@xxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Fri, 3 Jul 2020 05:59:56 -0000 |
On 02.07.2020 23:21, Christophe Marchand cmarchand@xxxxxxxxxx wrote:Highlight JS is a well known javascript library that is able to highlight source code in a HTML page.
If you need to generate a static HTML that contains highlighted source code, and if you use Saxon 10 and Java 11 at least, you now have a XPath extension function that do this. It embeds highlight.js library, and so, rendering is the same as the one done in browser. But your page is generated and do not require JavaScript,
Sounds great.
I have not been following the integration of Javascript in the Java
versions so I am not quite sure how it works; does any Java 11 JRE or
JDK (i.e. Oracle or OpenJDK) support that Javascript evaluation you seem
to be doing in
https://github.com/cmarchand/highligtJS-saxon-extension/blob/9b8d90cc762e0cbceed78435e42047f7f4e5d257/src/main/java/top/marchand/xml/saxon/extension/highlight/HighlightExtension.java#L64?
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Highlight.js available as, Martin Honnen martin | Thread | Re: [xsl] Highlight.js available as, Norman Tovey-Walsh n |
Re: [xsl] Highlight.js available as, Martin Honnen martin | Date | Re: [xsl] Highlight.js available as, Norman Tovey-Walsh n |
Month |