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-->
|
| 3 | <!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
|
| 4 | <task id="refactoring" xml:lang="en-us">
|
| 5 | <title>Refactoring in XML Schema Files</title>
|
| 6 | <titlealts>
|
| 7 | <searchtitle>Refactoring in XML Schema Files</searchtitle>
|
| 8 | </titlealts>
|
| 9 | <shortdesc>Within an XML Schema file, refactoring allows authors to make a
|
| 10 | single artifact change, and have that change implemented throughout all other
|
| 11 | dependant artifacts.</shortdesc>
|
| 12 | <prolog><metadata>
|
| 13 | <keywords><indexterm>XML schema files</indexterm><indexterm>XML schema editor</indexterm>
|
| 14 | <indexterm>refactoring</indexterm><indexterm>renaming</indexterm><indexterm>editing
|
| 15 | XML schemas</indexterm><indexterm>dependant artifacts</indexterm></keywords>
|
| 16 | </metadata></prolog>
|
| 17 | <taskbody>
|
| 18 | <prereq></prereq>
|
| 19 | <context>Refactoring eliminates the need for the tedious editing necessary
|
| 20 | to recover broken dependencies caused by artifact changes which cause ripple
|
| 21 | effects on other dependant artifacts (such as renaming an XML Schema element).</context>
|
| 22 | <steps>
|
| 23 | <step><cmd>Create a new XML schema or double-click an existing schema in the
|
| 24 | Navigator view.</cmd><info> It will automatically open in the XML schema editor.</info>
|
| 25 | </step>
|
| 26 | <step><cmd>To refactor an artifact, position cursor within the artifact, right-click
|
| 27 | the artifact, click <menucascade><uicontrol>Refactor</uicontrol><uicontrol>Rename</uicontrol>
|
| 28 | </menucascade></cmd><info>A popup dialog will request the entry of a new name
|
| 29 | for that artifact</info>
|
| 30 | <substeps>
|
| 31 | <substep><cmd>Type in the new name of the artifact.</cmd></substep>
|
| 32 | <substep><cmd><b><i>Optional:</i></b> Click Preview.</cmd><info>A window will
|
| 33 | open indicating all of the changes which will take place due to the refactoring.</info>
|
| 34 | </substep>
|
| 35 | <substep><cmd>Click <uicontrol>OK.</uicontrol></cmd></substep>
|
| 36 | </substeps>
|
| 37 | </step>
|
| 38 | </steps>
|
| 39 | <result>The new name will be entered in the opened XSD source, as well as
|
| 40 | in all dependant artifacts</result>
|
| 41 | <example><b><u>Component References in XML Schema</u></b><simpletable>
|
| 42 | <sthead>
|
| 43 | <stentry>Global named components</stentry>
|
| 44 | <stentry>Reference</stentry>
|
| 45 | </sthead>
|
| 46 | <strow>
|
| 47 | <stentry><ul>
|
| 48 | <li><element name="foo"></li>
|
| 49 | </ul></stentry>
|
| 50 | <stentry><ul>
|
| 51 | <li><element ref="foo"></li>
|
| 52 | <li><element substitutionGroup="foo"</li>
|
| 53 | </ul></stentry>
|
| 54 | </strow>
|
| 55 | <strow>
|
| 56 | <stentry><ul>
|
| 57 | <li><simple/complexType name="foo"></li>
|
| 58 | </ul></stentry>
|
| 59 | <stentry><ul>
|
| 60 | <li><element type="foo"></li>
|
| 61 | <li><attribute type="foo"></li>
|
| 62 | <li><restriction base="foo"></li>
|
| 63 | <li><substitution base="foo"></li>
|
| 64 | </ul></stentry>
|
| 65 | </strow>
|
| 66 | <strow>
|
| 67 | <stentry><ul>
|
| 68 | <li><attribute name="foo"></li>
|
| 69 | </ul></stentry>
|
| 70 | <stentry><ul>
|
| 71 | <li><attribute ref="foo"></li>
|
| 72 | </ul></stentry>
|
| 73 | </strow>
|
| 74 | <strow>
|
| 75 | <stentry><ul>
|
| 76 | <li><attributeGroup name="foo"></li>
|
| 77 | </ul></stentry>
|
| 78 | <stentry><ul>
|
| 79 | <li><attributeGroup ref="foo"></li>
|
| 80 | </ul></stentry>
|
| 81 | </strow>
|
| 82 | <strow>
|
| 83 | <stentry><ul>
|
| 84 | <li><group name="foo"></li>
|
| 85 | </ul></stentry>
|
| 86 | <stentry><ul>
|
| 87 | <li><group ref="foo"></li>
|
| 88 | </ul></stentry>
|
| 89 | </strow>
|
| 90 | </simpletable></example>
|
| 91 | <postreq></postreq>
|
| 92 | </taskbody>
|
| 93 | </task>
|