blob: 4d877a3400bfe8433b9c194767940c0b74deee5f [file] [log] [blame]
<?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, 2006 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, 2006" />
<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="task" name="DC.Type" />
<meta name="DC.Title" content="Editing DOCTYPE declarations" />
<meta name="abstract" content="The DOCTYPE declaration in an XML file is used at the beginning of it to associate it with a DTD file. You can edit your DOCTYPE declaration to change the DTD file your XML file is associated with." />
<meta name="description" content="The DOCTYPE declaration in an XML file is used at the beginning of it to associate it with a DTD file. You can edit your DOCTYPE declaration to change the DTD file your XML file is associated with." />
<meta content="XML editor, editing, DOCTYPE declarations, XML files" name="DC.subject" />
<meta content="XML editor, editing, DOCTYPE declarations, XML files" name="keywords" />
<meta scheme="URI" name="DC.Relation" content="../topics/cxmlcat.html" />
<meta scheme="URI" name="DC.Relation" content="../topics/tedtcnst.html" />
<meta scheme="URI" name="DC.Relation" content="../topics/txmlcat.html" />
<meta scheme="URI" name="DC.Relation" content="../topics/tedtgram.html" />
<meta scheme="URI" name="DC.Relation" content="../topics/txedtdes.html" />
<meta content="XHTML" name="DC.Format" />
<meta content="tedtdoc" 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>Editing DOCTYPE declarations</title>
</head>
<body id="tedtdoc"><a name="tedtdoc"><!-- --></a>
<h1 class="topictitle1">Editing DOCTYPE declarations</h1>
<div><p>The DOCTYPE declaration in an XML file is used at the beginning
of it to associate it with a DTD file. You can edit your DOCTYPE declaration
to change the DTD file your XML file is associated with.</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 DOCTYPE
declaration, follow these steps:</p>
</div>
<ol>
<li class="stepexpand"><span>In the Design view of the XML editor, right-click <span class="uicontrol">DOCTYPE</span> and
click <span class="uicontrol">Edit DOCTYPE</span>.</span></li>
<li class="stepexpand"><span>The value in the <span class="uicontrol">Root element name</span> field
should match the root element of your XML file exactly.</span> You should
only edit the value in this field if your root element changes.</li>
<li class="stepexpand"><span>You can select a Public ID for any existing XML Catalog entries
by clicking <span class="uicontrol">Browse</span>. </span> The value in the <span class="uicontrol">Public
ID</span> field is the Public Identifier. It is used to associate the
XML file (using an XML Catalog entry) with a DTD file. For more information
on XML Catalog entries, refer to the related tasks.</li>
<li class="stepexpand"><span>The value in the <span class="uicontrol">System ID</span> field is the
DTD the XML file is associated with. Type the path of the DTD file (or browse
for it) you want the XML file associated with in this field. </span> <strong>Note</strong>:
When the XML file is processed by the XML processor, it will first try to
use the Public ID to locate the DTD, and if this fails, it will use the System
ID to find it.</li>
<li class="stepexpand"><span>Click <span class="uicontrol">OK</span>.</span></li>
</ol>
<div class="section">If you do not have a DOCTYPE declaration in your XML file, you can
right-click in the Design view and click <span class="uicontrol">Add DTD Information</span> to
add one.</div>
</div>
<div><div class="relconcepts"><strong>Related concepts</strong><br />
<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>
</div>
<div class="reltasks"><strong>Related tasks</strong><br />
<div><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></div>
<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 Uniform Resource Identifier (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>
<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>
<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>
</div>
</div>
</body>
</html>