Home Products Consulting About Us White Papers Careers Contact Us Tutorials
 

 Download Delve® SOA Fast-Prototyping Toolkit (Beta 1.0)

Tutorials - How to Explicitly Import an XML Schema
Page 1 of 2

While externally defined schemas may be imported as resources (see the Delve Habitat Tutorial for details), it is also possible to explicitly import an XML schema. This lesson describes how to do so.

To explicitly import a schema we’ll use, naturally enough, an “import” statement, which starts out with the keyword “import” followed by the name of the schema being imported (the XML-Schema specification doesn’t include the concept of schema names, but they’re useful nonetheless).

 

 

In this example, a schema named “outside” is imported from the URL “http://192...” and assigned the namespace “http://outsidexml.net.” Because most schemas associate themselves with a namespace, this part can usually be omitted. If a schema has an internal namespace assignment, the one in the “import” statement is overridden.

Just like schemas defined in code, imported schemas can be displayed in full, as XML, using the “write” statement.

Once a schema is imported, the types it defines can be used to create XML instances. For details, see the lesson How to Create Instances from Schema Components.


 Download Delve® SOA Fast-Prototyping Toolkit (Beta 1.0)
Next Step

Move On To Next Step - "Using an Imported Schema in New Definitions"

Read a Detailed Product Description

Read About Delve and XML-Schema Documents in Detail

Browse Product White Papers

 
Home Products Consulting About Us White Papers Careers Contact Us Tutorials