blob: 97d9893195184a3b352319851893c1c6600568ad [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 reference PUBLIC "-//OASIS//DTD DITA Reference//EN" "reference.dtd">
4<reference id="rrefintg" xml:lang="en-us">
5<title>Referential integrity in the XML schema editor</title>
6<titlealts>
7<searchtitle>Referential integrity</searchtitle>
8</titlealts>
9<shortdesc>The XML schema editor has a built-in mechanism to handle referential
10integrity issues. When you delete certain nodes, clean up for any nodes affected
11will automatically occur.</shortdesc>
12<prolog><metadata>
13<keywords><indexterm>XML schema editor<indexterm>referential integrity</indexterm></indexterm>
14<indexterm>XML schema editor<indexterm>clean up in</indexterm></indexterm>
15</keywords>
16</metadata></prolog>
17<refbody>
18<section>When you define a complex type, you can add a content model to it
19and reference a global element. <p>For example:<codeblock>&lt;schema>
20 &lt;element name="comment" type="string">
21 &lt;complexType name="Items">
22 &lt;sequence>
23 &lt;element ref="comment">
24 &lt;/sequence>
25 &lt;/complexType>
26&lt;/schema></codeblock></p><p>If the global element (comment) was deleted,
27all references to it would be in error. However, when you delete the global
28element, the XML schema editor will clean up using the following algorithm:</p><ul>
29<li>If there are one or more global elements in the schema, it will change
30all existing references to the first global element.</li>
31<li>If there is no global element, then it will delete the element reference
32from the content model.</li>
33</ul></section>
34<section><title>Deleting included and imported schema</title><p>If an included
35or imported schema is deleted, you must manually reset the following type
36references as appropriate: <ul>
37<li>Global element and element's type</li>
38<li>Attribute type</li>
39<li>Complex type derivation</li>
40<li>Simple type derivation </li>
41</ul>They will not automatically be reset if an included or imported schema
42is deleted.</p></section>
43</refbody>
44</reference>