- Dissecting an XML Document Type Definition
- Using Document Type Definition Notation and Syntax
- Understanding Literals
- Declaring a NOTATION
- Creating ATTLIST Declarations
- Using Special XML Datatype Constructions
- Understanding the Difference Between Well-Formed and Valid XML
- Learning How to Use External DTDs and DTD Fragments
- Altering an XML DTD
- Getting Down to Cases
Understanding Literals
Literal data is any quoted string not containing the quotation mark used as a delimiter for that string. The quotation mark can be either a single quote or a double quote at the convenience of the coder. If you want to make a literal of a string containing both single and double quotes, you can escape whichever one you use to quote the string. Literals are used for specifying the content of internal entities, the values of attributes, and external identifiers. The following are some examples of literal data:
Literal data: "The quick brown fox jumps over the lazy dogs."
Alternate form: 'The lazy hen clucked "merrily" over her jumbled nest.'
Escaped form: 'Now is the time for George's "good guy" quote:'
The first example uses simple quotes, as they would be entered in the U.S. The second uses initial single quotes as they do in the U.K. and many other parts of the English-speaking world. The third example contains both single and double quotes, so the single quote used as an apostrophe is escaped using a character entity.