blob: 0ff1e5b639b9b4f2b040c21f894c6b080d0118be [file] [log] [blame]
syeshin17ed4a62005-07-25 17:10:24 +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<!-- /*******************************************************************************
5 * Copyright (c) 2000, 2005 IBM Corporation and others.
6 * All rights reserved. This program and the accompanying materials
7 * are made available under the terms of the Eclipse Public License v1.0
8 * which accompanies this distribution, and is available at
9 * http://www.eclipse.org/legal/epl-v10.html
10 *
11 * Contributors:
12 * IBM Corporation - initial API and implementation
13 *******************************************************************************/ -->
14<html>
15<head>
syeshin15e1cc42005-08-26 04:13:17 +000016<link rel="stylesheet" type="text/css" href="../org.eclipse.wst.doc.user/common.css" />
syeshin17ed4a62005-07-25 17:10:24 +000017<title>Document type definition (DTD) - overview</title>
syeshin66078272005-09-20 16:53:38 +000018</head>
syeshin17ed4a62005-07-25 17:10:24 +000019<body id="cdtdover"><a name="cdtdover"><!-- --></a>
20
21<h1 class="topictitle1">Document type definitions (DTDs) - overview</h1>
22<div><p>A document type definition (DTD) provides you with the means to
23validate XML files against a set of rules. When you create a DTD file, you
24can specify rules that control the structure of any XML files that reference
25the DTD file.</p><p>A DTD can contain declarations that define elements, attributes, notations,
26and entities for any XML files that reference the DTD file. It also establishes
27constraints for how each element, attribute, notation, and entity can be used
28within any of the XML files that reference the DTD file.</p>
29<p>To be considered a valid XML file, the document must be accompanied by
30a DTD (or an XML schema), and conform to all of the declarations in the DTD
31(or XML schema).</p>
32<p>Certain XML parsers have the ability to read DTDs and check to see if the
33XML file it is reading follows all of those rules. While the parser is reading
34the XML file, it will check each line to be sure that it conforms
35to the rules that are laid out in the DTD file. If there is a problem, the
36parser generates an error and points to where the error occurs in the XML
37file. This kind of parser is called a validating parser because it validates
38the content of the XML file against the DTD.</p>
39</div>
40
41<div>
42<p>
43<b class="parentlink">Parent topic:</b> <a href="../topics/tcretdtd.html" title="A document type definition (DTD) contains a set of rules that can be used to validate an XML file. After you have created a DTD, you can edit it, adding declarations that define elements, attributes, entities, and notations, and how they can be used for any XML files that reference the DTD file.">Creating DTDs</a><br />
44</p>
45<p><b class="reltaskshd">Related tasks</b><br />
46<a href="../topics/tvaldtd.html" title="Validating a DTD file lets you verify that it is well formed and does not contain any errors.">Validating DTDs</a><br />
47</p>
48</div>
49 <p>
50 (C) Copyright IBM Corporation 2000, 2005. All Rights Reserved.
51 </p>
52</body>
53</html>