[docbook-apps]
Hello, I'm looking for an example how to use/apply xmlcalabash extension step (https://github.com/ndw/xmlcalabash1-xslthl) on a docbook programlistingelement when using the xslt20 stylesheets. I know some XSLT 1.0 and there is a description how to use xslthl directly there (https://sourceforge.net/p/xslthl/wiki/Usage/). But I'm a bit lost on how to 'translate' that to an XProc calabash extensions step. My best guess so far was: But this leads to the error message: > [main] ERROR com.xmlcalabash.util.DefaultXProcMessageListener - > src/main/resources/docbook-xsl20/db2html-db-toolchain.xpl:36:16:Required > option not specified: highlighter > [main] ERROR com.xmlcalabash.util.DefaultXProcMessageListener - > src/main/resources/docbook-xsl20/db2html-db-toolchain.xpl:36:16:err:XS0018:Required > option not specified: highlighter Kind regards, Thomas - To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org
Re: [docbook-apps] xmlcalabash extensions step: No 'class' in configuration for cx:mathml-to-svg
I could now answer the question on my own: 1. Finding xmlcalabash extension steps works by aannotationProcessing of classindex. Hence I have to include the following into my gradle file: + // needed to find xmlcalabash extension steps _in our code_ + api("org.atteo.classindex", "classindex", "3.4") + annotationProcessor("org.atteo.classindex", "classindex", "3.4") 2. The Java11 module system also must 'open' the classes to reflection in module-info.java + exports com.xmlcalabash.extensions.math_to_svg; + exports com.xmlcalabash.extensions.xslthl; 3. Java11 does not like the old jeuclid code. You have to use the the following jeuclid fork: + api("de.rototor.jeuclid:jeuclid-core:3.1.14") + api("de.rototor.jeuclid:jeuclid-fop:3.1.14") Kind regards, Thomas - To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org
[docbook-apps] xmlcalabash extensions step: No 'class' in configuration for cx:mathml-to-svg
Hello, this is probably a silly question. I would like to use 2 xmlcalabash extensions step with the docbook xslt20 stylesheets: mathml-to-svg and xslthl, and I would like to do that in my own Java program. So far, I have working Java db5 -> html conversion code (using saxon-he and xmlcalabash@1.1.30-99). But when I try to use the cx:mathml-to-svg I get the following error message: > DefaultXProcMessageListener - Misconfigured. No 'class' in > configuration for cx:mathml-to-svg I guess that I haven't understood how the Java class of the extension step is registered with xmlcalash. On the class, there is an annotation > @XMLCalabash( > name = "cx:mathml-to-svg", > type = "{http://xmlcalabash.com/ns/extensions}mathml-to-svg;) and there is an (extra) library.xpl. Perhaps somebody could explain me the about the relation of the 2 files - and what have to been done to register an extension step with xmlcalabash successfully. Kind regards, Thomas
[docbook-apps] SVG in Docbook: Scaling Problem
I want to embed SVGs in docbook. These SVGs are generated by mathjax and look like the following: http://www.w3.org/1999/xlink; width="8.976ex" height="2.676ex" style="vertical-align: -0.338ex;" viewBox="0 -1006.6 3864.5 1152.1" role="img" focusable="false" xmlns="http://www.w3.org/2000/svg; aria-labelledby="MathJax-SVG-1-Title"> E = mc^2 The result is a docbook with the image(s) embedded. However, when I try to transform that with the xslt20-stylesheets to xsl-fo, Apache FOP throws an NullPointerException. I looked a the code and found out it is because Apache FOP could not determine the font size in the current context. Hence the problem could be avoided by changing the attributes 'width' and 'height' of the SVG like this: http://www.w3.org/1999/xlink; width="89.76" height="26.76" ...>... I wonder if I could do better. In the xslt20-stylesheets, is there a way to get the font size of the current context (for mediaobjects and/or inlinemediaobjects)? Kind regards, aanno - To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org
Re: [docbook-apps] Re: Some beginner questions for db xslt20-stylesheets
> aanno writes: >> 1. So far I have used 'java -jar docbook-xslt2-2.3.8.jar -f foprint -o >> out.fo howto.xml' to get an PDF of my document. However, I wonder if >> it is possible to get the _xsl-fo output_ of the document as well. >> There seems to be a lot of options (and I have played around with >> 'return-secondary' but with no useful result), so perhaps this is easy. > I think you’d have to modify the pipeline to do that. Using '-f fo' is undocumented, but gets the job done. > >> 2. When I try the '(css)print' format, I only get the error: >> 'XProcException: No CSS processor class defined'. I guess I'm >> missing something here. > Right. You need a tool to do CSS printing. I believe you can use > either AntennaHouse or Prince, but I confess I haven’t tried anything > but AntennaHouse recentluy. With Prince XML as css print processor: * Install prince from https://www.princexml.com/ * Use 2 system properties for calabash configuration: -Dcom.xmlcalabash.css-processor=com.xmlcalabash.util.CssPrince -Dcom.xmlcalabash.css.prince.exepath=/usr/bin/prince > >> 3. What are my options for using _math_ inside a docbook document? > You can put MathML in an inlineequation. Successful output is going > to depend on a processor that can render MathML, of course. > > If you’ve got a tool that can turn MathML into bitmaps, you could > construct a pipeline to do that, I expect. I'm fiddling with mathjax generated SVG's now and will post a separate question about this. > >> 4. Is it possible to do source code highlighting in docbook? > In the browser, yes. I don’t think there’s a solution for doing it in > print at the moment. > > Be seeing you, > norm > -- Mit freundlichen Grüßen / Best regards, Thomas Pasch Entwickler, Dipl.-Ing. *SiteOS AG* Grillparzerstraße 10 81675 München /Tel/: +49 89 / 30 90 897 21 /Fax/: +49 89 / 30 90 897 99 /E-Mail/: thomas.pa...@siteos.de /Vorstand/: Andreas Germeroth, Thomas Reischl /Vorsitzender des Aufsichtsrats/: Dr. Nicolas Martin /Registergericht München/ | Registernummer: HR B 130513 Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben,informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet. This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorised copying, disclosure or distribution of the material contained in this e-mail is strictly forbidden. - To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org
[docbook-apps] Some beginner questions for db xslt20-stylesheets
Hello, I'm a beginner with xslt20-stylesheets and have the following questions: 1. So far I have used 'java -jar docbook-xslt2-2.3.8.jar -f foprint -o out.fo howto.xml' to get an PDF of my document. However, I wonder if it is possible to get the _xsl-fo output_ of the document as well. There seems to be a lot of options (and I have played around with 'return-secondary' but with no useful result), so perhaps this is easy. 2. When I try the '(css)print' format, I only get the error: 'XProcException: No CSS processor class defined'. I guess I'm missing something here. 3. What are my options for using _math_ inside a docbook document? 4. Is it possible to do source code highlighting in docbook? Kind regards, aanno - To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org