Catalog resolver does not work unless oxygen-patched-resolver.jar is included

Questions about XML that are not covered by the other forums should go here.
cuauhmedina
Posts: 4
Joined: Wed Nov 18, 2020 11:29 pm

Catalog resolver does not work unless oxygen-patched-resolver.jar is included

Post by cuauhmedina » Thu Nov 19, 2020 12:26 am

I have create a new plugin in which I need to read dita maps and topics from xslt using fn:doc(). Everything works fine if I run the transformation from oXygen using the DITA-OT 2.3 and a custom transformation scenario.

The problem
If I run the transformation from command line, I get the following error:
Fatal error during transformation using {stylesheet_path} Failed to load document {ditamap_path}

My Findings
- If I remove the doctype declaration from the dita map that I intent to process, the transformation is successful
- If I include the oxygen-patched-resolver.jar in the command line with the -lib option, the transformation is successful

Important information:
My plugin is a customization based on the DITA-OT 2.3 and it uses the xmlcatalog (dita.catalog) defined in the org.dita.base plugin

My questions:
- Why doesn't my transformation work if I have the xmlcatalog included?
- Can I freely use the oxygen-patched-resolver.jar to package it with my custom DITA-OT?
- What is the bug or issue that the oxygen-patched-resolver.jar fixed that makes my transformation successful?
- Is there an alternative to read dita files other than fn:doc()

Any help would be appreciated :)
Thanks

Radu
Posts: 7315
Joined: Fri Jul 09, 2004 5:18 pm

Re: Catalog resolver does not work unless oxygen-patched-resolver.jar is included

Post by Radu » Thu Nov 19, 2020 7:57 am

Hi,

Usually most DITA OT plugins call the DITA-OT "preprocess" ANT task and then apply the XSLT. The "preprocess" task removes the DOCTYPE declarations and expands default attributes, plus it does filtering and conref resolution. After "preprocess" the XSLTs of the DITA OT plugin are applied on topics in the temporary files folder, topics which no longer have DOCTYPE declarations.

Does your DITA OT plugin apply an XSLT stylesheet on the initial DITA content which contains DOCTYPE declarations? If so you should read this DITA OT issue:
https://github.com/dita-ot/dita-ot/issues/3142

and a possible workaround is given also in this older discussion thread:

https://dita-users.groups.io/g/main/top ... 3261#44287

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

cuauhmedina
Posts: 4
Joined: Wed Nov 18, 2020 11:29 pm

Re: Catalog resolver does not work unless oxygen-patched-resolver.jar is included

Post by cuauhmedina » Tue Nov 24, 2020 12:10 am

Hi Radu,

Thanks for your comments, yes, my plugin applies the XSLT on the initial DITA content, thanks for pointing me in the right direction, hopefully I'll make it work :)

Thanks,
Temo Medina
Radu wrote:
Thu Nov 19, 2020 7:57 am
Hi,

Usually most DITA OT plugins call the DITA-OT "preprocess" ANT task and then apply the XSLT. The "preprocess" task removes the DOCTYPE declarations and expands default attributes, plus it does filtering and conref resolution. After "preprocess" the XSLTs of the DITA OT plugin are applied on topics in the temporary files folder, topics which no longer have DOCTYPE declarations.

Does your DITA OT plugin apply an XSLT stylesheet on the initial DITA content which contains DOCTYPE declarations? If so you should read this DITA OT issue:
https://github.com/dita-ot/dita-ot/issues/3142

and a possible workaround is given also in this older discussion thread:

https://dita-users.groups.io/g/main/top ... 3261#44287

Regards,
Radu

Post Reply