DITA to text - which XSL transform ?
Here should go questions about transforming XML with XSLT and FOP.
DITA to text - which XSL transform ?
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, http://www.oxygenxml.com/forum/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:
--------------------------------------------------
Requirements
--------------------------------------------------
* 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!
-Monique
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, http://www.oxygenxml.com/forum/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:
--------------------------------------------------
Requirements
--------------------------------------------------
* 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!
-Monique
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Re: DITA to text - which XSL transform ?
Post by sorin_ristache »
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.
Regards,
Sorin
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.
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.msemp wrote:* PDF output to date, but looking to add TXT output (for Release Notes, for example).
Regards,
Sorin
Re: DITA to text - which XSL transform ?
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.
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