Site Tools


notes:dtd_cheat_sheet

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
notes:dtd_cheat_sheet [2026/06/10 03:44]
8.210.61.199 old revision restored (2026/05/31 01:30)
notes:dtd_cheat_sheet [2026/06/16 03:18] (current)
216.73.217.162 old revision restored (2026/06/11 08:24)
Line 1: Line 1:
 ===== Document Type Definition (DTD) ===== ===== Document Type Definition (DTD) =====
- 
-This is a cheat sheet for the DTD language. It is a follow up to the [[XML Cheat Sheet]] and summarizes [[http://www.w3schools.com/dtd/default.asp | this DTD Tutorial]]. There is also an [[XML Schema Cheat Sheet]]. 
  
   * A **D**ocument **T**ype **D**efinition (DTD) defines the legal building blocks of an XML document. It defines the document structure with a list of legal elements and attributes.   * A **D**ocument **T**ype **D**efinition (DTD) defines the legal building blocks of an XML document. It defines the document structure with a list of legal elements and attributes.
Line 43: Line 41:
  
   * a,b - a and then b in that order   * a,b - a and then b in that order
- 
  
 ==== DTD Attributes ==== ==== DTD Attributes ====
  
-  * An attribute specified in a DTD takes the form <code> +  * An attribute specified in a DTD takes the form <code><!ATTLIST element-name attribute-name attribute-type default-value></code> for example:<code>
-<!ATTLIST element-name +
-  attribute-name attribute-type default-value +
-  attribute-name2 attribute-type2 default-value2 +
-     ... ></code> for example:<code>+
 <!ATTLIST payment <!ATTLIST payment
    currency CDATA "US Dollars"    currency CDATA "US Dollars"
-   amount CDATA #REQUIRED +   amount CDATA #REQUIRED> 
-   form (Cash|Cheque) "Cheque"</code>+   form (Cash|Cheque) "Cheque" </code>
  
   * attribute-type can be one of the following   * attribute-type can be one of the following
notes/dtd_cheat_sheet.1781088242.txt.gz · Last modified: 2026/06/10 03:44 by 8.210.61.199