kprice | 159fa58 | 2006-05-08 21:30:45 +0000 | [diff] [blame] | 1 | <?xml version="1.0" encoding="utf-8"?>
|
| 2 | <!--Arbortext, Inc., 1988-2005, v.4002-->
|
kprice | 647b735 | 2006-05-17 21:27:16 +0000 | [diff] [blame] | 3 | <!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN"
|
| 4 | "task.dtd">
|
| 5 | <?Pub Inc?>
|
kprice | 159fa58 | 2006-05-08 21:30:45 +0000 | [diff] [blame] | 6 | <task id="taddimpt" xml:lang="en-us">
|
| 7 | <title>Adding import elements</title>
|
| 8 | <titlealts>
|
| 9 | <searchtitle>Adding import elements</searchtitle>
|
| 10 | </titlealts>
|
| 11 | <shortdesc>As schemas become larger, it is often desirable to divide their
|
| 12 | content among several schema documents for purposes such as ease of maintenance,
|
| 13 | reuse, and readability. You can use an <codeph>import</codeph> element to
|
| 14 | bring in definitions and declarations from an imported schema into the current
|
| 15 | schema. </shortdesc>
|
| 16 | <prolog><metadata>
|
kprice | 9623e9d | 2007-05-03 03:43:05 +0000 | [diff] [blame] | 17 | <keywords><indexterm>XML schema editor<indexterm>import elements</indexterm></indexterm>
|
| 18 | <indexterm>XML schema files<indexterm>import elements</indexterm></indexterm>
|
kprice | 159fa58 | 2006-05-08 21:30:45 +0000 | [diff] [blame] | 19 | </keywords>
|
| 20 | </metadata></prolog>
|
| 21 | <taskbody>
|
| 22 | <context><p>The imported schema can come from a different namespace than the
|
| 23 | current schema does.</p><p>You can add multiple import elements to an XML
|
| 24 | schema, however, prefixes and namespaces have to unique amongst the imported
|
| 25 | schemas.</p><p>The following instructions were written for the Resource perspective,
|
| 26 | but they will also work in many other perspectives.</p><p>To add an import
|
| 27 | element, follow these steps:</p></context>
|
| 28 | <steps>
|
| 29 | <step><cmd>Open your XML schema in the XML schema editor.</cmd></step>
|
| 30 | <step><cmd>In the Outline view, select your schema.</cmd><info>The entire
|
kprice | 647b735 | 2006-05-17 21:27:16 +0000 | [diff] [blame] | 31 | schema and its contents should be displayed in the Design view.</info></step>
|
| 32 | <step><cmd>In the Design view, right click in the <b>Directives</b> section
|
kprice | 159fa58 | 2006-05-08 21:30:45 +0000 | [diff] [blame] | 33 | and click <uicontrol>Add Import</uicontrol>.</cmd></step>
|
kprice | 647b735 | 2006-05-17 21:27:16 +0000 | [diff] [blame] | 34 | <step><cmd>In the Properties view, click the <b>General</b> tab and click <uicontrol>Browse</uicontrol> <image
|
| 35 | href="../images/Browse.gif"><alt>This graphic is the Browse button</alt></image> to
|
| 36 | the right of the <uicontrol>Schema location</uicontrol> field.</cmd></step>
|
| 37 | <step><cmd>If you want to import an XML schema located in the workbench:</cmd>
|
kprice | 159fa58 | 2006-05-08 21:30:45 +0000 | [diff] [blame] | 38 | <substeps>
|
kprice | 647b735 | 2006-05-17 21:27:16 +0000 | [diff] [blame] | 39 | <substep><cmd>Select <uicontrol>Workbench projects</uicontrol> and click <uicontrol>Next</uicontrol>. </cmd>
|
| 40 | </substep>
|
kprice | 159fa58 | 2006-05-08 21:30:45 +0000 | [diff] [blame] | 41 | <substep><cmd>Select the schema you want to import and click <uicontrol>Finish</uicontrol>.</cmd>
|
| 42 | </substep>
|
| 43 | </substeps>
|
| 44 | </step>
|
kprice | 9623e9d | 2007-05-03 03:43:05 +0000 | [diff] [blame] | 45 | <step><cmd>If you want to import an XML schema located on the Web:</cmd>
|
kprice | 159fa58 | 2006-05-08 21:30:45 +0000 | [diff] [blame] | 46 | <substeps>
|
kprice | 647b735 | 2006-05-17 21:27:16 +0000 | [diff] [blame] | 47 | <substep><cmd>Select <uicontrol>HTTP</uicontrol> and click <uicontrol>Next</uicontrol>.</cmd>
|
| 48 | </substep>
|
kprice | 159fa58 | 2006-05-08 21:30:45 +0000 | [diff] [blame] | 49 | <substep><cmd>Type the URL of the XML schema and click <uicontrol>Finish</uicontrol>.</cmd>
|
| 50 | <info><note>A local copy of the schema will not be stored in the workbench.
|
| 51 | Every time you validate your schema, the schema's contents will be checked
|
| 52 | from the URL you specify.</note></info></substep>
|
| 53 | </substeps>
|
| 54 | </step>
|
| 55 | <step><cmd>The XML schema editor will retrieve the namespace for the imported
|
| 56 | XML schema file and display it as read-only in the <uicontrol>Namespace</uicontrol> field.</cmd>
|
| 57 | </step>
|
| 58 | <step><cmd>If necessary, type a unique prefix for this namespace in the <uicontrol>Prefix</uicontrol> field.</cmd>
|
| 59 | </step>
|
| 60 | <step><cmd>Click the <uicontrol>Documentation</uicontrol> tab if you want
|
| 61 | to provide any information about this import element.</cmd><info>The <uicontrol>Documentation</uicontrol> page
|
kprice | 647b735 | 2006-05-17 21:27:16 +0000 | [diff] [blame] | 62 | is used for human readable material, such as a description.</info></step>
|
| 63 | <step><cmd>Click the <uicontrol>Extensions</uicontrol> tab if you want to
|
| 64 | add application information elements to your annotations of schema components.</cmd>
|
| 65 | <info>The <uicontrol>Extensions</uicontrol> page allows you to specify the
|
| 66 | schema and add XML content to your annotations.</info></step>
|
kprice | 159fa58 | 2006-05-08 21:30:45 +0000 | [diff] [blame] | 67 | </steps>
|
| 68 | <result><p>Once you have added an import element to your XML schema, when
|
| 69 | you define new elements, attributes, complex types, or simple types where
|
| 70 | you can specify type information, any declarations from the included schema
|
| 71 | will be available in the <uicontrol>Type</uicontrol> list for the element,
|
| 72 | attribute, complex or simple type.</p></result>
|
| 73 | <postreq></postreq>
|
| 74 | </taskbody>
|
| 75 | </task>
|
kprice | 647b735 | 2006-05-17 21:27:16 +0000 | [diff] [blame] | 76 | <?Pub *0000004340?>
|