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