<?xml version="1.0" encoding="utf-8"?> | |
<!--Arbortext, Inc., 1988-2005, v.4002--> | |
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"> | |
<task id="taddrdfn" xml:lang="en-us"> | |
<title>Adding redefine elements</title> | |
<titlealts> | |
<searchtitle>Adding redefine elements</searchtitle> | |
</titlealts> | |
<shortdesc>You can use the <codeph>redefine</codeph> mechanism to redefine | |
simple and complex types, groups, and attribute groups obtained from external | |
schema files. When you redefine a component, you are modifying its contents.</shortdesc> | |
<prolog><metadata> | |
<keywords><indexterm>XML schema editor<indexterm>adding<indexterm>redefine | |
elements</indexterm></indexterm></indexterm><indexterm>XML schema editor<indexterm>redefine | |
elements<indexterm>adding</indexterm></indexterm></indexterm><indexterm>XML | |
schema files<indexterm>adding<indexterm>redefine elements</indexterm></indexterm></indexterm> | |
<indexterm>XML schema files<indexterm>redefine elements<indexterm>adding</indexterm></indexterm></indexterm> | |
</keywords> | |
</metadata></prolog> | |
<taskbody> | |
<context><p>Like the <codeph>include</codeph> mechanism, <codeph>redefine</codeph> requires | |
the external components to be in the same target namespace as the redefining | |
schema, although external components from schemas that have no namespace can | |
also be redefined.</p><p>The following instructions were written for the Resource | |
perspective, but they will also work in many other perspectives.</p><p>To | |
add a redefine element , follow these steps:</p></context> | |
<steps> | |
<step><cmd>Open your XML schema in the XML schema editor.</cmd></step> | |
<step><cmd>In the Outline view, select your schema.</cmd><info>The entire | |
schema and its contents should be displayed in the Graph view.</info></step> | |
<step><cmd>In the Graph view, right-click in the <b>Directives</b> section | |
and click <uicontrol>Add Redefine</uicontrol>.</cmd></step> | |
<step><cmd>In the Properties view, click the <b>General</b> tab and click | |
the <uicontrol>Browse</uicontrol> <image href="../images/Browse.gif"><alt>This | |
graphic is the Browse button</alt></image> button to the right of the <uicontrol>Schema | |
location</uicontrol> field.</cmd><info>The XML schema file you select must | |
have the same namespace as the current schema.</info></step> | |
<step><cmd>If you want to select an XML schema located in the workbench, select | |
the <uicontrol>Workbench projects</uicontrol> radio button and click <uicontrol>Next.</uicontrol></cmd> | |
<substeps> | |
<substep><cmd> Select the schema you want to include and click <uicontrol>Finish</uicontrol>.</cmd> | |
</substep> | |
</substeps> | |
</step> | |
<step><cmd>If you want to select an XML schema located on the Web, select | |
the <uicontrol>HTTP</uicontrol> radio button and click <uicontrol>Next</uicontrol>.</cmd> | |
<substeps> | |
<substep><cmd>Type the URL of the XML schema and click <uicontrol>Finish</uicontrol>. | |
</cmd></substep> | |
</substeps> | |
<info> <note>A local copy of the schema will not be stored in the workbench. | |
Every time you validate your schema, the schema's contents will be checked | |
from the URL you specify.</note></info></step> | |
<step><cmd>The XML schema editor will retrieve the location of the included | |
XML schema file, and display it in the <uicontrol>Schema location</uicontrol> field. | |
This field can be edited at any time to reflect the location of the XML schema | |
file.</cmd></step> | |
<step><cmd>Click the <uicontrol>Documentation</uicontrol> tab if you want | |
to provide any information about this redefine element.</cmd><info>The <uicontrol>Documentation</uicontrol> page | |
is used for human readable material, such as a description, and the <uicontrol>App | |
Info</uicontrol> page can be used to provide information for applications.</info> | |
</step> | |
</steps> | |
<result><p>Once you have added the redefine element to your XML schema, you | |
can redefine any of the simple and complex types, groups, and attribute groups | |
in the XML schema you selected in the redefine element. </p></result> | |
</taskbody> | |
</task> |