oxygenxml / dita-ot-diagrams-plugin

Dynamically convert PlantUML content inside DITA topics to SVG
Apache License 2.0
9 stars 3 forks source link

Plugin does not work with PDF themes #14

Open hcw70 opened 10 months ago

hcw70 commented 10 months ago

When running with Dita 4.1.2 and a theme, no plantuml output is generated:

dita-ot-4.1.2/src/dita-dl/bin/dita -f pdf --theme modules/dita-plugins/dita-ot-4.1.2/src/dita-dl/docsrc/samples/themes/dita-ot-docs-theme.yaml --generate.copy.outer=3 --processing-mode=strict -i doc/generic-gateway.ditamap -o out/

Without the --theme parameter the plantuml is rendered.

raducoravu commented 10 months ago

This plugin is quite simple, it uses the "dita.xsl.xslfo" extension point to add an extra XSLT stylesheet which has two xslt templates: https://github.com/oxygenxml/dita-ot-diagrams-plugin/blob/master/com.oxygenxml.diagrams.svg/xsl/pdfSVG.xsl So I do not think anything could be changed inside this simple plugin to make things work.

chrispy-snps commented 10 months ago

I wonder if somehow the template is being overridden by something in theming code. @hcw70, can you add the following line inside the template @raducoravu indicated to see if the transformation terminates or completes?

<xsl:message terminate="yes">template called</xsl:message>
hcw70 commented 10 months ago

I can confirm that the pdfSVG.xsl template is not called with "--theme" given. Without it is called.

hcw70 commented 10 months ago

Rendering with theme also gives other problems. IMHO that feature is broke yet. I get <fo:basic-link color="#3563ab" internal-destination=""> in topic.fo

which fails in validation of xsl-fo since internal-destination="" is not valid. Without theme that is not present. I will report to dita-ot also.

hcw70 commented 10 months ago

See https://github.com/dita-ot/dita-ot/issues/4301