syntax highlight plugin detailed in help
Here should go questions about transforming XML with XSLT and FOP.
-
- Posts: 7
- Joined: Thu Mar 13, 2014 4:23 pm
syntax highlight plugin detailed in help
I tried to install the code highlighter made available here:
http://www.oxygenxml.com/doc/ug-editor/ ... lugin.html
I created a folder C:\Program Files\Oxygen XML Author 15\frameworks\dita\DITA-OT\plugins\com.oxygenxml.highlight
I created a file inside called plugin.xml with the following content:
a second file called xhtmlHighlight.xsl with the following content:
I ran the Integrator.
When I run any webhelp xform I get the error message:
I have little XSLT experience but I thought this looked pretty straightforward?
Is xhtmlHighlight.xsl missing a line with a declaration of some kind???
http://www.oxygenxml.com/doc/ug-editor/ ... lugin.html
I created a folder C:\Program Files\Oxygen XML Author 15\frameworks\dita\DITA-OT\plugins\com.oxygenxml.highlight
I created a file inside called plugin.xml with the following content:
Code: Select all
plugin id="com.oxygenxml.highlight">
<feature extension="package.support.name" value="Oxygen XML Editor Support"/>
<feature extension="package.support.email" value="support@oxygenxml.com"/>
<feature extension="package.version" value="1.0.0"/>
<feature extension="dita.xsl.xhtml" value="xhtmlHighlight.xsl" type="file"/>
<feature extension="dita.xsl.xslfo" value="pdfHighlight.xsl" type="file"/>
</plugin>
a second file called xhtmlHighlight.xsl with the following content:
Code: Select all
<xsl:template match="*[contains(@class,' topic/pre ')]" name="topic.pre">
<!-- This template is deprecated in DITA-OT 1.7. Processing will moved into the main element rule. -->
<xsl:if test="contains(@frame,'top')"><hr /></xsl:if>
<xsl:apply-templates select="*[contains(@class,' ditaot-d/ditaval-startprop ')]" mode="out-of-line"/>
<xsl:call-template name="spec-title-nospace"/>
<pre>
<xsl:attribute name="class"><xsl:value-of select="name()"/></xsl:attribute>
<xsl:call-template name="commonattributes"/>
<xsl:call-template name="setscale"/>
<xsl:call-template name="setidaname"/>
<!--Here I'm calling the styler of the content inside the codeblock.-->
<xsl:call-template name="outputStyling"/>
</pre>
<xsl:apply-templates select="*[contains(@class,' ditaot-d/ditaval-endprop ')]" mode="out-of-line"/>
<xsl:if test="contains(@frame,'bot')"><hr /></xsl:if><xsl:value-of select="$newline"/>
</xsl:template>
When I run any webhelp xform I get the error message:
Code: Select all
[xslt] C:\Program Files\Oxygen XML Author 15\frameworks\dita\DITA-OT\plugins\com.oxygenxml.highlight\xhtmlHighlight.xsl:1:74: Fatal Error! Error reported by XML parser Cause: org.xml.sax.SAXParseException; systemId: file:/C:/Program%20Files/Oxygen%20XML%20Author%2015/frameworks/dita/DITA-OT/plugins/com.oxygenxml.highlight/xhtmlHighlight.xsl; lineNumber: 1; columnNumber: 74; The prefix "xsl" for element "xsl:template" is not bound.
I have little XSLT experience but I thought this looked pretty straightforward?
Is xhtmlHighlight.xsl missing a line with a declaration of some kind???
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: syntax highlight plugin detailed in help
Hi Jeff,
You are probably using Oxygen 15.0 or 15.1.
Actually I wrote the user manual topic you mentioned in your forum post while I was working to create this plugin and bundle it with Oxygen 15.2.
In Oxygen 15.2 (which you can download and install from our web site) we added this plugin out of the box to the DITA OT bundled with Oxygen.
So if you use the default Oxygen 15.2 transformations and mark your codeblock sections with proper outputclass values:
http://www.oxygenxml.com/doc/ug-oxygen/ ... block.html
you will get syntax highlight in your DITA code block sections.
If you want to look at the plugin's resources, they are available in:
OXYGEN_15_2_INSTALL_DIR\frameworks\dita\DITA-OT\plugins\com.oxygenxml.highlight
Regards,
Radu
You are probably using Oxygen 15.0 or 15.1.
Actually I wrote the user manual topic you mentioned in your forum post while I was working to create this plugin and bundle it with Oxygen 15.2.
In Oxygen 15.2 (which you can download and install from our web site) we added this plugin out of the box to the DITA OT bundled with Oxygen.
So if you use the default Oxygen 15.2 transformations and mark your codeblock sections with proper outputclass values:
http://www.oxygenxml.com/doc/ug-oxygen/ ... block.html
you will get syntax highlight in your DITA code block sections.
If you want to look at the plugin's resources, they are available in:
OXYGEN_15_2_INSTALL_DIR\frameworks\dita\DITA-OT\plugins\com.oxygenxml.highlight
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
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