Trying to add support for new output type for highlight plugin.
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 13
- Joined: Thu Feb 04, 2010 10:37 pm
Trying to add support for new output type for highlight plugin.
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?
-
- Posts: 13
- Joined: Thu Feb 04, 2010 10:37 pm
Re: Trying to add support for new output type for highlight plugin.
Looks looks like I found the issue.
In order for an <xslt> process in the Ant files to pick up the classpath information from the main build file it needs to be wrapped inside a pipeline element. Once that happens, then I'm getting the proper template called in the xslt.
<pipeline>
<xslt/>
</pipeline>
In order for an <xslt> process in the Ant files to pick up the classpath information from the main build file it needs to be wrapped inside a pipeline element. Once that happens, then I'm getting the proper template called in the xslt.
<pipeline>
<xslt/>
</pipeline>
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Trying to add support for new output type for highlight plugin.
Hi Eric,
Right, thanks for posting the solution. By the way the "com.oxygenxml.highlight" plugin is not open source, so copying parts of it is Ok to help maybe a particular common customer for their internal needs but copies of its content should not be released in an open source plugin.
Regards,
Radu
Right, thanks for posting the solution. By the way the "com.oxygenxml.highlight" plugin is not open source, so copying parts of it is Ok to help maybe a particular common customer for their internal needs but copies of its content should not be released in an open source plugin.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Return to “DITA (Editing and Publishing DITA Content)”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service