Page 1 of 1

DocBook files to TXT

Posted: Sat Jun 28, 2014 12:33 am
by krosenkranz
Hey there,

I have some simple content (no tables, no figures) in DocBook that I currently transform to PDF.

Now, I have a requirement to transform to a plain text file, as well.

Any pointers for doing this in Oxygen 16 using transformation scenarios?

(I've found a few comments about doing this, but mostly very old comments.)


Re: DocBook files to TXT

Posted: Mon Jun 30, 2014 10:49 am
by sorin_ristache

You could copy all visible content in Author mode (Ctrl+A in Author mode for Select All and Ctrl+C for Copy), create a new file of TEXT type (Ctrl+N, type "text" in the New dialog) and paste the copied content in the TEXT file (Ctrl+V for Paste). This copy and paste operation will remove all XML tags and keep only the text content of the DocBook XML document.

I think this is almost the same as running the following XSLT stylesheet over the DocBook XML document:

Code: Select all

<xsl:stylesheet xmlns:xsl="" version="1.0">
<xsl:template match="text()[string-length(normalize-space()) = 0]">

<xsl:template match="@*"/>


Re: DocBook files to TXT

Posted: Mon Jun 30, 2014 6:55 pm
by krosenkranz
Thank you, Sorin!

Nice and simple, and does exactly what I want.


Re: DocBook files to TXT

Posted: Wed Jun 26, 2019 8:44 am
by RandyBonnette

Is it possible to generate pdf from DocBook 5.0? Also: how can I perform this action with Oxygen 18.1: Associating a File Extension with Oxygen XML Developer?

Re: DocBook files to TXT

Posted: Wed Jun 26, 2019 9:42 am
by Radu

Ideally you should have started another discussion thread as your post does not seem to be on topic with the current thread plus the curent thread is 4 years old.
You can open a DocBook 5 document in Oxygen, use the "Configure Transformation Scenarios" toolbar button and there should be a DocBook to PDF transformation scenario available.
About the file association question, the installer should ask you at some point during the installation procedure if you want to associate the "xml" extension with Oxygen. Otherwise you can right click in Windows Explorer on the file, choose "Properties", "Opens with..." and you can select the application to open it with.