Dita catalog issue in ANT script

Post here questions and problems related to editing and publishing DITA content.
NicoAMP
Posts: 97
Joined: Tue Mar 06, 2018 2:07 pm
Contact:

Dita catalog issue in ANT script

Post by NicoAMP »

Hello,

During HTML5 output processing (dita-ot-3.6.1), I would like to preprocess ditamap.
So I create a specific plugin using depend.preprocess.pre extension point.

In a ANT script I use the following xslt pipeline:

Code: Select all

<pipeline>
            <xslt style="${dita.plugin.com.xxx.preprocess.dir}/xsl/MergeMap.xsl"
                in="${args.input}"
                out="${args.input}">
                <param name="vrm-version" expression="${vrm-version}"/>
                <param name="vrm-modification" expression="${vrm-modification}"/>
                <param name="pubprefix" expression="${pubprefix}"/>
                <xmlcatalog refid="ditaCatalog"/>	
            </xslt>
</pipeline>
But I get an error launching publication:

Code: Select all

[pipeline] Loading stylesheet C:\xxx\dita-ot-3.6.1\plugins\com.xxx.wh-preprocess\xsl\MergeMap.xsl
 [pipeline] Processing file:/C:/xxx/inputs/xxx.ditamap
 [pipeline] Recoverable error 
 [pipeline]   I/O error reported by XML parser processing
 [pipeline]   file:/C:/xxx/inputs/xxx.ditamap:
 [pipeline]   C:\xxx\inputs\map.dtd (The system cannot find the file specified)
 [pipeline] Failed to transform document: Failed to transform document: I/O error reported by XML parser processing file:/C:/xxx/inputs/xxx.ditamap: C:\xxx\inputs\map.dtd (The system cannot find the file specified)
It seems that the dita catalog is not taken in account. If I remove doctype in my ditamap it works!
For information it works well with dita-ot-3.5.x.

Any help will be appreciate. Thanks.

Nicolas
Nicolas Delobel
AmeXio
nicolas.delobel at group.amexio.net
Radu
Posts: 9059
Joined: Fri Jul 09, 2004 5:18 pm

Re: Dita catalog issue in ANT script

Post by Radu »

Hi Nicolas,

But "${args.input}" is the original DITA Map location, are you actually trying to use XSLT to modify the original published DITA Map? You would lose DOCTYPE declarations and also it's an unexpected side effect for the end user to publish and have the publishing engine modify their published DITA contents.
Maybe you should process the DITA Map from the temporary files folder instead?
This DITA OT issue also contains some possible workarounds about the problem encountered when trying to use XSLT to process a DITA Map which contains a DOCTYPE declaration: https://github.com/dita-ot/dita-ot/issues/3142

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
NicoAMP
Posts: 97
Joined: Tue Mar 06, 2018 2:07 pm
Contact:

Re: Dita catalog issue in ANT script

Post by NicoAMP »

Hi Radu,

I tested workarounds without success :(
I also try to run transformation on Linux environment and I have the same issue.

So I opened a ticket on dita-ot project: https://github.com/dita-ot/dita-ot/issues/3994

Thanks.

Regards,
Nicolas
Nicolas Delobel
AmeXio
nicolas.delobel at group.amexio.net
Radu
Posts: 9059
Joined: Fri Jul 09, 2004 5:18 pm

Re: Dita catalog issue in ANT script

Post by Radu »

Hi Nick,

Ok, we'll talk more on the opened issue then.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply