Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: d89466e5855eb8d73c68f76a56bb1e5d111e441a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<?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, 2009 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, 2009" />
<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="concept" name="DC.Type" />
<meta name="DC.Title" content="Document type definitions (DTDs) - overview" />
<meta name="abstract" content="A document type definition (DTD) provides you with the means to validate XML files against a set of rules. When you create a DTD file, you can specify rules that control the structure of any XML files that reference the DTD file." />
<meta name="description" content="A document type definition (DTD) provides you with the means to validate XML files against a set of rules. When you create a DTD file, you can specify rules that control the structure of any XML files that reference the DTD file." />
<meta content="DTDs, overview" name="DC.subject" />
<meta content="DTDs, overview" name="keywords" />
<meta scheme="URI" name="DC.Relation" content="../topics/tvaldtd.html" />
<meta content="XHTML" name="DC.Format" />
<meta content="cdtdover" 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>Document type definition (DTD) - overview</title>
</head>
<body id="cdtdover"><a name="cdtdover"><!-- --></a>


<h1 class="topictitle1">Document type definitions (DTDs) - overview</h1>




<div><p>A document type definition (DTD) provides you with the means to
validate XML files against a set of rules. When you create a DTD file, you
can specify rules that control the structure of any XML files that reference
the DTD file.</p>

<p>A DTD can contain declarations that define elements, attributes, notations,
and entities for any XML files that reference the DTD file. It also establishes
constraints for how each element, attribute, notation, and entity can be used
within any of the XML files that reference the DTD file.</p>

<p>To be considered a valid XML file, the document must be accompanied by
a DTD (or an XML schema), and conform to all of the declarations in the DTD
(or XML schema).</p>

<p>Certain XML parsers have the ability to read DTDs and check to see if the
XML file it is reading follows all of those rules. While the parser is reading
the XML file, it will check each line to be sure that it conforms to the rules
that are laid out in the DTD file. If there is a problem, the parser generates
an error and points to where the error occurs in the XML file. This kind of
parser is called a validating parser because it validates the content of the
XML file against the DTD.</p>

</div>

<div><div class="reltasks"><strong>Related tasks</strong><br />
<div><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></div>
</div>
</div>

</body>
</html>

Back to the top