A method of validating a document structured in accordance with a first
schema and with respect to a second schema saves processing time by using
information about relationships between the first schema and second
schema and the document's conformance to the first schema to determine
the document's validity in the second schema. The element type
definitions of the XML or other document cast in the first schema are
examined to determine if any element conforming to element types in the
first schema is always invalid in the second schema. If any content
conforming to always invalid element types is present in the document,
the document can be immediately invalidated with respect to the second
schema without further processing. Any content conforming to element
types in the first schema that are subsumed by element types in the
second schema can be immediately validated with respect to the second
schema.