I made ANT target to handle a ditamap (read and write content into a
new ditamap), but it stops with an error under a very specific
condition.
When the original ditamap does not have the <!DOCTYPE map PUBLIC '-//OASIS//DTD DITA Map//EN' 'map.dtd'> declaration, everything runs perfect, but when it is there, my ANT target stops: it resolves badly the dtd filepath. /home/folderpath_to_the_ditamap/map.dtd (No such file or directory)
The file path should be: /home/folderpath_to_ditaot/plugins/org.dita.specialization.dita11/map.dtd
I
tried many things following comments I found in the web, but none of
them works. I understand that I should add an instruction to find that
map.dtd, but I didn't find anything that work.
I searched in the other plugins how they set the catalog or definition files, but I didn't found what I need.
Someone knows which parameter or ANT variable I could set to help the resolver?
The error message I get:
mynameplugin.preprocessing:
[xslt] Processing /home/folderpath_to_the_ditamap/A_Ditamap_Name.ditamap to /home/folderpath_to_the_ditamap/temp_A_Ditamap_Name.ditamap
[xslt] Loading stylesheet /home/folderpath_to_ditaot/plugins/org.myname.mynameplugin/xsl/map_topichead_title.xsl
[xslt] : Error! I/O error reported by XML parser processing file:/home/folderpath_to_the_ditamap/A_Ditamap_Name.ditamap: /home/folderpath_to_the_ditamap/map.dtd (No such file or directory) Cause: java.io.FileNotFoundException: /home/folderpath_to_the_ditamap/map.dtd (No such file or directory)
[xslt] Failed to process /home/folderpath_to_the_ditamap/A Ditamap Name.ditamap
Error: net.sf.saxon.trans.XPathException: I/O error reported by XML parser processing file:/home/folderpath_to_the_ditamap/A_Ditamap_Name.ditamap: /home/folderpath_to_the_ditamap/map.dtd (No such file or directory)