blob: d3dacdb0703d5c39371e72de0340a6c5c7c58636 [file] [log] [blame]
kprice159fa582006-05-08 21:30:45 +00001<?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
10single artifact change, and have that change implemented throughout all other
11dependant 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
15XML 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
20to recover broken dependencies caused by artifact changes which cause ripple
21effects 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
24Navigator 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
27the artifact, click <menucascade><uicontrol>Refactor</uicontrol><uicontrol>Rename</uicontrol>
28</menucascade></cmd><info>A popup dialog will request the entry of a new name
29for 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
33open 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
40in 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>&lt;element name="foo"></li>
49</ul></stentry>
50<stentry><ul>
51<li>&lt;element ref="foo"></li>
52<li>&lt;element substitutionGroup="foo"</li>
53</ul></stentry>
54</strow>
55<strow>
56<stentry><ul>
57<li>&lt;simple/complexType name="foo"></li>
58</ul></stentry>
59<stentry><ul>
60<li>&lt;element type="foo"></li>
61<li>&lt;attribute type="foo"></li>
62<li>&lt;restriction base="foo"></li>
63<li>&lt;substitution base="foo"></li>
64</ul></stentry>
65</strow>
66<strow>
67<stentry><ul>
68<li>&lt;attribute name="foo"></li>
69</ul></stentry>
70<stentry><ul>
71<li>&lt;attribute ref="foo"></li>
72</ul></stentry>
73</strow>
74<strow>
75<stentry><ul>
76<li>&lt;attributeGroup name="foo"></li>
77</ul></stentry>
78<stentry><ul>
79<li>&lt;attributeGroup ref="foo"></li>
80</ul></stentry>
81</strow>
82<strow>
83<stentry><ul>
84<li>&lt;group name="foo"></li>
85</ul></stentry>
86<stentry><ul>
87<li>&lt;group ref="foo"></li>
88</ul></stentry>
89</strow>
90</simpletable></example>
91<postreq></postreq>
92</taskbody>
93</task>