Several parsers divide validatation into two phases: load schema, and validate document. This allows multiple documents to be validated using the same schema without re-parsing it. It also allows you to "validate" the schema, by doing only the "load schema" part.
Alternatively, you can use a DTD or RELAX NG schema to validate an XML Schema, in the original sense of the word. (I don't believe it's possible to write a valid XML Schema for XML Schema, itself. If it is, the one in the standard certainly isn't it.)
The advantage of the former approach is it checks for errors that cannot be specified in a schema, like all referenced items are defined. The advantage of the latter approach is it can be used with "schema fragments" (schemas intended to be included or imported into other schemas but not used by themselves).
Bob Foster
"Siddhartha Singh" wrote:
Hi,
If XML can be validated by either DTD or Schema and Schema itself is a
XML.
How can we validate a Schema ?
Cheers,
Siddhartha Singh