syeshin | 17ed4a6 | 2005-07-25 17:10:24 +0000 | [diff] [blame] | 1 | <?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> |
syeshin | 15e1cc4 | 2005-08-26 04:13:17 +0000 | [diff] [blame] | 16 | <link rel="stylesheet" type="text/css" href="../org.eclipse.wst.doc.user/common.css" /> |
syeshin | 17ed4a6 | 2005-07-25 17:10:24 +0000 | [diff] [blame] | 17 | <title>Document type definition (DTD) - overview</title> |
syeshin | 6607827 | 2005-09-20 16:53:38 +0000 | [diff] [blame] | 18 | </head> |
syeshin | 17ed4a6 | 2005-07-25 17:10:24 +0000 | [diff] [blame] | 19 | <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 |
| 23 | validate XML files against a set of rules. When you create a DTD file, you |
| 24 | can specify rules that control the structure of any XML files that reference |
| 25 | the DTD file.</p><p>A DTD can contain declarations that define elements, attributes, notations, |
| 26 | and entities for any XML files that reference the DTD file. It also establishes |
| 27 | constraints for how each element, attribute, notation, and entity can be used |
| 28 | within 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 |
| 30 | a 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 |
| 33 | XML file it is reading follows all of those rules. While the parser is reading |
| 34 | the XML file, it will check each line to be sure that it conforms |
| 35 | to the rules that are laid out in the DTD file. If there is a problem, the |
| 36 | parser generates an error and points to where the error occurs in the XML |
| 37 | file. This kind of parser is called a validating parser because it validates |
| 38 | the 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> |