They are typically used to resolve DTDs, charents, and schemas to local copies instead of making a remote request.
Oxygen uses them, and to use them in other software usually requires configuring a resolver for the XML parser.
However, what I wanted to do will probably not work out of the box.
I have a collection of EAD XML files that use XInclude’s for boiler plate published information, so when an org changes it’s contact info it only has to be changed in one place. That file has a server URL that I would like to resolve to a local file instead of making a network request.
Supposedly this is doable using XML Catalogs:
However, I was trying to test this with another package that does implement catalog support [
http://basex.org] , and with catalogs enabled, it didn’t appear to resolve my XInclude files locally. ( i.e. when I turned wifi off on my laptop to verify that access was local only, the parser failed during ingest. )
So it appears unlikely that I can get what I want without using a custom resolver, and not certain that will work without source code changes. i.e. if someone has configured XTF to use XML catalogs for DTD and entity resolution, that is no guarantee that it will work for resolving XInclude’s.
So I think that’s a “Nevermind!”
I could batch edit all of those files to use relative file: URI’s to make them resolve locally, but then they wouldn’t work if taken out of context, which is the whole point of XML Catalogs.
BTW: If you ever try to batch validate thousands of XML files, you will find that another need for catalog files is that most sites that host official DTDs and Schema ( w3c,
loc.gov ) will cut you off after making some dozens of requests.
So you need to download the schema locally and redirect to local copy, and XML catalogs is one way of doing that.
If Oxygen didn’t support XML Catalogs, validation would break occasionally after using it a lot.
— Steve M.