
Hello, There are only user errors, not limitations in the <oXygen/>'s catalog implementation. 1. First the root element of an OASIS catalog must be in the "urn:oasis:names:tc:entity:xmlns:xml:catalog" namespace, for example: <catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"> ... </catalog> as the "Resource Failures" section of the OASIS XML Catalogs specification states: http://www.oasis-open.org/committees/entity/spec-2001-08-06.html#s.res.fail The non-normative XML Schema listed in the specification requires that *all* the catalog elements are in that namespace and that is what <oXygen/> requires: <xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema' targetNamespace='urn:oasis:names:tc:entity:xmlns:xml:catalog' ... Second you tried to resolve an external identifier with a URI entry of the catalog. You must use an external identifier entry, for example *system*: <system systemId="http://dita.oasis-open.org/DITA/version.1.0/topic.dtd" uri="topic.dtd"/> For external identifier entries please see: http://www.oasis-open.org/committees/entity/spec-2001-08-06.html#s.ext.ent For URI entries please see: http://www.oasis-open.org/committees/entity/spec-2001-08-06.html#s.uri.ent The catalog works like this: try to resolve the URL via the catalog, *only* upon failure try to resolve the URL by accessing the remote location. So the possible user preference that you specified does not make sense. 2. Problem 2 depends on problem 1. Validation works as you expect if you put all the catalog elements in the right namespace and use an external identifier entry in your catalog instead of URI entry. 3. The substring following the "=" character is the result of resolving the pair (public ID, system ID) via the catalog. "Null" indicates that the URI could not be resolved via the catalog. XML Catalog operations are completely independent of accessing any resource specified by a URL. You can find this explained in the OASIS XML Catalogs specification directly linked from the "Working with XML Catalogs" section of the <oXygen/> User Manual: http://www.oxygenxml.com/doc/ug-standalone-en/editing-xml-documents.html#usi... Best regards, Sorin Eliot Kimber wrote:
I'm trying to set up some new catalogs for DITA (I'm tasked with defining how DITA will use various forms of URL and public ID to handle version-specific and inspecific references).
I'm trying to use oXygen 6.2 to develop and test my catalogs and I'm not having much luck, which is probably mostly user error but I think there may be some limitations in oXygen's catalog implementation and I'm trying to figure out which is which. Unfortunately, the online help for catalogs is not helpful in this case.
I'm trying to do several things:
1. Set up entries that map namespace URIs to local URLs for the corresponding schema document
2. Set up entries that map one URL to another URL.
3. Set up entries that map public IDs to system IDs that are fully-qualified URLs that then map, via URI entries, to local files
I'm running into several problems. In all cases, I have set the catalog options to not use the default catalogs and I only list one top-level catalog, which then uses <next-catalog> elements to point to subordinate catalogs that do the actual mapping, i.e.:
<catalog> <nextCatalog catalog="dtd/catalog-dita-dtd.xml" /> </catalog>
-------------------------------------------- Problem 1: HTTP URL not resolved via catalog
I have a document with this DOCTYPE declaration:
<!DOCTYPE topic SYSTEM "http://dita.oasis-open.org/DITA/version.1.0/topic.dtd">
In my catalog I have this entry:
<uri name="http://dita.oasis-open.org/DITA/version.1.0/topic.dtd" uri="topic.dtd"/>
I have verified that the file "topic.dtd" is where the catalog says it is (using "edit file at cursor within oXygen).
When I validate the document, I get this error:
"Description: F HttpException-dita.oasis-open.org (http://dita.oasis-open.org/DITA/version.1.0/topic.dtd)"
This suggests that the validator is trying to resolve the URL and, upon failure to do so (the URL isn't currently resolvable), is not then trying to resolve it via the catalog, which it should be doing.
Also, in this case, even if the URL was resolvable over the net, I would prefer to have it resolved via the catalog--I didn't see an option for controlling that behavior.
----------------------------------------------------- Problem 2: Non-HTTP URN gives malformed URL exception
In another document I have this doctype declaration:
<!DOCTYPE topic SYSTEM "urn:oasis:http://dita.oasis-open.org/DITA/topic.dtd">
When I try to validate I get this failure:
"Description: F MalformedURLException-unknown protocol: urn"
This suggests that oXygen is expecting the SYSTEM value to be an HTTP URL, which is not required by the XML spec (the SYSTEM value is a URI, not a URL).
In this case, I would expect the validator to try to resolve the URN via the catalog (where it is mapped) and only if that fails then return "could not resolve URN" error, not a malformed URN exception.
------------------------------------------------------ Problem 3: Unclear response from catalog verbose trace
It's also not clear what these catalog trace messages are telling me:
Description: Public: null System: http://dita.oasis-open.org/DITA/version.1.0/topic.dtd = null
In particular, what the final "null" is indicating--does that indicate that the file to which the URI is mapped couldn't be found? I couldn't find an explanation of this case in the online docs.
Cheers,
Eliot