Page 1 of 1

Embed a Excel sheet or text file in XML DITA topics.

Posted: Tue May 08, 2018 1:50 pm
by Sreeram891
Hello,

I am currently working for a project where i am converting MS Word docs to XML using Oxygen XML Author.

I came across a Word file which has multiple attachments (.xls, .txt, .sql etc.,). Those are necessary attachments as it refers to a task for which reference to the attachments is given.

My question is can we embed those files in XML instead of sharing those with customer as .zip files. I am not finding any option to do the same.


BR,
Sreeram

Re: Embed a Excel sheet or text file in XML DITA topics.

Posted: Wed May 09, 2018 7:49 am
by Radu
Hi Sreeram,

Usually when working with XML, the XML contains the text content and tagging and any other non-XML resources are placed as separate files and referenced from the XML.
An alternative is to embed resources in XML as base-64 encoded but the XML will become bloated and will not be very readable anymore.
When working with the XML in the Text editing mode, there are contextual actions to base 64 encode or decode content:

https://www.oxygenxml.com/doc/versions/ ... odes2.html

Regards,
Radu

Re: Embed a Excel sheet or text file in XML DITA topics.

Posted: Wed May 09, 2018 10:28 am
by Sreeram891
Thank You Radu for quick Response!!

Just a small query. For example,

If i share the files as a separate folder, is there any option that we make it clickable instead of just inserting a text that states "Refer to XXXX.xls for quick reference". As we click the link and the file opens from the folder downloaded which contains all the attachments.

What i mean is can we insert a link as we do it if we refer to a web page or cross reference to another topic? Because, if the separate folder contains multiple files and it may confuse the end user or it might take some time to download all the attachments and locate the file that is being referred.

I am just looking for possibilities.


BR,
Sreeram

Re: Embed a Excel sheet or text file in XML DITA topics.

Posted: Wed May 09, 2018 10:44 am
by Radu
Hi Sreeram,

Sure, in a DITA topic you can insert links also to non-DITA resources like PDFs or Excel files.
Such links look like this:

Code: Select all

<xref href="test.xslx" format="xslx"/>
If you edit the DITA topic in the Oxygen Author visual editing mode, there is a drop-down link toolbar button which allows you to add a "File reference..." and should insert the construct I suggested above.

Regards,
Radu

Re: Embed a Excel sheet or text file in XML DITA topics.

Posted: Wed May 09, 2018 12:29 pm
by Sreeram891
Many thanks Radu..

I will try with the solution you provided. I will get in touch with you if i face any issues.