Can I have a public DTD with a catalog entry fallback
This should cover W3C XML Schema, Relax NG and DTD related problems.
-
- Posts: 13
- Joined: Thu May 26, 2011 2:50 am
Can I have a public DTD with a catalog entry fallback
I have DITA shell DTDs in a project that I want to point to at a url in a PUBLIC DOCTYPE Declaration like this:
However, I want to be able to validate my files when there is no internet access so I want to point to the local versions of these DTDs. I thought that the way I do that is to create a catalog file that recognizes the PUBLIC identifier and associates it with a local uri. I create a catalog and entered it in Oxygen's XML Catalog page. It looks like this:
I turn off my wifi and try to validate the document and I get Schematron errors as it cannot reach the supplied url:
Thanks,
Andy
Code: Select all
<!DOCTYPE topic PUBLIC "urn:pubid:org.kuali.kits.kms:doctypes:dita:topic"
"https://svn.kuali.org/repos/kits/kms-dita-prototypes/org.kuali.kits.kms/doctypes/topic/dtd/kbtopic.dtd">
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE catalog PUBLIC "-//OASIS//DTD XML Catalogs V1.1//EN" "http://www.oasis-open.org/committees/entity/release/1.1/catalog.dtd">
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
<public publicId="urn:pubid:org.kuali.kits.kms:doctypes:dita:topic" uri="../org.kuali.kits.kms/doctypes/topic/dtd/kbtopic.dtd"/>
</catalog>
I don't understand how to accomplish my goal, can someone please help.SystemID: /Users/jorahood/work/git/dita-prototypes/dmm3/test.dita
Main validation file: /Users/jorahood/work/git/dita-prototypes/dmm3/test.dita
Scenario name: DITA
Engine name: ISO Schematron (XSLT 2.0)
Severity: fatal
Description: svn.kuali.org (https://svn.kuali.org/repos/kits/kms-di ... btopic.dtd)
SystemID: /Users/jorahood/work/git/dita-prototypes/dmm3/test.dita
Main validation file: /Users/jorahood/work/git/dita-prototypes/dmm3/test.dita
Scenario name: DITA
Engine name: ISO Schematron (XSLT 2.0)
Severity: error
Description: I/O error reported by XML parser processing file:/Users/jorahood/work/git/dita-prototypes/dmm3/test.dita: svn.kuali.org (https://svn.kuali.org/repos/kits/kms-di ... btopic.dtd)
Thanks,
Andy
-
- Posts: 13
- Joined: Thu May 26, 2011 2:50 am
Re: Can I have a public DTD with a catalog entry fallback
For clarification, this is the way I added my own catalog: I entered it in the catalogs dialog box as
${pd}/catalogs/dita-kb.xml
I used the editor variable because I will be sharing the project with other users who will have it installed in different places.
${pd}/catalogs/dita-kb.xml
I used the editor variable because I will be sharing the project with other users who will have it installed in different places.
-
- Posts: 9431
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Can I have a public DTD with a catalog entry fallback
Hi Andy,
The correct reference to the catalog.xml should be like this:
${pdu}/catalogs/dita-kb.xml
because the catalog entry should be in URL form.
On my Windows machine both forms work but I'm not so sure about Linux.
I tested the same scenario with a catalog having the content like this:
which pointed the public ID to the default topic.dtd located in my DITA OT installation and it seemed to work without network access.
If it still does not work for you I could try to perform additional tests. Are there any additional errors than the errors you posted? Is the first error from the Xerces processor?
Also, if you want to publish the specialized topics using the DITA-OT bundled with Oxygen you should better add an additional entry in the:
OXYGEN_INSTALL_DIR/frameworks/dita/DITA-OT/catalog-dita.xml
If you add this additional entry, it should be used both by Oxygen for validation + by the DITA OT for publishing but of course it would not be portable in a Project setting.
Regards,
Radu
The correct reference to the catalog.xml should be like this:
${pdu}/catalogs/dita-kb.xml
because the catalog entry should be in URL form.
On my Windows machine both forms work but I'm not so sure about Linux.
I tested the same scenario with a catalog having the content like this:
Code: Select all
<!DOCTYPE catalog PUBLIC "-//OASIS//DTD XML Catalogs V1.1//EN" "http://www.oasis-open.org/committees/entity/release/1.1/catalog.dtd">
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
<public publicId="urn:pubid:org.kuali.kits.kms:doctypes:dita:topic" uri="file:/D:/projects/eXml/frameworks/dita/DITA-OT/dtd/technicalContent/dtd/topic.dtd"/>
</catalog>
If it still does not work for you I could try to perform additional tests. Are there any additional errors than the errors you posted? Is the first error from the Xerces processor?
Also, if you want to publish the specialized topics using the DITA-OT bundled with Oxygen you should better add an additional entry in the:
OXYGEN_INSTALL_DIR/frameworks/dita/DITA-OT/catalog-dita.xml
If you add this additional entry, it should be used both by Oxygen for validation + by the DITA OT for publishing but of course it would not be portable in a Project setting.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
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