blob: cbd8dd6bfa7a612dea20947e37eff5124185125b [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html lang="en-us" xml:lang="en-us">
<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 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 "" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "" l gen true r (n 0 s 0 v 0 l 0) "" 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="DOCTYPE declarations, XML editor" name="DC.subject" />
<meta content="DOCTYPE declarations, XML editor" name="keywords" />
<meta scheme="URI" name="DC.Relation" content="cxmlcat.html" />
<meta scheme="URI" name="DC.Relation" content="tedtcnst.html" />
<meta scheme="URI" name="DC.Relation" content="txmlcat.html" />
<meta scheme="URI" name="DC.Relation" content="tedtgram.html" />
<meta scheme="URI" name="DC.Relation" content="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>
<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, complete the following steps:</p>
<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,
see <a href="txmlcat.dita">Adding entries to the XML Catalog</a>.</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> <div class="note"><span class="notetitle">Note:</span> 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.</div>
<li class="stepexpand"><span>Click <span class="uicontrol">OK</span>.</span></li>
<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 class="relconcepts"><strong>Related concepts</strong><br />
<div><a href="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 class="reltasks"><strong>Related tasks</strong><br />
<div><a href="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>
<div><a href="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>
<div><a href="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="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>