Maps to a UML Permission with the stereotype XSDimport. The permission client must be the schema class stereotypes «XSDschema» Component, supplier namespace Package XSDnamespace.

  • namespace maps to the supplier name.
  • annotation maps to the UML Attribute documentation.
  • schemaLocation maps to the TaggedValue.
import XML representation summary
<import
	id = ID
	namespace = anyURI
	schemaLocation = anyURI
	{any attributes with non-schema namespace…}>
Content: (annotation?)
</import>

In the following example, the same namespace may be used both for real work, and in the course of defining schema components in terms of foreign components.

The treatment of references as internal references to the names being defined in a schema document
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:html="http://www.w3.org/1999/xhtml" targetNamespace="uri:mywork" 
xmlns:my="uri:mywork">

<import namespace="http://www.w3.org/1999/xhtml"/>

<annotation>
		<documentation>
			<html:p>[Some documentation for my schema]</html:p>
</documentation>
	</annotation>
	<complexType name="myType">
		<sequence>
			<element ref="html:p" minOccurs="0"/>
</sequence>
	</complexType>

<element name="myElt" type="my:myType"/>
</schema>

The treatment of references as ·QNames· implies that since the target namespace and the XML Schema namespace differ (with the exception of the schema for schemas), then without massive redeclaration of the default namespace either the internal references to the names being defined in a schema document or the schema declaration and definition elements themselves must be explicitly qualified. This example shows the first option, while most other examples in this specification showed the second.

import UML model example.
import XML code sample
<xs:schema xmlns:nm = "http://nomagic.com" xmlns:xs = "http://www.w3.org/2001/XMLSchema" targetNamespace = "http://nomagic.com"›
	<xs:import namespace = "http://www.w3.org/1999/xhtml" schemaLocation = "http://www.w3.org/1999/xhtml" />
</xs:schema>