This documentation is archived and is not being maintained.

Importing External Elements into XML Schemas

Visual Studio .NET 2003

Elements from external namespaces can be imported and declared within your schema. Elements imported from multiple namespaces can be used in a schema. The only restriction is that the elements must be globally declared within the external schema.

Importing from other schemas enables types from different target namespaces to be used together.

To import existing data types into XML Schemas

  1. Load an XML Schema into the XML Designer.
  2. Place focus onto the design surface in Schema view.
  3. Click import in the Properties window.
  4. Open the import collection by clicking the ellipses next to the word (Collection).

    The XmlImport Collection Editor appears.

  5. Click Add to add an import reference to the collection.
  6. The id field can be assigned any id.
  7. The namespace field can be assigned any Uniform Resource Identifier (URI).
  8. The schemaLocation field can be assigned any URI.

For more information about the Collection Editor Dialog Box, see Collection Editor Dialog Box.

See Also

Creating XML Schemas and Datasets | Relationship Between XML Schemas and Datasets | Relational Data in XML Schemas | XML Files | XML Namespaces | XML Schemas and Data