| <?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| <html lang="en-us" xml:lang="en-us"> |
| <head> |
| <meta content="text/html; charset=utf-8" http-equiv="Content-Type" /> |
| <meta name="copyright" content="Copyright (c) 2000, 2008 IBM Corporation and others. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html. Contributors: IBM Corporation - initial API and implementation" /> |
| <meta name="DC.rights.owner" content="(C) Copyright 2000, 2008" /> |
| <meta content="public" name="security" /> |
| <meta content="index,follow" name="Robots" /> |
| <meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' /> |
| <meta content="reference" name="DC.Type" /> |
| <meta name="DC.Title" content="Referential integrity in the XML schema editor" /> |
| <meta name="abstract" content="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." /> |
| <meta name="description" content="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." /> |
| <meta content="XML schema editor, referential integrity, clean up in" name="DC.subject" /> |
| <meta content="XML schema editor, referential integrity, clean up in" name="keywords" /> |
| <meta scheme="URI" name="DC.Relation" content="../topics/cxmlsced.html" /> |
| <meta scheme="URI" name="DC.Relation" content="../topics/tedtschm.html" /> |
| <meta scheme="URI" name="DC.Relation" content="../topics/tdelscmp.html" /> |
| <meta content="XHTML" name="DC.Format" /> |
| <meta content="rrefintg" name="DC.Identifier" /> |
| <meta content="en-us" name="DC.Language" /> |
| <link href="../../org.eclipse.wst.doc.user/common.css" type="text/css" rel="stylesheet" /> |
| <title>Referential integrity</title> |
| </head> |
| <body id="rrefintg"><a name="rrefintg"><!-- --></a> |
| |
| |
| <h1 class="topictitle1">Referential integrity in the XML schema editor</h1> |
| |
| |
| |
| |
| <div><p>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.</p> |
| |
| <div class="section">When you define a complex type, you can add a content model to it |
| and reference a global element. <div class="p">For example:<pre><schema> |
| <element name="comment" type="string"> |
| <complexType name="Items"> |
| <sequence> |
| <element ref="comment"> |
| </sequence> |
| </complexType> |
| </schema></pre> |
| </div> |
| <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> |
| |
| </ul> |
| </div> |
| |
| <div class="section"><h4 class="sectiontitle">Deleting included and imported schema</h4><div class="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.</div> |
| </div> |
| |
| </div> |
| |
| <div><div class="relconcepts"><strong>Related concepts</strong><br /> |
| <div><a href="../topics/cxmlsced.html" title="This product provides an XML schema editor for creating, viewing, and validating XML schemas. XML schemas are a formal specification of element names that indicates which elements are allowed in an XML file, and in which combinations.">XML schema editor</a></div> |
| </div> |
| <div class="reltasks"><strong>Related tasks</strong><br /> |
| <div><a href="../topics/tedtschm.html" title="After you create an XML schema, you can edit its various properties, such as its namespace and prefix.">Editing XML schema properties</a></div> |
| <div><a href="../topics/tdelscmp.html" title="If you have created any XML schema components you no longer need, you can delete them.">Deleting XML schema components</a></div> |
| </div> |
| </div> |
| |
| </body> |
| </html> |