external-text-entity #schema OR (when | unless) entity is #schema
You can use
#schema to retrieve a schema for an XML document or to test if an external text entity represents an XML Schema.
To retrieve an XML schema that is referenced by an XML document, you can use
#schema as an argument to an
external-text-entity #schema output file "%eq"
The code above will retrieve the URI of the schema (as "%eq") and attempt to open a file with that name. The contents of the file is then sent to the parser. (The parser is the default output scope in an
external-text-entity rule.) If the URI is not a local file name, then you must take the approriate steps to interpret the URI and locate the schema.
To test if an external text entity is a schema, you can use the
entity is schema test: