Next / Previous / Contents / TCC Help System / NM Tech homepage

4.  Format of a schema locating file

Schema locating files are in XML format. The Relax NG compact schema for this document type lives in file schema/locate.rnc in the nxml install directory.

Here's a simple example:

<?xml version='1.0'?>
<locatingRules xmlns="">
  <uri resource="myfile.xml" uri="myschema.rnc"/>

The first two lines, and the last line, are the same in every file. Between them are rules that specify various ways to find schema files for a given XML document.

The third line is a rule that says the Relax NG compact schema for file myfile.xml lives in file myschema.rnc in the same directory.

Relative URI (Universal Resource Identifiers) values are interpreted as relative to the same directory as the schema locating file.

When emacs is looking through the rules in a schema locating file, it looks at each rule until it gets a match, and then stops. So the order of the rules is important: place the more important rules first.

The various rules that can appear in schema locating files are described below.