blob: 287a3d84c839aeaaefbdc269984ec6e27e1d3e3e [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<!-- /*******************************************************************************
* Copyright (c) 2000, 2005 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
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/ -->
<link rel="stylesheet" type="text/css" href="../../org.eclipse.wst.doc.user/common.css" />
<title>Editing your namespace information</title>
<body id="tedtsch"><a name="tedtsch"><!-- --></a>
<h1 class="topictitle1">Editing your namespace information</h1>
<div><p>Your namespace information is used to provide various information about the XML file, such as the XML schema and namespace it is associated with. If desired, you can change the schema and namespace your XML file
is associated with or add a new association. Modifying any associations can
impact what content is allowed in the XML file.</p>
<div class="section"><p>The following instructions were written for the Resource perspective,
but they will also work in many other perspectives.</p>
<p>To edit your schema
information, follow these steps:</p>
<ol><li class="skipspace"><span>In the Design view of the XML editor, right-click
your root element and click <b> <span class="uicontrol">Edit Namespaces</span></b>.</span></li>
<li class="skipspace"><span>Your XML file may be associated with more than one namespace or
schema.</span> Select the entry you want to edit and click <b> <span class="uicontrol">Edit</span></b>.</li>
<li class="skipspace"><span>The value in the <b> <span class="uicontrol">Namespace Name</span></b> field is
a namespace the XML file is associated with.</span> Your XML file should
be associated with the same namespace(s) its XML schema is associated with.
For more information about namespaces, refer to the related reference.</li>
<li class="skipspace"><span>All qualified elements and attributes in the XML file associated
with the namespace will be prefixed with the <b> <span class="uicontrol">Prefix</span></b> value.</span></li>
<li class="skipspace"><span>The <b> <span class="uicontrol">Location Hint</span>
</b>field contains the location
of the XML schema the XML file is associated with.</span> An XML Catalog
Key or a namespace name can be specified in this field. Click <b> <span class="uicontrol">Browse</span></b>
to view all XML schemas in the workbench and XML Catalog.</li>
<li class="skipspace"><span>Click <b> <span class="uicontrol">OK</span></b>, then click
<b> <span class="uicontrol">OK</span></b> again.</span></li>
<div class="skipspace"><p>If you want to create a new association, click <b> <span class="uicontrol">Add</span></b> instead
of <b> <span class="uicontrol">Edit</span></b>. You can then either click the <span class="uicontrol">S<b>pecify
From Registered Namespace</b></span> radio button and select the namespace
declarations you want to add or click the <b> <span class="uicontrol">Specify New Namespace</span></b> radio
button and fill in the fields as necessary. </p>
<div class="section">If you do not have namespace information in your XML file, you
can right-click your root element in the Design view and click <b> <span class="uicontrol">Edit
Namespaces</span></b> to add it. If you do not have a root element, you must
create one before you can add the namespace information.</div>
<p><b class="relconceptshd">Related concepts</b><br />
<a href="../topics/cxmlcat.html" title="There are two different ways to associate XML files with DTDs or XML schemas.">XML file associations with DTDs and XML schemas</a><br />
<p><b class="reltaskshd">Related tasks</b><br />
<a href="../topics/tedtcnst.html" title="In the Design view, when you edit an XML file that has a set of constraints (that is, a set of rules) defined by a DTD or an XML schema, you can turn the constraints on and off to provide flexibility in the way you edit, but still maintain the validity of the document periodically.">Editing with DTD or XML schema constraints</a><br />
<a href="../topics/txmlcat.html" title="Adding an entry to the XML Catalog">Adding an entry to the XML Catalog</a><br />
<a href="../topics/tedtgram.html" title="If you make changes to a DTD file or XML schema associated with an XML file (that is currently open), click XML &gt; Reload Dependencies to update the XML file with these changes.">Updating XML files with changes made to DTDs and schemas</a><br />
<a href="../topics/txedtdes.html" title="The XML editor has a Design view, which represents the XML file simultaneously as a table and a tree. This helps make navigation and editing easier. Content and attribute values can be edited directly in the table cells, while pop-up menus on the tree elements give alternatives that are valid for that particular element.">Editing in the Design view</a>
<p><strong>Related information</strong><br />
<a href="../../org.eclipse.wst.xsdeditor.doc.user/topics/rnmspc.html">XML namespaces</a></div>