<?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>XML schema files</indexterm><indexterm>XML schema editor</indexterm> | |
<indexterm>refactoring</indexterm><indexterm>renaming</indexterm><indexterm>editing | |
XML schemas</indexterm><indexterm>dependant artifacts</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><?Pub Caret?>.</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><element name="foo"></li> | |
</ul></stentry> | |
<stentry><ul> | |
<li><element ref="foo"></li> | |
<li><element substitutionGroup="foo"</li> | |
</ul></stentry> | |
</strow> | |
<strow> | |
<stentry><ul> | |
<li><simple/complexType name="foo"></li> | |
</ul></stentry> | |
<stentry><ul> | |
<li><element type="foo"></li> | |
<li><attribute type="foo"></li> | |
<li><restriction base="foo"></li> | |
<li><substitution base="foo"></li> | |
</ul></stentry> | |
</strow> | |
<strow> | |
<stentry><ul> | |
<li><attribute name="foo"></li> | |
</ul></stentry> | |
<stentry><ul> | |
<li><attribute ref="foo"></li> | |
</ul></stentry> | |
</strow> | |
<strow> | |
<stentry><ul> | |
<li><attributeGroup name="foo"></li> | |
</ul></stentry> | |
<stentry><ul> | |
<li><attributeGroup ref="foo"></li> | |
</ul></stentry> | |
</strow> | |
<strow> | |
<stentry><ul> | |
<li><group name="foo"></li> | |
</ul></stentry> | |
<stentry><ul> | |
<li><group ref="foo"></li> | |
</ul></stentry> | |
</strow> | |
</simpletable></example> | |
<postreq></postreq> | |
</taskbody> | |
</task> | |
<?Pub *0000003131?> |