blob: 812b302209ce01dc82a61ce94a7dcf062f9f4fd6 [file] [log] [blame]
<?xml version="1.0" encoding="utf-8"?>
<!--Arbortext, Inc., 1988-2006, v.4002-->
<!DOCTYPE reference PUBLIC "-//OASIS//DTD DITA Reference//EN"
<reference id="rrefintg" xml:lang="en-us">
<title>Referential integrity in the XML schema editor</title>
<searchtitle>Referential integrity</searchtitle>
<shortdesc>The XML schema editor has a built-in mechanism to handle referential
integrity issues. When you delete certain nodes, clean up for any nodes affected
will automatically occur.</shortdesc>
<keywords><indexterm>XML schema editor<indexterm>referential integrity</indexterm></indexterm>
<indexterm>XML schema editor<indexterm>clean up in</indexterm></indexterm>
<section>When you define a complex type, you can add a content model to it
and reference a global element. <p>For example:<codeblock>&lt;schema>
&lt;element name="comment" type="string">
&lt;complexType name="Items">
<?Pub Caret?> &lt;element ref="comment">
&lt;/schema></codeblock></p><p>If the global element (comment) was deleted,
all references to it would be in error. However, when you delete the global
element, the XML schema editor will clean up using the following algorithm:</p><ul>
<li>If there are one or more global elements in the schema, it will change
all existing references to the first global element.</li>
<li>If there is no global element, then it will delete the element reference
from the content model.</li>
<section><title>Deleting included and imported schema</title><p>If an included
or imported schema is deleted, you must manually reset the following type
references as appropriate: <ul>
<li>Global element and element's type.</li>
<li>Attribute type.</li>
<li>Complex type derivation.</li>
<li>Simple type derivation.</li>
</ul>They will not automatically be reset if an included or imported schema
is deleted.</p></section>
<?Pub *0000002046?>