Re: [xsl] Highlight.js available as a XPath extension function

Subject: Re: [xsl] Highlight.js available as a XPath extension function
From: "Martin Honnen martin.honnen@xxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 2 Jul 2020 22:41:36 -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/9b8d90cc762e0cbc
eed78435e42047f7f4e5d257/src/main/java/top/marchand/xml/saxon/extension/highl
ight/HighlightExtension.java#L64?

Current Thread