Corrections to Chapter 3 of XML in a Nutshell, 3rd edition, Document Type Definitions (DTDs)

p. 30: The caption for Example 3-1 should be "A DTD for the person element".

p. 40: The last code fragment on the page is missing a closing parenthesis. It should be:

<!ELEMENT name (last_name
               | (first_name, ( (middle_name+, last_name) | (last_name?) ))
               ) >

p. 46: The example on this page was half-updated since the last edition, always a mistake. There's a significant confusion between the id attribute and the project_id attribute. You can either change all references to project_id to id or change all uses of id to project_id. I suspect the former is better, so change "Every project has a project_id ID type attribute" to "Every project has an ID type attribute named id" and change

<!ATTLIST project project_id ID #REQUIRED>


<!ATTLIST project id ID #REQUIRED>

p. 47: Change the second code fragment from

<!ATTLIST employee social_security_number ID     #REQUIRED
                   fsteam                   IDREFS #REQUIRED>
<!ATTLIST project  project_id             ID     #REQUIRED>


<!ATTLIST employee social_security_number ID     #REQUIRED>
<!ATTLIST project  project_id             ID     #REQUIRED
                   team                   IDREFS #REQUIRED>

[ XML in a Nutshell Corrections | XML in a Nutshell Home Page | Table of Contents | Examples | Order from Amazon ]

Copyright 2005, 2006 Elliotte Rusty Harold
Last Modified November 1, 2006