XSLT Extension to DITA-OT is not behaving as I believe it should
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 71
- Joined: Fri Apr 30, 2004 8:00 pm
- Location: Texas
XSLT Extension to DITA-OT is not behaving as I believe it should
I am using Oxygen XML Editor 13.2
First, I am crash coursing myself through DITA and specialization.
I have successfully created an extension to extend topic. I've deployed it to the Toolkit in Oxygen and I've run the XHTML transformation script and I get the results I expected.
Now, I want to create a transformation to do some formatting in the HTML output.
This looks dirt simple in the tutorial.
I created a directory: myTopicHTML
I created the transformation script, myTopic2HTML.xsl:
I also created the plugin.xml in the same directory
org.example.mytopic.doctypes is the id I used when deploying the original element domain specialization.
I copied this directory (myTopicHTML) to the plugins directory of the Oxygen DITA-OT and ran the ant script: ant -f integrator.xml
It seems to run fine, but when I go to do my XHTML processing I get an error:
Which would lead me to believe the toolkit is going to look inplugins/myTopicHTML for the XSLT script. (which is where it is)
So, why didn't it find my transformation script?
Does the integration update any other files? Where else can I look to resolve this problem?
Thanks,
Michael Hare
First, I am crash coursing myself through DITA and specialization.
I have successfully created an extension to extend topic. I've deployed it to the Toolkit in Oxygen and I've run the XHTML transformation script and I get the results I expected.
Now, I want to create a transformation to do some formatting in the HTML output.
This looks dirt simple in the tutorial.
I created a directory: myTopicHTML
I created the transformation script, myTopic2HTML.xsl:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
<xsl:template match="*[contains(@class, ' xml-d/xmlelem ')]" priority="10">
<xsl:text>XML: </xsl:text>
<xsl:apply-templates/>
<xsl:text> :XML</xsl:text>
</xsl:template>
</xsl:stylesheet>
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<plugin id="org.example.mytopic.html">
<require plugin="org.example.mytopic.doctypes"/>
<feature extension="dita.xsl.xhtml" value="myTopic2html.xsl"/>
</plugin>
I copied this directory (myTopicHTML) to the plugins directory of the Oxygen DITA-OT and ran the ant script: ant -f integrator.xml
It seems to run fine, but when I go to do my XHTML processing I get an error:
If I look in the catalog-dita.xml I see:Fatal Error! I/O error reported by XML parser processing file:/myTopic2html.xsl: \myTopic2html.xsl (The system cannot find the file specified) Cause: java.io.FileNotFoundException: \myTopic2html.xsl (The system cannot find the file specified)
Code: Select all
<rewriteURI uriStartString="plugin:org.example.mytopic.html:"
rewritePrefix="plugins/myTopicHTML/"/>
So, why didn't it find my transformation script?
Does the integration update any other files? Where else can I look to resolve this problem?
Thanks,
Michael Hare
--------------------------
- mike
GnuPG Key fingerprint = 1AD4 726D E359 A31D 05BF ACE5 CA93 7AD5 D8E3 A876
- mike
GnuPG Key fingerprint = 1AD4 726D E359 A31D 05BF ACE5 CA93 7AD5 D8E3 A876
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: XSLT Extension to DITA-OT is not behaving as I believe it should
Hi Michael,
You have two problems, both in your plugin.xml.
1) The XSL is referenced with incorrect path capitalization, it's name is "myTopic2HTML.xsl" and it is referenced like "myTopic2html.xsl" which means that your specialization would not work correctly on Linux and Mac.
2) You need to specify 'type="file"' on the feature extension.
So the correct reference to the XSL should be like this:
After running the integrator, your XSL is added as an "xsl:import" to this XSL:
OXYGEN_INSTALL_DIR/frameworks/dita/DITA-OT/xsl/dita2html-base.xsl
You can also add some xsl:messages to your customized XSL and see if it gets called by searching for your messages in the console output.
Regards,
Radu
You have two problems, both in your plugin.xml.
1) The XSL is referenced with incorrect path capitalization, it's name is "myTopic2HTML.xsl" and it is referenced like "myTopic2html.xsl" which means that your specialization would not work correctly on Linux and Mac.
2) You need to specify 'type="file"' on the feature extension.
So the correct reference to the XSL should be like this:
Code: Select all
feature extension="dita.xsl.xhtml" value="myTopic2HTML.xsl" type="file"/>
OXYGEN_INSTALL_DIR/frameworks/dita/DITA-OT/xsl/dita2html-base.xsl
You can also add some xsl:messages to your customized XSL and see if it gets called by searching for your messages in the console output.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 71
- Joined: Fri Apr 30, 2004 8:00 pm
- Location: Texas
Re: XSLT Extension to DITA-OT is not behaving as I believe it should
Hi Radu,
Excellent!
I completely overlooked the need for type="file" attribute and just didn't notice the incorrect case usage.
Problem solved!
Thanks,
- m
Excellent!
I completely overlooked the need for type="file" attribute and just didn't notice the incorrect case usage.
Problem solved!
Thanks,
- m
--------------------------
- mike
GnuPG Key fingerprint = 1AD4 726D E359 A31D 05BF ACE5 CA93 7AD5 D8E3 A876
- mike
GnuPG Key fingerprint = 1AD4 726D E359 A31D 05BF ACE5 CA93 7AD5 D8E3 A876
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