Transformation fails to find DTD file for DITA XML
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 9
- Joined: Thu Jul 12, 2012 7:41 pm
Transformation fails to find DTD file for DITA XML
Post by pablojvarela »
Hi!
I am trying to run DITA transformation scenarios on DITA XML files.
The XML files are based on customized versions of topic/concept/task/reference, not on the standard DITA-OT's.
To make Oxygen aware of these customizations, I created an XML catalog, and added the catalog entry in $OXYGEN/frameworks/dita/catalog.xml. Then I made the DOCTYPE declarations match the PUBLIC IDs I have set in the catalog. For SYSTEM ID, I just entered the DTD filename.
Now, this puzzles me: Validation succeeds, but Transformation fails to find the appropriate DTDs.
[DOTJ012F][FATAL] Failed to parse the input file './my.ditamap'. The XML parser reported the following error: ./my-custom.dtd (The system cannot find the file specified)
It seems as if Oxygen is following the PUBLIC ID through the XML catalog to find the DTD whereabouts during validation, but not during trasnformation. So it tries to find the DTD in the same path where the XML file is stored, instead of looking in the path defined in the XML catalog.
Thanks for your support,
Pablo
I am trying to run DITA transformation scenarios on DITA XML files.
The XML files are based on customized versions of topic/concept/task/reference, not on the standard DITA-OT's.
To make Oxygen aware of these customizations, I created an XML catalog, and added the catalog entry in $OXYGEN/frameworks/dita/catalog.xml. Then I made the DOCTYPE declarations match the PUBLIC IDs I have set in the catalog. For SYSTEM ID, I just entered the DTD filename.
Now, this puzzles me: Validation succeeds, but Transformation fails to find the appropriate DTDs.
[DOTJ012F][FATAL] Failed to parse the input file './my.ditamap'. The XML parser reported the following error: ./my-custom.dtd (The system cannot find the file specified)
It seems as if Oxygen is following the PUBLIC ID through the XML catalog to find the DTD whereabouts during validation, but not during trasnformation. So it tries to find the DTD in the same path where the XML file is stored, instead of looking in the path defined in the XML catalog.
Thanks for your support,
Pablo
-
- Posts: 9446
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Transformation fails to find DTD file for DITA XML
Dear Pablo,
The DITA publishing is done using an open source tool called the DITA Open Toolkit.
This tool looks at a single XML catalog file:
OXYGEN_INSTALL_DIR\frameworks\dita\DITA-OT\catalog-dita.xml
Ideally when you create a DITA DTD specialization you can bundle it as a DITA Open Toolkit plugin. For example you can look at how the MathML DITA DTD specialization plugin looks like:
OXYGEN_INSTALL_DIR\frameworks\dita\DITA-OT\plugins\mathml
and then integrate the plugin running the DITA OT Integrator transformation scenario:
http://www.oxygenxml.com/doc/ug-oxygen/ ... ation.html
As a workaround, to see that this works, you can manually open the catalog-dita.xml I mentioned and add in it a nextCatalog entry pointing to your additional XML catalog, then try to publish again.
Regards,
Radu
The DITA publishing is done using an open source tool called the DITA Open Toolkit.
This tool looks at a single XML catalog file:
OXYGEN_INSTALL_DIR\frameworks\dita\DITA-OT\catalog-dita.xml
Ideally when you create a DITA DTD specialization you can bundle it as a DITA Open Toolkit plugin. For example you can look at how the MathML DITA DTD specialization plugin looks like:
OXYGEN_INSTALL_DIR\frameworks\dita\DITA-OT\plugins\mathml
and then integrate the plugin running the DITA OT Integrator transformation scenario:
http://www.oxygenxml.com/doc/ug-oxygen/ ... ation.html
As a workaround, to see that this works, you can manually open the catalog-dita.xml I mentioned and add in it a nextCatalog entry pointing to your additional XML catalog, then try to publish again.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 9
- Joined: Thu Jul 12, 2012 7:41 pm
Re: Transformation fails to find DTD file for DITA XML
Post by pablojvarela »
Thanks, Radu,
I know.
My catalog-dita.xml already contains the nextCatalog entry to my specialized topic types.
This is precisely why validation does work.
But how come validation works, but transformation does not?
I know.
My catalog-dita.xml already contains the nextCatalog entry to my specialized topic types.
This is precisely why validation does work.
But how come validation works, but transformation does not?
It seems as if Oxygen is following the PUBLIC ID through the XML catalog to find the DTD whereabouts during validation, but not during trasnformation. So it tries to find the DTD in the same path where the XML file is stored, instead of looking in the path defined in the XML catalog.
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Re: Transformation fails to find DTD file for DITA XML
Post by sorin_ristache »
I suppose you have the option Prefer: public selected in Options -> Preferences -> XML / XML Catalog but the Prefer option is not passed to the DITA transformations so the XML catalog resolver only looks for system IDs, not public IDs.
Does the transformation prefer the system ID instead of the public ID also in the case of adding the attribute prefer="public" to the root element catalog in the file OXYGEN_INSTALL_DIR\frameworks\dita\DITA-OT\catalog-dita.xml and after that repeating the DITA transformation? If yes (which means the DITA transformation still prefers the system IDs) please send us your customized versions of DITA topic DTDs and your XML catalog declarations which you added in Oxygen, for reproducing the problem.
Does the transformation prefer the system ID instead of the public ID also in the case of adding the attribute prefer="public" to the root element catalog in the file OXYGEN_INSTALL_DIR\frameworks\dita\DITA-OT\catalog-dita.xml and after that repeating the DITA transformation? If yes (which means the DITA transformation still prefers the system IDs) please send us your customized versions of DITA topic DTDs and your XML catalog declarations which you added in Oxygen, for reproducing the problem.
Regards,
Sorin
<oXygen/> XML Editor Support
Sorin
<oXygen/> XML Editor Support
-
- Posts: 9
- Joined: Thu Jul 12, 2012 7:41 pm
Re: Transformation fails to find DTD file for DITA XML
Post by pablojvarela »
Thanks Radu.
I set in the catalog and now transformations work.
Pablo
I set
Code: Select all
prefer="public"
Pablo
Return to “DITA (Editing and Publishing DITA Content)”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service