DITA->text transform, leading spaces on every line

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

DITA->text transform, leading spaces on every line

Thu Feb 25, 2016 5:37 am

Apologies to all for continuing to ask noob questions, but once again, I can't find any information on this. I'm trying to transform my DITA XML to markdown text. My output always has two extra spaces at the beginning of every line. Is there a way to get rid of this? Also, the text output always has a <?xml... tag at the top. Can that be eliminated too?
Radu
Posts: 5380

Re: DITA->text transform, leading spaces on every line

Thu Feb 25, 2016 10:03 am

Hi,

There is already an open source plugin which works with DITA OT 2.x and produces Markdown from DITA:

https://github.com/jelovirt/dita-ot-markdown

and it does not have the problems you mentioned.
Probably the problem with your plugin is that the XSLT stylesheet would need to state that it outputs text:

Code: Select all

<xsl:output method="text"/>


Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
GreatBigBore
Posts: 4

Re: DITA->text transform, leading spaces on every line

Sat Feb 27, 2016 4:06 am

Thanks, but I hardly even know what "plugin" means. I've been writing my own xsl file. I had heard of the plugin you mentioned, but I couldn't get it installed. The build fails. But thanks for the advice.
Radu
Posts: 5380

Re: DITA->text transform, leading spaces on every line

Mon Feb 29, 2016 9:42 am

Hi,

Just for completion I will link this post to the thread you started on the DITA Users List:

https://groups.yahoo.com/neo/groups/dita-users/conversations/topics/39516

DITA OT 2.x requires Java 1.8 to be used for publishing. Oxygen is also a Java-based application but if you are running the DITA OT 2.x from outside Oxygen (from a console) indeed you would need the default Java installed on your platform to be 1.8.
To avoid using the command line you can also run a DITA OT transformation from Oxygen:

https://www.oxygenxml.com/doc/versions/17.0/ug-editor/#tasks/use-new-dita-ot.html

which by default will run the transformation using Oxygen's Java virtual machine.
All our Oxygen 17.1 default installation kits now come with Java 1.8 embedded. There is still a Mac OSX installation kit which comes with Java 1.6 but it is no longer the recommended installation kit for Mac OSX.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
GreatBigBore
Posts: 4

Re: DITA->text transform, leading spaces on every line

Mon Feb 29, 2016 10:22 am

Thanks so much for helping me. After I complained to you about the plugin, I went and bothered the owner of it, and he pointed me to the yahoo group. So you got the ball rolling, thanks.

Do I understand you correctly? My version of Oxygen for Mac is outdated? I just downloaded it like a month ago.
Radu
Posts: 5380

Re: DITA->text transform, leading spaces on every line

Mon Feb 29, 2016 11:25 am

Hi,

I was just saying that on our downloads page, for Mac OSX there are two possible kits to download:

https://www.oxygenxml.com/xml_editor/download_oxygenxml_editor.html?os=MacOSX

The first kit is with Java 1.8 included (and you can use that Oxygen installation to start the DITA OT 2.x process directly from Oxygen).
The second kit is without Java 1.8 and it will use the Java 1.6 installed on your platform.

The functionality of the two kits is identical but they come with different Java VM support.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

Return to “XSLT and FOP”

Who is online

Users browsing this forum: No registered users and 2 guests