kprice | 159fa58 | 2006-05-08 21:30:45 +0000 | [diff] [blame] | 1 | <?xml version="1.0" encoding="utf-8"?>
|
kprice | de20a69 | 2008-04-24 00:27:47 +0000 | [diff] [blame] | 2 | <!--Arbortext, Inc., 1988-2006, 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="taddrdfn" xml:lang="en-us">
|
| 7 | <title>Adding redefine elements</title>
|
| 8 | <titlealts>
|
| 9 | <searchtitle>Adding redefine elements</searchtitle>
|
| 10 | </titlealts>
|
| 11 | <shortdesc>You can use the <codeph>redefine</codeph> mechanism to redefine
|
| 12 | simple and complex types, groups, and attribute groups obtained from external
|
| 13 | schema files. When you redefine a component, you are modifying its contents.</shortdesc>
|
| 14 | <prolog><metadata>
|
kprice | 9623e9d | 2007-05-03 03:43:05 +0000 | [diff] [blame] | 15 | <keywords><indexterm>XML schema editor<indexterm>adding redefine elements</indexterm></indexterm>
|
| 16 | <indexterm>XML schema files<indexterm>adding redefine elements</indexterm></indexterm>
|
kprice | 159fa58 | 2006-05-08 21:30:45 +0000 | [diff] [blame] | 17 | </keywords>
|
| 18 | </metadata></prolog>
|
| 19 | <taskbody>
|
| 20 | <context><p>Like the <codeph>include</codeph> mechanism, <codeph>redefine</codeph> requires
|
| 21 | the external components to be in the same target namespace as the redefining
|
| 22 | schema, although external components from schemas that have no namespace can
|
| 23 | also be redefined.</p><p>The following instructions were written for the Resource
|
| 24 | perspective, but they will also work in many other perspectives.</p><p>To
|
kprice | de20a69 | 2008-04-24 00:27:47 +0000 | [diff] [blame] | 25 | add a redefine element, complete the following steps:</p></context>
|
kprice | 159fa58 | 2006-05-08 21:30:45 +0000 | [diff] [blame] | 26 | <steps>
|
kprice | de20a69 | 2008-04-24 00:27:47 +0000 | [diff] [blame] | 27 | <step><cmd>Open your XML schema in the XML schema editor. In the Outline view,
|
| 28 | select your schema.</cmd><info>The entire schema and its contents are displayed
|
| 29 | in the Design view.</info></step>
|
kprice | 647b735 | 2006-05-17 21:27:16 +0000 | [diff] [blame] | 30 | <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] | 31 | and click <uicontrol>Add Redefine</uicontrol>.</cmd></step>
|
kprice | de20a69 | 2008-04-24 00:27:47 +0000 | [diff] [blame] | 32 | <step><cmd>In the Properties view, click the <b>General</b> tab and click
|
| 33 | the <uicontrol>Browse</uicontrol> <image href="../images/Browse.gif"><alt>This
|
| 34 | graphic is the Browse button</alt></image> button to the right of the <uicontrol>Schema
|
| 35 | location</uicontrol> field.</cmd><info>The XML schema file you select must
|
| 36 | have the same namespace as the current schema.</info></step>
|
| 37 | <step><cmd>If you want to import an XML schema located in the workbench:</cmd>
|
| 38 | <substeps>
|
| 39 | <substep><cmd>Select <uicontrol>Workbench projects</uicontrol> and click <uicontrol>Next</uicontrol>. </cmd>
|
| 40 | </substep>
|
| 41 | <substep><cmd>Select the schema you want to import and click <uicontrol>Finish</uicontrol>.</cmd>
|
| 42 | </substep>
|
| 43 | </substeps>
|
kprice | 159fa58 | 2006-05-08 21:30:45 +0000 | [diff] [blame] | 44 | </step>
|
kprice | de20a69 | 2008-04-24 00:27:47 +0000 | [diff] [blame] | 45 | <step><cmd>If you want to import an XML schema located on the Web:</cmd>
|
| 46 | <substeps>
|
| 47 | <substep><cmd>Select <uicontrol>HTTP</uicontrol> and click <uicontrol>Next</uicontrol>.</cmd>
|
| 48 | </substep>
|
| 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.
|
kprice | 159fa58 | 2006-05-08 21:30:45 +0000 | [diff] [blame] | 51 | Every time you validate your schema, the schema's contents will be checked
|
kprice | de20a69 | 2008-04-24 00:27:47 +0000 | [diff] [blame] | 52 | from the URL you specify.</note></info></substep>
|
| 53 | </substeps>
|
| 54 | </step><?Pub Caret?>
|
kprice | 159fa58 | 2006-05-08 21:30:45 +0000 | [diff] [blame] | 55 | <step><cmd>The XML schema editor will retrieve the location of the included
|
| 56 | XML schema file, and display it in the <uicontrol>Schema location</uicontrol> field.
|
| 57 | This field can be edited at any time to reflect the location of the XML schema
|
| 58 | file.</cmd></step>
|
| 59 | <step><cmd>Click the <uicontrol>Documentation</uicontrol> tab if you want
|
| 60 | to provide any information about this redefine element.</cmd><info>The <uicontrol>Documentation</uicontrol> page
|
kprice | 647b735 | 2006-05-17 21:27:16 +0000 | [diff] [blame] | 61 | is used for human readable material, such as a description.</info></step>
|
| 62 | <step><cmd>Click the <uicontrol>Extensions</uicontrol> tab if you want to
|
| 63 | add application information elements to your annotations of schema components.</cmd>
|
| 64 | <info>The <uicontrol>Extensions</uicontrol> page allows you to specify the
|
| 65 | schema and add XML content to your annotations.</info></step>
|
kprice | 159fa58 | 2006-05-08 21:30:45 +0000 | [diff] [blame] | 66 | </steps>
|
| 67 | <result><p>Once you have added the redefine element to your XML schema, you
|
| 68 | can redefine any of the simple and complex types, groups, and attribute groups
|
| 69 | in the XML schema you selected in the redefine element. </p></result>
|
| 70 | </taskbody>
|
| 71 | </task>
|
kprice | de20a69 | 2008-04-24 00:27:47 +0000 | [diff] [blame] | 72 | <?Pub *0000003931?>
|