Page 1 of 1
How I can copy-paste an Exce table to Oxygen Author ?
Posted: Thu Sep 06, 2012 5:22 pm
by sebastienlavandier
Hello,
In using the DITA framework, we can copy-paste a table from Excel (or other) in a xml document, and Oxygen create automaticaly the xml fragments to create a table with the datas.
How I can do the same thinks in my customized framework ?
Do you have an idea ?
Thanks in advance for your answer.
Sébastien
Re: How I can copy-paste an Exce table to Oxygen Author ?
Posted: Fri Sep 07, 2012 8:25 am
by Radu
Hi Sébastien,
Basically when copy/pasting content from MS Office, Excel, Open Office, these applications also set in the clipboard an XHTML content.
This content is taken by Oxygen and an XSLT stylesheet is applied over it in order to convert the content to various vocabularies.
I will describe how this works for DITA, the Java source code is available in the Author SDK:
1) The class
ro.sync.ecss.extensions.dita.DITAExtensionsBundle overrides the method:
Code: Select all
ro.sync.ecss.extensions.dita.DITAExtensionsBundle.createExternalObjectInsertionHandler()
and returns a
ro.sync.ecss.extensions.dita.DITAExternalObjectInsertionHandler
The DITAExternalObjectInsertionHandler overwrites the method
ro.sync.ecss.extensions.dita.DITAExternalObjectInsertionHandler.getImporterStylesheetFileName(AuthorAccess) and returns the name of the stylesheet which will be used to process.
If you edit the
DITA document type in the Oxygen Preferences->
Document Type Association page the
Classpath tab contains a reference to
${framework}/resources/. That is the place where the
xhtml2dita.xsl stylesheet is located:
OXYGEN_INSTALL_DIR\frameworks\dita\resources\xhtml2dita.xsl
Regards,
Radu
Re: How I can copy-paste an Exce table to Oxygen Author ?
Posted: Fri Sep 07, 2012 2:55 pm
by sebastienlavandier
Hello Radu,
Thanks you very much for your answer. That work very well !
Best Regards.