Here is a list of the rules that can appear in a schema locating file:
<uri resource="f" uri="s"/>
Associate XML file
with schema file
f.
s
<uri
pathSuffix=".p"
uri="s"/>
Associate files whose names end in
.
with schema file
p.
s
<documentElement
prefix="N"
localName="E"
uri="s"/>
If a document's root element is
in namespace
E,
use schema file
N.
s
If you omit the namespace identifier
prefix=",
this rule matches by document element regardless of
the namespace.
N"
If you omit the element name
prefix=",
this rule will match all root elements in namespace
E",
if given. If both Nprefix and
localName attribute are
omitted, it matches all documents.
<transformURI
pathSuffix=".p"
replacePathSuffix=".q"/>
If a file has a name of the form
“f.”, try to match a schema file
whose name is
“pf.”.
q
<transformURI
pathAppend=".q"/>
If a file has a name of the form
“f”, try to
match a schema file whose name is
“f.”.
q
<namespace
ns="N"
uri="s"/>
If the file's root element has the same namespace URI as
, use schema
N.
s
<typeId
id="T"
uri="s"/>
Defines a new type ID
,
and says to use schema
T
for rules that refer to that type ID.
A type ID name is an arbitrary string you make up to
describe a document type (schema).
s
In any of the rules that have a
uri="
attribute, you can instead use a
s"typeId="
attribute. Assuming you have defined the type ID
T",
the rule will use the schema related to that type
ID.
T
<typeId
id="T"
typeId="U"/>
Defines a type ID named
as the same as type ID
T.
U
<include
rules="F"/>
Includes another schema locating file
.
F
<applyFollowingRules
ruleType="R"/>
This rule instructs
emacs to immediately
search all the remaining schema locating files in
its list (the value of its
rng-schema-locating-files
variable), and apply all rules of type
.
R
For example, suppose you want to use the transform
rewrite rules of type <transformURI> that are in
the files after this one in the sequence of schema
locating files. You can't just use the <include> rule, because if
any rule in the later files matches, it will win.
So instead you use this rule:
<applyFollowingRules ruleType="transformURI"/>
If emacs gets to this
rule without a match, it will then go and apply all
the <transformURI>
rules from later files, using them to rewrite the
pathname if appropriate. Then matching continues
in the current file, using the rewritten pathname.