Open Office XML for dita topic
Are you missing a feature? Request its implementation here.
-
- Posts: 91
- Joined: Tue Jul 17, 2018 6:57 am
Open Office XML for dita topic
Post by msambasiva »
Hi,
We are using XML Editor 21.0, build 2019022207. We have a requirement to have a plugin to support draft print of dita topic to dox. As of now, we found plugin 'com.elovirta.ooxml' to draft print a map to Open Office XML docx. Please suggest if there is any workaround to draft print a topic to docx. Also please suggest if there is any plugin which I can extend to generate docx output.
Thanks,
Samba.
We are using XML Editor 21.0, build 2019022207. We have a requirement to have a plugin to support draft print of dita topic to dox. As of now, we found plugin 'com.elovirta.ooxml' to draft print a map to Open Office XML docx. Please suggest if there is any workaround to draft print a topic to docx. Also please suggest if there is any plugin which I can extend to generate docx output.
Thanks,
Samba.
-
- Posts: 9421
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Open Office XML for dita topic
Dear Samba,
Right now the DITA to Word publishing does not work for topics, I added an issue based on your request on the project's Github issues list:
https://github.com/jelovirt/com.elovirt ... /issues/66
The particular DITA OT plugin which does the DITA to Word publishing is located in OXYGEN_INSTALL_DIR\frameworks\dita\DITA-OT3.x\plugins\com.elovirta.ooxml.
And it has a small tutorial about extending it:
https://github.com/jelovirt/com.elovirt ... /Extending
Regards,
Radu
Right now the DITA to Word publishing does not work for topics, I added an issue based on your request on the project's Github issues list:
https://github.com/jelovirt/com.elovirt ... /issues/66
The particular DITA OT plugin which does the DITA to Word publishing is located in OXYGEN_INSTALL_DIR\frameworks\dita\DITA-OT3.x\plugins\com.elovirta.ooxml.
And it has a small tutorial about extending it:
https://github.com/jelovirt/com.elovirt ... /Extending
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 91
- Joined: Tue Jul 17, 2018 6:57 am
Re: Open Office XML for dita topic
Post by msambasiva »
Hi Radu,
Thank you so much for raising an issue for me. Extending an existing plugin com.elovirta.ooxml might not help in converting DITA topic to docx. May I expect ETA on this issue?
Thanks,
Samba.
Thank you so much for raising an issue for me. Extending an existing plugin com.elovirta.ooxml might not help in converting DITA topic to docx. May I expect ETA on this issue?
Thanks,
Samba.
-
- Posts: 9421
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Open Office XML for dita topic
Hi Samba,
Sorry but I cannot give you a time estimate on this. It's a third party library integrated in Oxygen. Also the use case that you have, of producing a Word document for each topic seems to be quite rare.
Regards,
Radu
Sorry but I cannot give you a time estimate on this. It's a third party library integrated in Oxygen. Also the use case that you have, of producing a Word document for each topic seems to be quite rare.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 91
- Joined: Tue Jul 17, 2018 6:57 am
Re: Open Office XML for dita topic
Post by msambasiva »
Hi,
When I open a dita topic from OXygen Editor 21 and try to configure a transformation, found below three scenarios, DITA PDF, DITA XHTML, DITA HTML5. Could you suggest the plugin name used for DITA PDF option?
I want to check if I can extend the plugin used for DITA PDF in my custom plugin and write OpenOffice XML code to generate docx output for a topic.
Thanks,
Samba.
When I open a dita topic from OXygen Editor 21 and try to configure a transformation, found below three scenarios, DITA PDF, DITA XHTML, DITA HTML5. Could you suggest the plugin name used for DITA PDF option?
I want to check if I can extend the plugin used for DITA PDF in my custom plugin and write OpenOffice XML code to generate docx output for a topic.
Thanks,
Samba.
-
- Posts: 9421
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Open Office XML for dita topic
Hi Samba,
The build.xml for the DITA to PDF plugin is this one:
OXYGEN_INSTALL_DIR\frameworks\dita\DITA-OT3.x\plugins\org.dita.pdf2\build.xml
You can look inside it, it has a target named "topic2pdf2" which gets executed only if the "noMap" parameter has been set in the base build files.
Another option for you would be to have a custom script or build file which automatically creates a DITA Map, refers in it the current topic and then continues the publishing on this temporary DITA Map.
Regards,
Radu
The build.xml for the DITA to PDF plugin is this one:
OXYGEN_INSTALL_DIR\frameworks\dita\DITA-OT3.x\plugins\org.dita.pdf2\build.xml
You can look inside it, it has a target named "topic2pdf2" which gets executed only if the "noMap" parameter has been set in the base build files.
Another option for you would be to have a custom script or build file which automatically creates a DITA Map, refers in it the current topic and then continues the publishing on this temporary DITA Map.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 91
- Joined: Tue Jul 17, 2018 6:57 am
Re: Open Office XML for dita topic
Post by msambasiva »
Hi Radu,
It's been long time once again got a chance to revisit this topic.
Iam trying with second option i.e custom script or build file which automatically creates a DITA Map, refers in it the current topic and then continues the publishing on this temporary DITA Map.
I can able to create a dita map programaticaly some thing as below using <xslt> task,
Thanks,
Samba.
It's been long time once again got a chance to revisit this topic.
Iam trying with second option i.e custom script or build file which automatically creates a DITA Map, refers in it the current topic and then continues the publishing on this temporary DITA Map.
I can able to create a dita map programaticaly some thing as below using <xslt> task,
But when I try to echo the args.input, it's still pointing to dita topic but not map. Please suggest the best way to set the args.input value to custom dynamic map.<project name="uae.dita.topicdocx">
<target name="dita2topicdocxOHC"
depends="dita2topicdocxOHC.init,
dita2docx"/>
<target name="dita2topicdocxOHC.init">
<xslt in="temp.xml" out="${args.input.dir}${file.separator}custom_map.ditamap" style="${dita.plugin.uae.dita.topicdocx.dir}${file.separator}docx${file.separator}word${file.separator}build_ditamap.xsl">
</xslt>
<property name="args.input" location="${args.input.dir}${file.separator}custom_map.ditamap"/>
Thanks,
Samba.
-
- Posts: 91
- Joined: Tue Jul 17, 2018 6:57 am
Re: Open Office XML for dita topic
Post by msambasiva »
Hi,
Able to print the value of
[echo] ** args.input= D:\PROJECTS\Oxygen_draft_printing\topic2docx\testing\preface.ditamap
[echo] ** args.input.dir= ${args.input.dir}
Please suggest any clue on this.
Thanks,
Samba.
Able to print the value of
but notargs.input
. . Below is console message,args.input.dir
[echo] ** args.input= D:\PROJECTS\Oxygen_draft_printing\topic2docx\testing\preface.ditamap
[echo] ** args.input.dir= ${args.input.dir}
Please suggest any clue on this.
Thanks,
Samba.
-
- Posts: 9421
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Open Office XML for dita topic
Hi Samba,
Usually with ANT property values are immutable, once a property has a value, you will not be able to change it.
One hack to change the value of a property would be to use some Javascript code in the ANT build file:
https://stackoverflow.com/questions/186 ... rty-in-ant
like this example you will find there:
Another solution might be to create a custom ANT build file separate from the DITA OT build files, in that custom ANT build file create the DITA Map, then from it use the <exec> task to start the DITA OT giving it various parameters. So you would be no longer work from inside a DITA OT plugin.
Regards,
Radu
Usually with ANT property values are immutable, once a property has a value, you will not be able to change it.
One hack to change the value of a property would be to use some Javascript code in the ANT build file:
https://stackoverflow.com/questions/186 ... rty-in-ant
like this example you will find there:
Code: Select all
<scriptdef name="propertyreset" language="javascript"
description="Allows to assign @{property} new value">
<attribute name="name"/>
<attribute name="value"/>
project.setProperty(attributes.get("name"), attributes.get("value"));
</scriptdef>
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 91
- Joined: Tue Jul 17, 2018 6:57 am
Re: Open Office XML for dita topic
Post by msambasiva »
Thanks Radu.
I can't able to reset the args.input parameter value. Below is the corresponding code & console log,
Thanks,
Samba.
I can't able to reset the args.input parameter value. Below is the corresponding code & console log,
<target name="dita2topicdocxOHC.init">
<propertyreset name="args.input" location="${input.dir}\custom_map.ditamap"/>
<propertyreset name="temp" location="${input.dir}\custom_map.ditamap"/>
<echo level="info">** temp = ${arg.temp}</echo>
<echo level="info">** args.input = ${args.input}</echo>
</target>
<scriptdef name="propertyreset" language="javascript"
description="Allows to assign @{property} new value">
<attribute name="name"/>
<attribute name="location"/>
project.setProperty(attributes.get("name"), attributes.get("location"));
<![CDATA[
self.log("From propertyreset");
self.log("name = " + attributes.get("name"));
self.log("location = " + attributes.get("location"));
]]>
</scriptdef>
Please suggest any clue.dita2topicdocxOHC.init:
[propertyreset] From propertyreset
[propertyreset] name = args.input
[propertyreset] location = D:\PROJECTS\Oxygen_draft_printing\topic2docx\testing\custom_map.ditamap
[propertyreset] From propertyreset
[propertyreset] name = temp
[propertyreset] location = D:\PROJECTS\Oxygen_draft_printing\topic2docx\testing\custom_map.ditamap
[echo] ** temp = D:\PROJECTS\Oxygen_draft_printing\topic2docx\testing\custom_map.ditamap
[echo] ** args.input = D:\PROJECTS\Oxygen_draft_printing\topic2docx\testing\preface.ditamap
Thanks,
Samba.
-
- Posts: 9421
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Open Office XML for dita topic
Hi Samba,
Can you try:
instead of "setProperty"?
Regards,
Radu
Can you try:
Code: Select all
project.setUserProperty('args.input', ....);
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 91
- Joined: Tue Jul 17, 2018 6:57 am
Re: Open Office XML for dita topic
Post by msambasiva »
Thanks Radu. Its working with project.setUserProperty('args.input', ....);
Some how I cant able to create temp folder under DITA OT of Oxygen. Is it ok if we create temp folder some thing below using ENV variable. Pls suggest if there is a best option to create temp directory on Windows using build script.
Samba.
Some how I cant able to create temp folder under DITA OT of Oxygen. Is it ok if we create temp folder some thing below using ENV variable. Pls suggest if there is a best option to create temp directory on Windows using build script.
Thanks,<temppropertyset name="temp.dir"/>
<property name="dita.temp.dir" location="${temp.dir}${file.separator}temp${file.separator}temp${current.date}"/>
<mkdir dir="${dita.temp.dir}"/>
<scriptdef name="temppropertyset" language="javascript"
description="Allows to assign @{property} new value">
<attribute name="name"/>
var temp = java.lang.System.getenv('temp');
project.setUserProperty(attributes.get("name"), temp);
<![CDATA[
self.log("From temppropertyset");
self.log("name = " + attributes.get("name"));
self.log("temp = " + temp);
]]>
</scriptdef>
Samba.
-
- Posts: 9421
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Open Office XML for dita topic
Hi Samba,
Oxygen's bundled DITA OT is usually in the program files folder and an external process cannot make changes inside the program files folder unless it is run with admin privileges.
So you took the right approach to create a temp files folder in a place where you have full read-write access. You could have created one even in the folder where the original published DITA topic was located.
Regards,
Radu
Oxygen's bundled DITA OT is usually in the program files folder and an external process cannot make changes inside the program files folder unless it is run with admin privileges.
So you took the right approach to create a temp files folder in a place where you have full read-write access. You could have created one even in the folder where the original published DITA topic was located.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 91
- Joined: Tue Jul 17, 2018 6:57 am
Re: Open Office XML for dita topic
Post by msambasiva »
Thanks Radu!
Its working fine. Able to draft print a topic to word output. It's really great help!!
Its working fine. Able to draft print a topic to word output. It's really great help!!
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