XML catalogs for dummies

Oxygen general issues.
dsewell
Posts: 125
Joined: Mon Jun 09, 2003 6:02 pm
Location: Charlottesville, Virginia USA

XML catalogs for dummies

Post by dsewell »

I am at the beginning stage of figuring out how XML catalogs work, and I just want confirmation that they will accomplish what I want to do:

1.I have created a directory tree of schemas and DTDs that are used by various XML documents I work with. This directory is on my local system and is also mirrored on a Web server so that people can validate documents via HTTP.

2. I should be able to create an XML catalog for use by oXygen that will associate the filesystem tree on my local machine with the HTTP URIs for the same schemas, so that if I cannot access the schemas over the network, oXygen will use my local files.

Am I correct that this is the basic idea? So I just need to figure out how to create a catalog file with the correct syntax and tell oXygen where it is?

(A basic HOWTO document on using XML catalogs with oXygen might be helpful.)
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Post by george »

Hi David,

Yes, that is the basic idea. Oxygen will always use the local copies, not only when the online are not accessible.

All that you need is to create a catalog file. There are a few catalogs in [oXygen]/frameworks that you can take as samples. Then you need to go to Options->Preferences -- XML / XML Catalog page and add your catalog file in the catalogs list, then restart oXygen to have the catalog used by oXygen.

In your case a rewrite system I think should be enough. Suppose you have the schemas available at http://www.example.com/david/ then place the same content in a local folder where you have also the catalog.xml file with the following content:

Code: Select all


<?xml version="1.0"?>
<!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN" "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
<rewriteSystem systemIdStartString="http://www.example.com/david/" rewritePrefix="./"/>
</catalog>
We will prepare an article to show how to create and set up a catalog with oXygen.

Best Regards,
George
dsewell
Posts: 125
Joined: Mon Jun 09, 2003 6:02 pm
Location: Charlottesville, Virginia USA

Thanks!

Post by dsewell »

As always, a helpful response...
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Post by sorin_ristache »

george wrote:We will prepare an article to show how to create and set up a catalog with oXygen.
The article is available on the Documentation page:

http://www.oxygenxml.com/doc/HowToCreat ... gFiles.pdf

Best Regards,
Sorin
Post Reply