Register a schema

This should cover W3C XML Schema, Relax NG and DTD related problems.
alistairskye
Posts: 1
Joined: Fri Jul 29, 2005 1:40 pm

Register a schema

Post by alistairskye » Fri Jul 29, 2005 1:44 pm

Is it possible to register a schema in Oxygen?

I have an XML file with this:

xsi:schemaLocation="urn:test xsd/test.xsd"

in my application I have a resolver that resolves the schema location at runtime.

However, to validate the document in Oxygen I need to change it to:

xsi:schemaLocation="urn:test /path/to/xsd/test.xsd"

is there any way I can register xsd/test.xsd -> /path/to/xsd/test.xsd in Oxygen?

george
Site Admin
Posts: 2101
Joined: Thu Jan 09, 2003 2:58 pm

Post by george » Fri Jul 29, 2005 7:49 pm

Hi,

Not with a relative location. If you have a relative location then the schema should be at that location. If you use an absolute location then you can create a catalog to resolve the absolute schema location to a local copy and set that in oXygen.

Assuming you place the schema and the catalog in the same folder then the catalog can look like:

<?xml version="1.0"?>
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
<system
systemId="http://www.example.com/schema.xsd"
uri="schema.xsd"/>
</catalog>

The catalog should be added in the catalog list from
Options->Preferences -- XML -- XML Catalog page.

Then in the document you should use the absolute location, http://www.example.com/schema.xsd for instance in the above example.

Best Regards,
George

Post Reply