XML Schema 参考手册 完整 XML Schema 参考手册 The import element is used to add multiple schema with different target namespaces to a document. 父元素: Schema (? The symbol is declared in the import element, which can appear zero or once. ) Attribute Description Id Optional. Specifies the unique ID of the element. Namespace Necessary. Specifies the URI of the namespace to import. SchemaLocation Optional. Specifies the URI of the imported namespace. Any attributes Optional. Specifies any other attributes with the non-schema namespace. The following example shows importing a namespace:Definition and usage ¶
Element information ¶
Grammar ¶
<import
id=ID
namespace=anyURI
schemaLocation=anyURI
*any attributes*
>
(annotation?)
</import>
Example 1 ¶
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:import namespace="http://www.w3cschool.cc/schema"/>
..
..
..
</xs:schema>