DITA OT transformation scenarios in Oxygen
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 4
- Joined: Fri Mar 04, 2022 11:23 am
DITA OT transformation scenarios in Oxygen
Hi,
I am not sure I fully understand how DITA OT transformation scenarios are working.
I have a client using 10 custom plugins (custom dtd, several for PDFs and for HTML5 output).
They have a custom plugin named something like com.customer.html5 and a custom transtype for HTML5, and when selecting this one, it is expected that their customizations do apply.
However, when selecting the DITA OT 3.3.4 default HTML5 transformation scenario , several of their customizations do still apply, while in my understanding it should output "vanilla" HTML5.
Furthermore, modifying one of their XSL inside the client HTML5 plugin has a direct impact when using default HTML5 transformation scenario, which I don't get either.
Could this be related to them using their own custom DTD (I do not think so but ...) ?
Could you shed some light on the way transtypes and transformation works inside Oxygen?
Thanks a lot,
I am not sure I fully understand how DITA OT transformation scenarios are working.
I have a client using 10 custom plugins (custom dtd, several for PDFs and for HTML5 output).
They have a custom plugin named something like com.customer.html5 and a custom transtype for HTML5, and when selecting this one, it is expected that their customizations do apply.
However, when selecting the DITA OT 3.3.4 default HTML5 transformation scenario , several of their customizations do still apply, while in my understanding it should output "vanilla" HTML5.
Furthermore, modifying one of their XSL inside the client HTML5 plugin has a direct impact when using default HTML5 transformation scenario, which I don't get either.
Could this be related to them using their own custom DTD (I do not think so but ...) ?
Could you shed some light on the way transtypes and transformation works inside Oxygen?
Thanks a lot,
-
- Posts: 9436
- Joined: Fri Jul 09, 2004 5:18 pm
Re: DITA OT transformation scenarios in Oxygen
Hi,
It depends on what extension points that custom plugin implements in its "plugin.xml" configuration file. Maybe you can paste here in a code block the entire contents of the custom plugin's plugin.xml.
For example this plugin:
https://github.com/oxygenxml/dita-media ... plugin.xml
implements this extension point:
meaning that it will be applied for the HTML5 transformation and for any other transformation which extends it.
All DITA Open Toolkit plugin extension points are documented here:
https://www.dita-ot.org/dev/extension-p ... oints.html
Regards,
Radu
It depends on what extension points that custom plugin implements in its "plugin.xml" configuration file. Maybe you can paste here in a code block the entire contents of the custom plugin's plugin.xml.
For example this plugin:
https://github.com/oxygenxml/dita-media ... plugin.xml
implements this extension point:
Code: Select all
<feature extension="dita.xsl.html5" value="xhtmlMedia.xsl" type="file"/>
All DITA Open Toolkit plugin extension points are documented here:
https://www.dita-ot.org/dev/extension-p ... oints.html
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 4
- Joined: Fri Mar 04, 2022 11:23 am
Re: DITA OT transformation scenarios in Oxygen
Hi Radu,
Thank you for your feedback.
The plugin.xml is the following:
Thank you for your feedback.
The plugin.xml is the following:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<?xml-model href="dita-ot/plugin.rnc" type="application/relax-ng-compact-syntax"?>
<plugin id="com.customer.html5">
<transtype name="customer-html5" extends="html5" desc="Customer HTML5 output"/>
<feature extension="ant.import" file="build_dita2customer-html5.xml"/>
<feature extension="dita.xsl.html5" file="xsl/dita2customer-html5.xsl"/>
</plugin>
-
- Posts: 9436
- Joined: Fri Jul 09, 2004 5:18 pm
Re: DITA OT transformation scenarios in Oxygen
Hi,
So as I mentioned, this extension point implementation in the custom plugin.xml:
is applied to the base HTML5 plugin and to any plugin extending the base HTML5 plugin. So it affects any plain DITA to HTML5 publishing.
Regards,
Radu
So as I mentioned, this extension point implementation in the custom plugin.xml:
Code: Select all
<feature extension="dita.xsl.html5" file="xsl/dita2customer-html5.xsl"/>
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 4
- Joined: Fri Mar 04, 2022 11:23 am
Re: DITA OT transformation scenarios in Oxygen
Thank you Radu, that is much more clear.
Then my question is, in that case what purpose does the Transtype serve if the extension points is affecting even the base HTML5 scenario ?
In the case of my client, do not see differences between the 2 output scenarios (default HTML5 and customer HTML5) for the same map.
Then my question is, in that case what purpose does the Transtype serve if the extension points is affecting even the base HTML5 scenario ?
In the case of my client, do not see differences between the 2 output scenarios (default HTML5 and customer HTML5) for the same map.
-
- Posts: 105
- Joined: Thu Jan 20, 2022 12:36 pm
Re: DITA OT transformation scenarios in Oxygen
Hi Radu!
Let me jump in because I'm interested in this question too.
When selecting a standard HTML5 transformation scenario in Oxygen, is there any way to get an output not affected by the declarations that were made in a custom HTML5 plugin? Because what I understand now is that the custom HTML5 plugin is reliant on the baseHTML5 plugin. That's fine.
However, I don't get why the base HTML5 plugin is reliant on the custom HTML5 plugin when selecting a standard HTML5 scenario.
Let me jump in because I'm interested in this question too.
When selecting a standard HTML5 transformation scenario in Oxygen, is there any way to get an output not affected by the declarations that were made in a custom HTML5 plugin? Because what I understand now is that the custom HTML5 plugin is reliant on the baseHTML5 plugin. That's fine.
However, I don't get why the base HTML5 plugin is reliant on the custom HTML5 plugin when selecting a standard HTML5 scenario.
------
Gaspard
Gaspard
-
- Posts: 922
- Joined: Thu May 02, 2019 2:32 pm
Re: DITA OT transformation scenarios in Oxygen
Post by chrispitude »
Hi gbv34, Gahr,
When a custom plugin makes use of DITA-OT HTML5 extension points:
https://www.dita-ot.org/3.7/extension-p ... html5.html
then the XSLT/parameter files for that plugin are literally installed into the DITA-OT processing files themselves. For example, if you look in your DITA-OT directory, you will see these two files:
The "template" version of the file is not actually used for processing. Instead, it contains this line:
which is a placeholder for where plugin-provided XSLT files are included. The non-"template" version of the file is the one actually used for DITA-OT processing, and it has the placeholder replaced with includes of the actual XSLT files contributed by custom plugins for that extension point:
This placeholder replacement is done by the dita install command. Other DITA-OT extension points (preprocessing, other transformation types, etc.) work similarly with their own "template"/actual file pairs.
So plugins don't really turn on and off; instead, their files are statically incorporated into whatever DITA-OT processing files are indicated by the extension points.
Although plugins are statically installed into the DITA-OT processing files, they can still turn their functionality on and off by looking at parameters, defining their own transformation types, and other similar mechanisms.
When a custom plugin makes use of DITA-OT HTML5 extension points:
https://www.dita-ot.org/3.7/extension-p ... html5.html
then the XSLT/parameter files for that plugin are literally installed into the DITA-OT processing files themselves. For example, if you look in your DITA-OT directory, you will see these two files:
Code: Select all
<DITA-OT>/plugins/org.dita.html5/xsl/dita2html5Impl_template.xsl
<DITA-OT>/plugins/org.dita.html5/xsl/dita2html5Impl.xsl
Code: Select all
<dita:extension id="dita.xsl.html5"
behavior="org.dita.dost.platform.ImportXSLAction"
xmlns:dita="http://dita-ot.sourceforge.net"/>
Code: Select all
<xsl:import href="plugin:com.synopsys.html5:html5.xsl"/>
So plugins don't really turn on and off; instead, their files are statically incorporated into whatever DITA-OT processing files are indicated by the extension points.
Although plugins are statically installed into the DITA-OT processing files, they can still turn their functionality on and off by looking at parameters, defining their own transformation types, and other similar mechanisms.
-
- Posts: 9436
- Joined: Fri Jul 09, 2004 5:18 pm
Re: DITA OT transformation scenarios in Oxygen
Hi,
About the last posed questions:
You need to remove this line from it:
Then inside your custom build_dita2customer-html5.xml build file you need to do something like what's done in this plugin:
https://github.com/dita-ot/org.dita-ot.html/
It has an XSLT stylesheet which imports the base HTML5 xslt stylesheet:
https://github.com/dita-ot/org.dita-ot. ... a2html.xsl
and in the build file it defines an args.xsl parameter which points to its own XSLT stylesheet:
https://github.com/dita-ot/org.dita-ot. ... t.html.xml
Regards,
Radu
About the last posed questions:
I think Chris' answer covers this, plugins are not isolated, an extension point implemented by a plugin influences all other plugins which use it.However, I don't get why the base HTML5 plugin is reliant on the custom HTML5 plugin when selecting a standard HTML5 scenario.
Yes, sure, so your plugin.xml looks like this:When selecting a standard HTML5 transformation scenario in Oxygen, is there any way to get an output not affected by the declarations that were made in a custom HTML5 plugin?
Code: Select all
<plugin id="com.customer.html5">
<transtype name="customer-html5" extends="html5" desc="Customer HTML5 output"/>
<feature extension="ant.import" file="build_dita2customer-html5.xml"/>
<feature extension="dita.xsl.html5" file="xsl/dita2customer-html5.xsl"/>
</plugin>
Code: Select all
<feature extension="dita.xsl.html5" file="xsl/dita2customer-html5.xsl"/>
https://github.com/dita-ot/org.dita-ot.html/
It has an XSLT stylesheet which imports the base HTML5 xslt stylesheet:
https://github.com/dita-ot/org.dita-ot. ... a2html.xsl
and in the build file it defines an args.xsl parameter which points to its own XSLT stylesheet:
https://github.com/dita-ot/org.dita-ot. ... t.html.xml
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