DITA to text - which XSL transform ?

Here should go questions about transforming XML with XSLT and FOP.
Posts: 2

DITA to text - which XSL transform ?

Tue Aug 26, 2014 11:06 pm

This seems like such an obvious question, but I've scoured the oXygen forums, googled, scoured the ePublisher/WebWorks forums, but... I still cannot find a transform for DITA to TXT.

Does such a thing exist?

Here's my setup:
* <oXygen/> XML Author 15.1, build 2013110816.
* Antenna House FO processor.
* ePublisher 2013.3.
* PDF output to date, but looking to add TXT output (for Release Notes, for example).
* Using bookmaps (not ditamaps).

I found an old topic in the oXygen forums, topic1753.html, but it is for DocBook, so irrelevant. (I tried to use it, and the root element of my bookmap, or even ditamap, is incorrect for the indicated transform.)

I'm happy to purchase one; it certainly doesn't need to be freeware. But I do not want to have to write my own XSLT, despite the many resources that seem to say that that's required. I'm open to engaging a consultant to write a custom XSLT, but it seems like it should be unnecessary.

I did try using the RTF transform that's available with DITA OT and then, from Word, saving as TXT. But the result is *really* plain text, and hard to glean any sort of a structure from it.

What I'm really looking for is something along the following lines:

* Heading 1 might map to a style that is numbered and has double-dashed lines above and below:

1.0 Overview

* Heading 2 might have single dashed lines above and below:


* Lower-level headings (which should be rare) might have single dashed lines below:

Lower-Level Heading

* And list styles would use the asterisk instead of a bullet symbol and indentation:

* list item 1
* list item 2

Thanks very much!
Posts: 4144

Re: DITA to text - which XSL transform ?

Wed Aug 27, 2014 1:05 pm

Hello Monique,

I could not find an easy solution for text output that keeps some structure like tables and sections. The default DITA transformations don't offer that as you could find yourself and some alternatives like copying formatted content directly from Oxygen Author editing mode and pasting that content in a Word application (Microsoft Word or OpenOffice document) don't keep the structure either.

msemp wrote:* PDF output to date, but looking to add TXT output (for Release Notes, for example).

If you just want to extract some content (not the entire content of all DITA topics from a map or bookmap) and output it in text mode as a highlight/summary note about the content in that map, I think you should create a custom XSLT stylesheet (or hire someone who can do that) that processes the input map and extract exactly the content that you want. I could not find any shortcut that works around that.

Posts: 24

Re: DITA to text - which XSL transform ?

Wed Jul 13, 2016 6:29 pm

I know this is an older thread, I just wanted to mention [Elovirt's markdown plugin](https://github.com/jelovirt/dita-ot-markdown). It can do DITA-to-markdown, which sounds like roughly what the OP was asking for.

Return to “XSLT and FOP”

Who is online

Users browsing this forum: No registered users and 3 guests