blob: eea3411bff204487a04d8eb68eaf9331f822d5d9 [file] [log] [blame]
<?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="refactoring" xml:lang="en-us">
<title>Refactoring in XML Schema Files</title>
<titlealts>
<searchtitle>Refactoring in XML Schema Files</searchtitle>
</titlealts>
<shortdesc>Within an XML Schema file, refactoring allows authors to make a
single artifact change, and have that change implemented throughout all other
dependant artifacts.</shortdesc>
<prolog><metadata>
<keywords><indexterm>dependent artifacts<indexterm>refactorting XML schema files</indexterm></indexterm>
<indexterm>refactoring<indexterm>XML schema files</indexterm></indexterm>
<indexterm>renaming<indexterm>XML schema files</indexterm></indexterm>
<indexterm>XML schemas<indexterm>editing</indexterm></indexterm>
</keywords>
</metadata></prolog>
<taskbody>
<prereq></prereq>
<context>Refactoring eliminates the need for the tedious editing necessary
to recover broken dependencies caused by artifact changes which cause ripple
effects on other dependant artifacts (such as renaming an XML Schema element).</context>
<steps>
<step><cmd>Create a new XML schema or double-click an existing schema in the
Navigator view.</cmd><info> It will automatically open in the XML schema editor.</info>
</step>
<step><cmd>To refactor an artifact, position cursor within the artifact, right-click
the artifact, click <menucascade><uicontrol>Refactor</uicontrol><uicontrol>Rename</uicontrol>
</menucascade></cmd><info>A popup dialog will request the entry of a new name
for that artifact</info>
<substeps>
<substep><cmd>Type in the new name of the artifact.</cmd></substep>
<substep><cmd>(Optional) Click <b>Preview</b>.</cmd><info>A window
will open indicating all of the changes which will take place due to the refactoring.</info>
</substep>
<substep><cmd>Click <uicontrol>OK.</uicontrol></cmd></substep>
</substeps>
</step>
</steps>
<result>The new name will be entered in the opened XSD source, as well as
in all dependant artifacts</result>
<example><b><u>Component References in XML Schema</u></b><simpletable>
<sthead>
<stentry>Global named components</stentry>
<stentry>Reference</stentry>
</sthead>
<strow>
<stentry><ul>
<li>&lt;element name="foo"></li>
</ul></stentry>
<stentry><ul>
<li>&lt;element ref="foo"></li>
<li>&lt;element substitutionGroup="foo"</li>
</ul></stentry>
</strow>
<strow>
<stentry><ul>
<li>&lt;simple/complexType name="foo"></li>
</ul></stentry>
<stentry><ul>
<li>&lt;element type="foo"></li>
<li>&lt;attribute type="foo"></li>
<li>&lt;restriction base="foo"></li>
<li>&lt;substitution base="foo"></li>
</ul></stentry>
</strow>
<strow>
<stentry><ul>
<li>&lt;attribute name="foo"></li>
</ul></stentry>
<stentry><ul>
<li>&lt;attribute ref="foo"></li>
</ul></stentry>
</strow>
<strow>
<stentry><ul>
<li>&lt;attributeGroup name="foo"></li>
</ul></stentry>
<stentry><ul>
<li>&lt;attributeGroup ref="foo"></li>
</ul></stentry>
</strow>
<strow>
<stentry><ul>
<li>&lt;group name="foo"></li>
</ul></stentry>
<stentry><ul>
<li>&lt;group ref="foo"></li>
</ul></stentry>
</strow>
</simpletable></example>
<postreq></postreq>
</taskbody>
</task>
<?Pub *0000003131?>