| <?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> |
| <head> |
| <!-- /******************************************************************************* |
| * Copyright (c) 2000, 2005 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 |
| *******************************************************************************/ --> |
| <link rel="stylesheet" type="text/css" href="../../org.eclipse.wst.doc.user/common.css" /> |
| <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> |
| <p> |
| <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 /> |
| </p> |
| <p><b class="reltaskshd">Related tasks</b><br /> |
| <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 /> |
| </p> |
| </div> |
| <p> |
| (C) Copyright IBM Corporation 2000, 2005. All Rights Reserved. |
| </p> |
| </body> |
| </html> |