blob: 17e6a0dd7a4f6f951ca37291f31986c72fac209f [file] [log] [blame]
kpriceef160682006-08-29 18:08:31 +00001<?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">
2<html lang="en-us" xml:lang="en-us">
syeshinbefd53e2005-07-27 18:16:40 +00003<head>
kpriceef160682006-08-29 18:08:31 +00004<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
kpriceb59c9f62008-04-02 21:24:37 +00005<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" />
6<meta name="DC.rights.owner" content="(C) Copyright 2000, 2008" />
kpriceef160682006-08-29 18:08:31 +00007<meta content="public" name="security" />
8<meta content="index,follow" name="Robots" />
9<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))' />
10<meta content="task" name="DC.Type" />
11<meta name="DC.Title" content="Editing namespace information" />
12<meta name="abstract" content="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." />
13<meta name="description" content="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." />
kpriceb59c9f62008-04-02 21:24:37 +000014<meta content="XML editor, namespace information, XML files" name="DC.subject" />
15<meta content="XML editor, namespace information, XML files" name="keywords" />
kpriceef160682006-08-29 18:08:31 +000016<meta scheme="URI" name="DC.Relation" content="../topics/cxmlcat.html" />
17<meta scheme="URI" name="DC.Relation" content="../topics/tedtcnst.html" />
18<meta scheme="URI" name="DC.Relation" content="../topics/txmlcat.html" />
19<meta scheme="URI" name="DC.Relation" content="../topics/tedtgram.html" />
20<meta scheme="URI" name="DC.Relation" content="../../org.eclipse.wst.xsdeditor.doc.user/topics/rnmspc.html" />
21<meta scheme="URI" name="DC.Relation" content="../topics/txedtdes.html" />
22<meta content="XHTML" name="DC.Format" />
23<meta content="tedtsch" name="DC.Identifier" />
24<meta content="en-us" name="DC.Language" />
25<link href="../../org.eclipse.wst.doc.user/common.css" type="text/css" rel="stylesheet" />
26<title>Editing namespace information</title>
syeshin66078272005-09-20 16:53:38 +000027</head>
syeshinbefd53e2005-07-27 18:16:40 +000028<body id="tedtsch"><a name="tedtsch"><!-- --></a>
29
kpriceef160682006-08-29 18:08:31 +000030
31<h1 class="topictitle1">Editing namespace information</h1>
32
33
34
35
36<div><p>Your namespace information is used to provide various information
37about the XML file, such as the XML schema and namespace it is associated
38with. If desired, you can change the schema and namespace your XML file is
39associated with or add a new association. Modifying any associations can impact
40what content is allowed in the XML file.</p>
41
syeshind0bdb8e2005-10-27 17:44:14 +000042<div class="section"><p>The following instructions were written for the Resource perspective,
syeshinbefd53e2005-07-27 18:16:40 +000043but they will also work in many other perspectives.</p>
44<p>To edit your schema
kpriceb59c9f62008-04-02 21:24:37 +000045information, complete the following steps:</p>
syeshinbefd53e2005-07-27 18:16:40 +000046</div>
kpriceef160682006-08-29 18:08:31 +000047
48<ol>
49<li class="stepexpand"><span>In the Design view of the XML editor, right-click your root element
50and click <span class="uicontrol">Edit Namespaces</span>.</span></li>
51
52<li class="stepexpand"><span>Your XML file can be associated with more than one namespace or
53schema.</span> Select the entry you want to edit and click <span class="uicontrol">Edit</span>.
54</li>
55
56<li class="stepexpand"><span>The value in the <span class="uicontrol">Namespace Name</span> field is
syeshinbefd53e2005-07-27 18:16:40 +000057a namespace the XML file is associated with.</span> Your XML file should
58be associated with the same namespace(s) its XML schema is associated with.
kpriceb59c9f62008-04-02 21:24:37 +000059For more information about namespaces, refer to the related reference. For
60more information, see <a href="/../../org.eclipse.wst.xsdeditor.doc.user/topics/rnmspc.dita">XML namespaces</a>.</li>
kpriceef160682006-08-29 18:08:31 +000061
62<li class="stepexpand"><span>All qualified elements and attributes in the XML file associated
63with the namespace will be prefixed with the <span class="uicontrol">Prefix</span> value.</span>
64</li>
65
66<li class="stepexpand"><span>The <span class="uicontrol">Location Hint</span> field contains the location
syeshinbefd53e2005-07-27 18:16:40 +000067of the XML schema the XML file is associated with.</span> An XML Catalog
kpriceef160682006-08-29 18:08:31 +000068Key or a namespace name can be specified in this field. Click <span class="uicontrol">Browse</span> to
69view all XML schemas in the workbench and XML Catalog.</li>
70
71<li class="stepexpand"><span>Click <span class="uicontrol">OK</span>, then click <span class="uicontrol">OK</span> again.</span>
72</li>
73
syeshinbefd53e2005-07-27 18:16:40 +000074</ol>
kpriceef160682006-08-29 18:08:31 +000075
76<div class="section"><p>If you want to create a new association, click <span class="uicontrol">Add</span> instead
kpriceb59c9f62008-04-02 21:24:37 +000077of <span class="uicontrol">Edit</span>. You can then either select the <span class="uicontrol">Specify
kpriceef160682006-08-29 18:08:31 +000078From Registered Namespace</span> radio button and select the namespace
kpriceb59c9f62008-04-02 21:24:37 +000079declarations you want to add or select the <span class="uicontrol">Specify New Namespace</span> radio
kpriceef160682006-08-29 18:08:31 +000080button and fill in the fields as necessary.</p>
syeshinbefd53e2005-07-27 18:16:40 +000081</div>
kpriceef160682006-08-29 18:08:31 +000082
83<div class="section">If you do not have namespace information in your XML file, you can
84right-click your root element in the Design view and click <span class="uicontrol">Edit
85Namespaces</span> to add it. If you do not have a root element, you must
syeshind0bdb8e2005-10-27 17:44:14 +000086create one before you can add the namespace information.</div>
kpriceef160682006-08-29 18:08:31 +000087
syeshinbefd53e2005-07-27 18:16:40 +000088</div>
89
kpriceef160682006-08-29 18:08:31 +000090<div><div class="relconcepts"><strong>Related concepts</strong><br />
91<div><a href="../topics/cxmlcat.html" title="When an XML file is associated with a DTD or XML schema, it is bound by any structural rules contained in the DTD or XML schema. To be considered a valid XML file, a document must be accompanied by a DTD or an XML schema, and conform to all of the declarations in the DTD or the XML schema.">XML file associations with DTDs and XML schemas</a></div>
92</div>
93<div class="reltasks"><strong>Related tasks</strong><br />
kpriceb59c9f62008-04-02 21:24:37 +000094<div><a href="../topics/tedtcnst.html" title="In the Design view, when you edit an XML file that has a set of constraints or 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></div>
95<div><a href="../topics/txmlcat.html" title="An XML Catalog entry contains two parts - a Key (which represents a DTD or XML schema) and a Location (similar to a URI, which contains information about a DTD or XML schema's location). You can place the Key in an XML file. When the XML processor encounters it, it will use the XML Catalog entry to find the location of the DTD or XML schema associated with the Key">Adding entries to the XML Catalog</a></div>
kpriceef160682006-08-29 18:08:31 +000096<div><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. The changes will be reflected in the guided editing mechanisms available in the editor, such as content assist.">Updating XML files with changes made to DTDs and schemas</a></div>
97<div><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></div>
98</div>
99<div class="relinfo"><strong>Related information</strong><br />
100<div><a href="../../org.eclipse.wst.xsdeditor.doc.user/topics/rnmspc.html">XML namespaces</a></div>
101</div>
102</div>
syeshinbefd53e2005-07-27 18:16:40 +0000103
syeshinbefd53e2005-07-27 18:16:40 +0000104</body>
105</html>