How I can copy-paste an Exce table to Oxygen Author ?

Post here questions and problems related to oXygen frameworks/document types.
sebastienlavandier
Posts: 124
Joined: Tue May 29, 2012 5:42 pm

How I can copy-paste an Exce table to Oxygen Author ?

Post 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
Radu
Posts: 9057
Joined: Fri Jul 09, 2004 5:18 pm

Re: How I can copy-paste an Exce table to Oxygen Author ?

Post 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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
sebastienlavandier
Posts: 124
Joined: Tue May 29, 2012 5:42 pm

Re: How I can copy-paste an Exce table to Oxygen Author ?

Post by sebastienlavandier »

Hello Radu,
Thanks you very much for your answer. That work very well !

Best Regards.
Post Reply