nxml-mode: Locating a schema
6 Locating a schema
*******************
nXML mode has a configurable set of rules to locate a schema for the
file being edited. The rules are contained in one or more schema
locating files, which are XML documents.
The variable ‘rng-schema-locating-files’ specifies the list of the
file-names of schema locating files that nXML mode should use. The
order of the list is significant: when file X occurs in the list before
file Y then rules from file X have precedence over rules from file Y. A
filename specified in ‘rng-schema-locating-files’ may be relative. If
so, it will be resolved relative to the document for which a schema is
being located. It is not an error if relative file-names in
‘rng-schema-locating-files’ do not exist. You can use ‘M-x
customize-variable <RET> rng-schema-locating-files <RET>’ to customize
the list of schema locating files.
By default, ‘rng-schema-locating-files’ list has two members:
‘schemas.xml’, and ‘DIST-DIR/schema/schemas.xml’ where ‘DIST-DIR’ is the
directory containing the nXML distribution. The first member will cause
nXML mode to use a file ‘schemas.xml’ in the same directory as the
document being edited if such a file exist. The second member contains
rules for the schemas that are included with the nXML distribution.
Menu