Subject: Re: [xsl] Highlight.js available as a XPath extension function From: "Norman Tovey-Walsh ndw@xxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Fri, 3 Jul 2020 07:20:32 -0000 |
Christophe Marchand cmarchand@xxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> writes: > which is not yet open-sourced - I wanted to use exactly the same > highlighter... Yes. I faced exactly the same problem. I had been using PrismJS for syntax highlighting in the browser, but I needed to be able to produce PDFs. It was annoying that the PDFs werenbt syntax highlighted. Ibve tinkered with calling JavaScript from the JVM (I have a cx:javascript step), but at a glance, it didnbt seem practical to run Prism in that context (does highlightJS really not use any of the DOM APIs? Or does GraalsJS now support them?) I cooked up an XProc pipeline to use Pygments in the PDF toolchain, but then the PDFs had different syntax highlighting than the browser :-( For the DocBook xslTNG stylesheets, I just went with Pygments in both places. And since Ibm (temporarily!) getting by without an XProc implementation in that context, I coded it up as an extension function. Ibve also now coded up a proper XInclude implementation as an extension function and a RELAX NG validator. [Expletive] pipelines are useful and being without them is damned inconvenient! > You complain about forking processes, but embedding a GraalJS engine Right. I had seen your note about GraalJS being kind of heavyweight and I didnbt want to give the impression that Pygments was going to be faster! Ibll try to get your extension working too. Be seeing you, norm -- Norman Tovey-Walsh <ndw@xxxxxxxxxx> https://nwalsh.com/ > She was mostly immensely relieved to think that virtually everything > that anybody had ever told her was wrong. (Mrs. E. Kapelsen)--Douglas > Adams [demime 1.01d removed an attachment of type application/pgp-signature which had a name of signature.asc]
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Highlight.js available as, Christophe Marchand | Thread | [xsl] An observation on the perform, Norman Tovey-Walsh n |
Re: [xsl] Highlight.js available as, Christophe Marchand | Date | [xsl] An observation on the perform, Norman Tovey-Walsh n |
Month |