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

B-E-N
Posts: 122
Joined: Thu Mar 24, 2016 5:54 pm

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

Post by B-E-N » Tue Aug 02, 2016 5:40 pm

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: 348
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 » Wed Aug 03, 2016 11:57 am

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

B-E-N
Posts: 122
Joined: Thu Mar 24, 2016 5:54 pm

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

Post by B-E-N » Wed Aug 03, 2016 1:24 pm

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: 6506
Joined: Fri Jul 09, 2004 5:18 pm

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

Post by Radu » Wed Aug 03, 2016 1:58 pm

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

B-E-N
Posts: 122
Joined: Thu Mar 24, 2016 5:54 pm

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

Post by B-E-N » Wed Aug 03, 2016 2:45 pm

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: 6506
Joined: Fri Jul 09, 2004 5:18 pm

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

Post by Radu » Fri Aug 05, 2016 10:23 am

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

B-E-N
Posts: 122
Joined: Thu Mar 24, 2016 5:54 pm

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

Post by B-E-N » Mon Aug 08, 2016 2:51 pm

Thank you, much appreciated.

Post Reply