Page 1 of 1

DITA->text transform, leading spaces on every line

Posted: Thu Feb 25, 2016 5:37 am
by GreatBigBore
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?

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

Posted: Thu Feb 25, 2016 10:03 am
by Radu
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

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

Posted: Sat Feb 27, 2016 4:06 am
by GreatBigBore
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.

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

Posted: Mon Feb 29, 2016 9:42 am
by Radu
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/dit ... pics/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/ ... ta-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

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

Posted: Mon Feb 29, 2016 10:22 am
by GreatBigBore
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.

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

Posted: Mon Feb 29, 2016 11:25 am
by Radu
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/do ... ?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