Page 1 of 1

Transformation fails - "Cannot find declaration of the element 'map'"

Posted: Tue Aug 02, 2016 5:40 pm
by Anonymous1
We want to have nightly automated PDF and WebHelp builds on our server. Until now there were quite a few obstacles to overcome. However, now I am stuck with the following error message:

Command: dita.bat -i <ditamap file> -f pdf

Output error: Failed to run pipeline: [DOTJ012F][FATAL] Failed to parse the input file '<ditamap file>.: file:<ditamap file> Line 4:cvc-elt.1.a: Cannot find the declaration of element 'map'.

We are using a customized FrameWork, but I don't think we've changed anything about the "declaration" of the "map" element.

Can somebody point me in the right direction?

Re: Transformation fails - "Cannot find declaration of the element 'map'"

Posted: Wed Aug 03, 2016 11:57 am
by radu_pisoi
Hi,

This message is usually reported when the specified DITA map uses elements which are not allowed. This might happen when you are using a specialized DITA document type that needs external DTD specialization plug-ins in order to be parsed correctly.

Is it your case? Are you using specializations in your DITA document? Could you share with us the the DITA map content? What DITA-OT version you are using?

Re: Transformation fails - "Cannot find declaration of the element 'map'"

Posted: Wed Aug 03, 2016 1:24 pm
by Anonymous1
We are using specialization, yes. We've narrowed down the element set to only display the elements we need in Oxygen. We've not added any new elements.

DITA-OT version 2.0.1

Our maps look like this:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<?xml-model href="urn:bla:dita:rng:bla_map.rng" schematypens="http://relaxng.org/ns/structure/1.0"?>
<?xml-model href="urn:bla:dita:rng:bla_map.rng" schematypens="http://purl.oclc.org/dsdl/schematron"?>
<map xml:lang="en-US">
<title>Introduction</title>
<topicref href="topics/introduction/bla_c.xml">
<topicref href="topics/introduction/blabla_c.xml">
<topicref href="topics/introduction/blablabla_c.xml"/>
</topicref>
</topicref>
</map>
You can see the specialized RNG files (I named them "bla"). Generating output via Oxygen works great with this. It's just the command line output that doesn't seem to like the specialization.

Re: Transformation fails - "Cannot find declaration of the element 'map'"

Posted: Wed Aug 03, 2016 1:58 pm
by Radu
Hi,

Unfortunately the DITA Open Toolkit 2.x does not have out of the box support for publishing Relax NG specializations.
There is an issue added for it:

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

There is a separate GitHub project:

https://github.com/georgebina/dita-ng

which can be used to build a JAR library called dita-ng.jar. Both this library and a Jing library jing.jar need to be added with high priority (first in the list) to the classpath used to start the DITA OT.
So probably the dita and dita.bat command line scripts would need to be modified to also refer to these libraries in their -classpath list.

Regards,
Radu

Re: Transformation fails - "Cannot find declaration of the element 'map'"

Posted: Wed Aug 03, 2016 2:45 pm
by Anonymous1
Oh, that's unfortunate indeed.

Thank you for making us aware of the RNG constraint and providing the links. We'll have a look at this.

Re: Transformation fails - "Cannot find declaration of the element 'map'"

Posted: Fri Aug 05, 2016 10:23 am
by Radu
Hi,

I created a DITA OT 2.x plugin which adds RNG specialization support to any DITA OT distribution:

https://github.com/oxygenxml/dita-relaxng-defaults

Regards,
Radu

Re: Transformation fails - "Cannot find declaration of the element 'map'"

Posted: Mon Aug 08, 2016 2:51 pm
by Anonymous1
Thank you, much appreciated.