以下に、サンプルの統合スキーマ文書を示します。
<?xml version="1.0" encoding="UTF-8"?> <ConsolidatedSchema schemaURI="http://www.example.com/schemauri" > <ComponentSchema locationURI="http://example.com/schemauri" targetNamespace="http://www.example.com/tns"> <xs:schema xmlns:xs="..." xmlns:xsi="..." xmlns:tns="http://www.example.com/tns"> .... </xs:schema> </ComponentSchema> <ComponentSchema locationURI="http://www.example.com/includedschema1.xsd" targetNamespace="http://www.example.com/tns"> <xs:schema xmlns:xs="..." xmlns:xsi="..." xmlns:tns="http://www.example.com/tns"> .... </xs:schema> </ComponentSchema> <ComponentSchema locationURI="../otherschema/importedschema1.xsd" targetNamespace="http://www.example.com/tns2"> <xs:schema xmlns:xs="..." xmlns:xsi="..." xmlns:tns2="http://www.example.com/tns2"> .... </xs:schema> </ComponentSchema> </ConsolidatedSchema>
ConsolidatedSchema要素はエンベロープを表わし、エンベロープにはスキーマを作り上げる個々のスキーマ文書が入れられます。これにより、schemaURI属性を使用して求められるスキーマが識別され、完全な自己識別パッケージが作成されます。
ConsolidatedSchema要素の子であるComponentSchema要素は、スキーマ文法を作り上げる個々のスキーマ文書をラップします。この要素にはlocationURI属性が含まれており、これを使用して、ルート スキーマの処理中、必要時にスキーマ文書が選び出されます。例えば、指定されたロケーションURIにあるスキーマを、ルート スキーマ、またはインポート/インクルードされた他のスキーマの1つにインポートする場合、リゾルバーは該当するlocationURI属性に対応するComponentSchema要素を選び出し、そのxs:schema子要素を取り出します。