How to change catalog file dynamically?
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 116
- Joined: Fri Apr 08, 2011 7:58 am
How to change catalog file dynamically?
Hi! Forum members,
I have some users who use DITA with specialization.
I usually receive the test data or error data for investigation based on each specialization DTDs. In this case the problem occurs in catalog file. I must change catalog file for each user because the CMS bender modifies the common OASIS dtd (or .mod) file to add CMS special attributes.
In the first I added following line at the end of [oXygen install dir]\frameworks\dita\DITA-OT\catalog-dita.xml.
<nextCatalog xml:base="file:///D:/DITA-OT1.5.3/dtd_CMS/" catalog="catalog.xml"></nextCatalog>
However if I opened the test data from the relevant user by oXygen XML Author, the editor displays the DTD error. So finally I edited [oXygen install dir]\frameworks\dita\DITA-OT\catalog-dita.xml only contains the above line. Then the test data became valid and I could safely edit the test data.
But it is very troublesome job to change the catalog file by the user data. Is there any convenient way to switch catalog file on the fly?
Regards,
Toshihiko Makita
I have some users who use DITA with specialization.
I usually receive the test data or error data for investigation based on each specialization DTDs. In this case the problem occurs in catalog file. I must change catalog file for each user because the CMS bender modifies the common OASIS dtd (or .mod) file to add CMS special attributes.
In the first I added following line at the end of [oXygen install dir]\frameworks\dita\DITA-OT\catalog-dita.xml.
<nextCatalog xml:base="file:///D:/DITA-OT1.5.3/dtd_CMS/" catalog="catalog.xml"></nextCatalog>
However if I opened the test data from the relevant user by oXygen XML Author, the editor displays the DTD error. So finally I edited [oXygen install dir]\frameworks\dita\DITA-OT\catalog-dita.xml only contains the above line. Then the test data became valid and I could safely edit the test data.
But it is very troublesome job to change the catalog file by the user data. Is there any convenient way to switch catalog file on the fly?
Regards,
Toshihiko Makita
--
/*--------------------------------------------------
Toshihiko Makita
Development Group. Antenna House, Inc. Ina Branch
Web site:
http://www.antenna.co.jp/
http://www.antennahouse.com/
--------------------------------------------------*/
/*--------------------------------------------------
Toshihiko Makita
Development Group. Antenna House, Inc. Ina Branch
Web site:
http://www.antenna.co.jp/
http://www.antennahouse.com/
--------------------------------------------------*/
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: How to change catalog file dynamically?
Hi,
So you have some kind of DITA specialization which declares extra attributes, right?
Usually a DITA specialization comes with custom DTD PUBLIC IDs. This is done especially to avoid the problem you reported, that your specialization DTDs are ignored because you have added the path to the other catalog as last in the DITA catalog.
The DITA 1.2 specification:
http://docs.oasis-open.org/dita/v1.2/os ... cType.html
states:
But the proper way to build DITA specializations is to have custom public IDs and then to pack the specialization as a DITA OT plugin which can be integrated by each user in the DITA OT they are using.
Regards,
Radu
So you have some kind of DITA specialization which declares extra attributes, right?
Usually a DITA specialization comes with custom DTD PUBLIC IDs. This is done especially to avoid the problem you reported, that your specialization DTDs are ignored because you have added the path to the other catalog as last in the DITA catalog.
The DITA 1.2 specification:
http://docs.oasis-open.org/dita/v1.2/os ... cType.html
states:
Did you modify the PUBLIC IDs of your specialization? If not, you could try to add the nextCatalog as the first entry in the file.In particular, for document type shells not created by OASIS, the public identifier or URN for the document type shell must not indicate OASIS as the owner and should reflect the owner or creator of the document type shell. For example, if example.com creates a copy of the topic.dtd document type shell for its own use, an appropriate public identifier would be "-//example.com//DTD DITA Topic//EN", where "example.com" is the owner identifier component of the public identifier. An appropriate URN would be "urn:example.com:names:dita:xsd:topic.xsd".
What do you mean? The DITA Open Toolkit publishing looks only in the catalog-dita.xml. In Oxygen for editing you can specify additional XML Catalogs in the XML / XML Catalog preferences page.Is there any convenient way to switch catalog file on the fly?
But the proper way to build DITA specializations is to have custom public IDs and then to pack the specialization as a DITA OT plugin which can be integrated by each user in the DITA OT they are using.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 116
- Joined: Fri Apr 08, 2011 7:58 am
Re: How to change catalog file dynamically?
Dear Radu,
Yes, you are absolutely right.
However the CMS vender modified the files that have OASIS public identifier. So if I add nextCatalog as the first entry of catalog-dita.xml, the DTD confliction occurs!
As a result I *MUST* remove all the existing catalog entries and inserted the nextCatalog that point to the specialization catalog entry only.
I know that it is not based on the specialization guideline. But the DTD is finally controlled by the CMS vender. So I have no way to prevent it.
Regards,
Toshihiko Makita
Yes, you are absolutely right.
However the CMS vender modified the files that have OASIS public identifier. So if I add nextCatalog as the first entry of catalog-dita.xml, the DTD confliction occurs!
As a result I *MUST* remove all the existing catalog entries and inserted the nextCatalog that point to the specialization catalog entry only.
I know that it is not based on the specialization guideline. But the DTD is finally controlled by the CMS vender. So I have no way to prevent it.
Regards,
Toshihiko Makita
--
/*--------------------------------------------------
Toshihiko Makita
Development Group. Antenna House, Inc. Ina Branch
Web site:
http://www.antenna.co.jp/
http://www.antennahouse.com/
--------------------------------------------------*/
/*--------------------------------------------------
Toshihiko Makita
Development Group. Antenna House, Inc. Ina Branch
Web site:
http://www.antenna.co.jp/
http://www.antennahouse.com/
--------------------------------------------------*/
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: How to change catalog file dynamically?
Hi Toshihiko,
I understand.
We have some Java API which allows developers to add a priority resolver for public and system IDs:
So a possibility would be to build an Oxygen plugin using our Plugins SDK:
http://www.oxygenxml.com/oxygen_sdk.htm ... er_Plugins
which would somehow prefer your DTDs over the ones in the DITA catalog-dita.xml.
This would probably work when editing XML files from the CMS but it still would not work when publishing using the DITA OT because the DITA OT ANT process only looks at the catalog-dita.xml.
If you have a Java developer available and are interesting in building such a plugin for Oxygen I could try to give you additional details.
Regards,
Radu
I understand.
We have some Java API which allows developers to add a priority resolver for public and system IDs:
Code: Select all
ro.sync.exml.workspace.api.util.XMLUtilAccess.addPriorityEntityResolver(EntityResolver)
http://www.oxygenxml.com/oxygen_sdk.htm ... er_Plugins
which would somehow prefer your DTDs over the ones in the DITA catalog-dita.xml.
This would probably work when editing XML files from the CMS but it still would not work when publishing using the DITA OT because the DITA OT ANT process only looks at the catalog-dita.xml.
If you have a Java developer available and are interesting in building such a plugin for Oxygen I could try to give you additional details.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 116
- Joined: Fri Apr 08, 2011 7:58 am
Re: How to change catalog file dynamically?
Dear Radu,
Thank you for your information.
I appreciate your help.
Regards,
Thank you for your information.
I appreciate your help.
Regards,
--
/*--------------------------------------------------
Toshihiko Makita
Development Group. Antenna House, Inc. Ina Branch
Web site:
http://www.antenna.co.jp/
http://www.antennahouse.com/
--------------------------------------------------*/
/*--------------------------------------------------
Toshihiko Makita
Development Group. Antenna House, Inc. Ina Branch
Web site:
http://www.antenna.co.jp/
http://www.antennahouse.com/
--------------------------------------------------*/
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)
- ↳ 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