New "dita" command doesn't seem to work with RNG files

38 views
Skip to first unread message

Frank Ralf

unread,
Sep 10, 2015, 9:30:45 AM9/10/15
to DITA-OT Development
Hi,

I'm using DITA-OT 2.0.1 with added RNG support. Running a PDF transformation on the demo files that come with dita-ng works when using Ant but not with the new "dita" command.

Ant - does work
ant -f build.xml -Dargs.input=plugins/org.dita-ng.doctypes/demo/flowers/flowers.ditamap -Doutput.dir=plugins/org.dita-ng.doctypes/demo/flowers/out -Dtranstype=pdf

dita command - doesn't work
c:\DITA-OT2.0.1\bin\dita -f pdf -i plugins\org.dita-ng.doctypes\demo\flowers\flowers.ditamap -o plugins/org.dita-ng.doctypes/demo/flowers/out

I get the following error message:

Error:
Failed to run pipeline:
[DOTJ012F][FATAL] Failed to parse the input file 'file:/c:/DITA-OT2.0.1/plugins/org.dita-ng.doctypes/demo/flowers/flowers.ditamap'.:
file:/c:/DITA-OT2.0.1/plugins/org.dita-ng.doctypes/demo/flowers/flowers.
ditamap Line 4:cvc-elt.1.a: Cannot find the declaration of element 'map'.


Is this some misconfiguration on my side or a bug of the DITA-OT?

Kind regards,
Frank

Frank Ralf

unread,
Sep 10, 2015, 9:32:16 AM9/10/15
to DITA-OT Development
I'm using Windows 7 SP1, 64 bit.

Radu Coravu

unread,
Sep 10, 2015, 9:37:32 AM9/10/15
to Frank Ralf, DITA-OT Development
Hi Frank,

I think there is an issue already opened for this:

https://github.com/dita-ot/dita-ot/issues/2019

For the ANT transformation, you also added extra JARs and the extra system property pointing to that special Xerces preparser which knows how to read the Relax NG processing instructions and provide default attributes, right?

Regards,
Radu

On Thu, Sep 10, 2015 at 4:32 PM, Frank Ralf <frank...@gmx.de> wrote:
I'm using Windows 7 SP1, 64 bit.

--
You received this message because you are subscribed to the Google Groups "DITA-OT Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dita-ot-dev...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Frank Ralf

unread,
Sep 10, 2015, 11:52:33 AM9/10/15
to DITA-OT Development, frank...@gmx.de
Hi Radu,

Thanks for your quick reply. I added the extra JARs to startcmd.bat as per George's instructions. I run startcmd.bat and then enter the Ant command (ant -f build.xml -Dargs.input=plugins/org.dita-ng.doctypes/demo/flowers/flowers.ditamap -Doutput.dir=plugins/org.dita-ng.doctypes/demo/flowers/out -Dtranstype=pdf) in the newly opened console. That works.

I will have look at that issue on GitHub.

Kind regards,
Frank

Kendall Shaw

unread,
Sep 10, 2015, 12:55:17 PM9/10/15
to DITA-OT Development
I have not been setting the system property while using dita-ng. My impression is that the system property is no longer needed (for xerces), at least in the dita-ng that was on googlecode. I guess that must have been done after the slides about dita-ng.

The parameter for Xerces is found in the service provider configuration file in dita-ng.jar:

META-INF/services/org.apache.xerces.xni.parser.XMLParserConfiguration

which contains:

org.ditang.relaxng.defaults.RelaxDefaultsParserConfiguration

As for using the dita command, one way to do this is to set classpath outside of dita to point at dita-ng.jar and jing.jar.

For example, these scripts:

Unix (bash):

export CLASSPATH=`pwd`/plugins/org.dita-ng.doctypes/lib/dita-ng.jar
export CLASSPATH=$CLASSPATH:`pwd`/plugins/org.dita-ng.doctypes/lib/jing.jar
bin/dita $@

Windows:

set CLASSPATH=%CD%\plugins\org.dita-ng.doctypes\lib\dita-ng.jar
set CLASSPATH=%CLASSPATH%:%CD%\plugins\org.dita-ng.doctypes\lib\jing.jar
bin/dita %*

Kendall

Frank Ralf

unread,
Sep 11, 2015, 3:23:52 AM9/11/15
to DITA-OT Development
Hi Kendall,

Thanks for this information!

Kind regards,
Frank
Reply all
Reply to author
Forward
0 new messages