Trying to add support for new output type for highlight plugin.
Posted: Wed Nov 15, 2023 6:48 pm
Hi,
I'm trying to add support for a new output type for the syntax highlighting plugin but running into an issue getting the template to be executed and essentially, trying to emulate the PDF portion to support Miramo. I have started with copying the pdfHighlight.xsl as the basis of the customization.
The issue is with the use-when part. The same template definition is used in both cases. It works on the FO side, but not the Miramo side.
<xsl:template match="*[contains(@class,' pr-d/codeblock ')][contains(@outputclass, 'language-') or @outputclass=$allConfigHighlights]" use-when="function-available('version:getProductVersion') or function-available('oxy:highlight')">
Looking at the integration with the fop shell file I only see this: <xsl:import xmlns:dita="http://dita-ot.sourceforge.net" href="plugin:com.oxygenxml.highlight:pdfHighlight.xsl"/>. If I put that same reference in the Miramo shell, then the template above is not executed as well. If I remove the use-when bit from the template, then the template is executed.
So the big question is what am I missing with respect to the two functions? Where are they defined?
I'm trying to add support for a new output type for the syntax highlighting plugin but running into an issue getting the template to be executed and essentially, trying to emulate the PDF portion to support Miramo. I have started with copying the pdfHighlight.xsl as the basis of the customization.
The issue is with the use-when part. The same template definition is used in both cases. It works on the FO side, but not the Miramo side.
<xsl:template match="*[contains(@class,' pr-d/codeblock ')][contains(@outputclass, 'language-') or @outputclass=$allConfigHighlights]" use-when="function-available('version:getProductVersion') or function-available('oxy:highlight')">
Looking at the integration with the fop shell file I only see this: <xsl:import xmlns:dita="http://dita-ot.sourceforge.net" href="plugin:com.oxygenxml.highlight:pdfHighlight.xsl"/>. If I put that same reference in the Miramo shell, then the template above is not executed as well. If I remove the use-when bit from the template, then the template is executed.
So the big question is what am I missing with respect to the two functions? Where are they defined?