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

Post here questions and problems related to editing and publishing DITA content.
Anonymous1

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

Post 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?
radu_pisoi
Posts: 403
Joined: Thu Aug 21, 2003 11:36 am
Location: Craiova
Contact:

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

Post 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?
Radu Pisoi
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Anonymous1

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

Post 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.
Radu
Posts: 9049
Joined: Fri Jul 09, 2004 5:18 pm

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

Post 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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Anonymous1

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

Post 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.
Radu
Posts: 9049
Joined: Fri Jul 09, 2004 5:18 pm

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

Post 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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Anonymous1

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

Post by Anonymous1 »

Thank you, much appreciated.
Post Reply