Adding an import Component to an XML Schema File

See Also

You use an import to add multiple schemas with different target namespace to your XML schema file.

To add an import component:

  1. In the IDE, open the schema file where you want to reference an external schema.
  2. In the Schema view, select the root node, right-click and choose Add > Import.
    -or-
    In the Schema view, select the Referenced Schemas node, right-click and choose Add > Import.
    The Import dialog box opens.
  3. In the Location list, expand the By File or By Namespace nodes to navigate to and select the file you want to reference.
    The Namespace field below the Location list is filled in by the IDE.
  4. (Optional) In the New Prefix field, type the prefix you want to use to identify this schema.
  5. Click OK.
    The IDE adds an import node under the Referenced Schemas node with the information about the referenced schema.
  6. Click the Source button to navigate to the Source view.
    If you defined a new prefix, the IDE has updated the schema component to include a xmlns attribute for the schema you referenced and the prefix you defined. In addition, the IDE has added an import component to your schema file.
See Also
Import Dialog Box
Referencing External Schemas
XML Schema Tasks
About XML Schema Tools

Legal Notices