I'm trying to figure out how or if its possible to validate a schema-based document against a schema where the system location is a relative URI resolved through a catalog.

Here's my document element:

<document
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
        xsi:noNamespaceSchemaLocation="simpletest_nons.xsd">

This document validates when it's in the same directory as the schema.

Here is my catalog:

<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"
  prefer="public">
  <system systemId="simpletest_nons.xsd"
    uri="simpletest_nons.xsd"
  />
  <uri name="simpletest_nons.xsd"
    uri="simpletest_nons.xsd"
  />
  <uri name="urn:simpletest.gidi.org"
    uri="simpletest.xsd"
  />
</catalog>

When I try to validate the above document stored in a location separate from the schema, validation fails with messages to the effect that it can't find the schema, with an effective URI that reflects the location of the document.

Actually I get the same sort of failure for a namespaced document valid against a namespace-governing schema, e.g.:

<document
        xmlns="urn:simpletest.gidi.org"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
        xsi:schemaLocation="urn:simpletest.gidi.org simpletest.xsd">

Is it possible to use catalogs to remap non-absolute URIs in this way or must I use absolute URIs for the schema location value?

Thanks,

E.
--
Eliot Kimber
Senior Solutions Architect
"Bringing Strategy, Content, and Technology Together"
Main: 610.631.6770
www.reallysi.com
www.rsuitecms.com

_______________________________________________
oXygen-user mailing list
[email protected]
http://www.oxygenxml.com/mailman/listinfo/oxygen-user

Reply via email to