blob: 5f3dbdc703f8849012a976bb1b1baeae19e7fc7c [file] [log] [blame]
syeshinbefd53e2005-07-27 18:16:40 +00001<?xml version="1.0" encoding="UTF-8"?>
2<!DOCTYPE html
3 PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4<html>
5<head>
syeshinaaa21932005-09-22 17:13:22 +00006<!-- /*******************************************************************************
7 * Copyright (c) 2000, 2005 IBM Corporation and others.
8 * All rights reserved. This program and the accompanying materials
9 * are made available under the terms of the Eclipse Public License v1.0
10 * which accompanies this distribution, and is available at
11 * http://www.eclipse.org/legal/epl-v10.html
12 *
13 * Contributors:
14 * IBM Corporation - initial API and implementation
15 *******************************************************************************/ -->
16<link rel="stylesheet" type="text/css" href="../../org.eclipse.wst.doc.user/common.css" />
syeshind0bdb8e2005-10-27 17:44:14 +000017<title>Editing DOCTYPE declarations</title>
syeshin66078272005-09-20 16:53:38 +000018</head>
syeshind0bdb8e2005-10-27 17:44:14 +000019<body id="tedtdoc"><a name="tedtdoc"><!-- --></a>
20<h1 class="topictitle1">Editing DOCTYPE declarations</h1>
syeshinbefd53e2005-07-27 18:16:40 +000021<div><p>The DOCTYPE declaration in an XML file is used at the beginning
22of it to associate it with a DTD file. You can edit your DOCTYPE declaration
23to change the DTD file your XML file is associated with.</p><div class="skipspace"><p>The following instructions were written for the Resource perspective,
24but they will also work in many other perspectives.</p>
25<p>To edit your DOCTYPE
26declaration, follow these steps:</p>
27</div>
28<ol><li class="skipspace"><span>In the Design view of the XML editor, right-click <span class="uicontrol">DOCTYPE</span> and
syeshind0bdb8e2005-10-27 17:44:14 +000029click <b> <span class="uicontrol">Edit DOCTYPE</span></b>.</span></li>
30<li class="skipspace"><span>The value in the <b> <span class="uicontrol">Root element
31name</span></b> field
syeshinbefd53e2005-07-27 18:16:40 +000032should match the root element of your XML file exactly.</span> You should
33only edit the value in this field if your root element changes.</li>
syeshind0bdb8e2005-10-27 17:44:14 +000034<li class="skipspace"><span>You can select a <b>Public ID</b> for any existing XML Catalog entries
35by clicking <b> <span class="uicontrol">Browse</span></b>. </span> The value in the
36<b> <span class="uicontrol">Public
37ID</span></b> field is the Public Identifier. It is used to associate the
syeshinbefd53e2005-07-27 18:16:40 +000038XML file (using an XML Catalog entry) with a DTD file. For more information
39on XML Catalog entries, refer to the related tasks below.</li>
syeshind0bdb8e2005-10-27 17:44:14 +000040<li class="skipspace"><span>The value in the <b> <span class="uicontrol">System ID</span>
41</b>field is the
lmandele330a622005-12-07 07:50:03 +000042DTD the XML file is associated with. Type the path of the DTD file (or browse
43for it) you want
syeshinbefd53e2005-07-27 18:16:40 +000044the XML file associated with in this field. </span> <b>Note</b>: When
45the XML file is processed by the XML processor, it will first try to use the
46Public ID to locate the DTD, and if this fails, it will use the System ID
47to find it.</li>
syeshind0bdb8e2005-10-27 17:44:14 +000048<li class="skipspace"><span>Click <b> <span class="uicontrol">OK</span></b>.</span></li>
syeshinbefd53e2005-07-27 18:16:40 +000049</ol>
syeshind0bdb8e2005-10-27 17:44:14 +000050<div class="section">If you do not have a DOCTYPE declaration in your XML file, you can
51right-click in the Design view and click <b> <span class="uicontrol">Add DTD Information</span></b> to
52add one.</div>
syeshinbefd53e2005-07-27 18:16:40 +000053</div>
54
55<div>
56
57<p><b class="relconceptshd">Related concepts</b><br />
58<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 />
59</p>
60<p><b class="reltaskshd">Related tasks</b><br />
61<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 />
syeshind0bdb8e2005-10-27 17:44:14 +000062<a href="../topics/txmlcat.html" title="Adding an entry to the XML Catalog">Adding an entry to the XML Catalog</a><br />
63<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>
64<a href="txedtdes.html">Editing in the XML design view</a><br />
syeshinbefd53e2005-07-27 18:16:40 +000065</p>
syeshin66078272005-09-20 16:53:38 +000066</div>
syeshinbefd53e2005-07-27 18:16:40 +000067</body>
68</html>