Datypic Logo
Definitive XML Schema

Definitive XML Schema

Priscilla Walmsley (pwalmsley@datypic.com)

1st edition (December 7, 2001)

Prentice Hall PTR; ISBN: 0130655678

Errata in the 1st printing

Strikethrough indicates deleted text and underline indicates inserted text.

Chapter 1

  • p. 8. Example 1-3 should declare an element type number rather than name.

Chapter 6

  • p. 102. Examples 6-3 and 6-5 should also contain a reference to the schema for schemas, if you would like to validate the schemas themselves. The xsi:schemaLocation attribute should read:

Chapter 7

  • p. 123. "Example 7-3 shows two local element declarations, size and color name and size."
  • p. 129-131. The discussion of empty values with regard to fixed and default values is incorrect. Empty string values will be considered empty and the default or fixed values used.
  • p. 134. Second bullet: "omitting the component declaration element"
  • p. 134. Third bullet: "relying on that element or attribute being there"
  • p. 136. Bottom, paragraph after the Example 7-9: "if the xsi:nil attribute appears in the start-tag of an element, and its value is true, that element must be empty"

Chapter 9

  • p. 158. Table 9-1. The value extension is not allowed for the final attribute on simple types.

Chapter 10

  • p. 182. Example 10-1 has a pattern value that contains spaces. These spaces should not be there; the pattern value should read "\d{3}-[A-Z]{2}|\d{7}".
  • p. 196. Table 10-13 contains an entity reference �. This is not within the range allowed by XML. It should be changed to 
  • p. 196. Section states "The second example represents the exact same thing..." Technically, it is not the exact same thing, since \d can include decimal digits from all character sets, not just 0 through 9.
  • p. 198. The last example in Table 10-16 is incorrect. The strings cz, dz, and ez will not match the regular expression. This is because the "^" character only negates the a-z range, not the entire expression in square brackets. The last two sentences in the preceding paragraph describe this incorrectly.

Chapter 12

  • p. 238. The 4th example in Table 12-17 incorrectly says that +05:00 corresponds to Eastern Standard Time. The value was intended to have the time zone -05:00.
  • p. 246. Table 12-26: "the range is limited to -24:00-14:00 through +24:00+14:00."

Chapter 14

  • p. 316. Table 14-8 says that either the base attribute or the simpleType child is required for the restriction child of simpleType. Actually, the base attribute is always required.
  • p. 329. In Example 14-24, the RestrictedLetterType type should use simpleContent instead of complexContent. Also, it should not have a mixed="true" attribute. The definition of this type should read:
<xsd:complexType name="RestrictedLetterType">
    <xsd:restriction base="LetterType">
        <xsd:restriction base="xsd:string"/>

Chapter 17

  • p. 382. First paragraph: "...the product/number field would bring yield more than one field node..."
  • p. 386. "The key referenced by a keyref must be defined in the same element declaration, or in a declaration of one of its children descendants."
  • p. 393. Second-to-last paragraph: "Unqualified Unprefixed names in XPath expressions are always assumed to be in no namespace."
  • p. 394. First paragraph: "Example 17-10 uses unqualified unprefixed names..."

Chapter 18

  • p. 409. Second paragraph: "...redefining DescriptionGroupIdentifierGroup as shown in Example 18-6...".
  • p. 410. In Example 18-7, prod1.xsd needs to import the XML namespace since it references xml:lang. It should read:
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <xsd:import namespace="http://www.w3.org/XML/1998/namespace"/>
  <xsd:attributeGroup name="IdentifierGroup">
    <xsd:attribute name="id" type="xsd:ID" use="required"/>
    <xsd:attribute name="version" type="xsd:decimal"/>
    <xsd:attribute ref="xml:lang"/>

Chapter 20

  • p. 446-491. Examples 20-6, 20-9, 20-11, 20-14 and 20-15 refer to a type ProdNumType that is not defined in the schema. Example 20-15 also refers to an undefined SizeSystemType. They should be changed to refer to xsd:string in order to be a self-contained schema definition.

Chapter 21

  • p. 473. First paragraph: "Example 14-421-7 shows..."

Appendix A

  • p. 497. Table A-2, on the id attribute: "all XSDL element types except appinfo and choice documentation."

Changes for XML Schema 1.0 Second Edition

The W3C Schema Working Group has published the second edition of the XML Schema 1.0 recommendation. Below are the changes required to bring Definitive XML Schema up to the level of XML Schema 1.0 Second Edition. Each change is followed by a link to the W3C description of the erratum.

Chapter 6

  • p. 114. Table 6-4. The public attribute of notation is not required. Rather, either the public or system attribute is required. Appendix A should also be changed to reflect this. [Erratum E1-16].

Chapter 12

  • p. 229. The language type now follows RFC 3066 instead of RFC 1766. This allows two- or three- letter language codes. Additionally, the pattern constraining language was relaxed to allow up to eight characters for each part of the value [Erratum E2-25].
  • p. 231. For float and double, positive zero is now considered to be equal to negative zero. NaN (Not-a-number) can no longer be compared to other values; it is neither less than nor greater than other values, and it is not equal to itself [Erratum E2-40].
  • p. 238. The value 24:00:00 is now valid to represent midnight for time values [Erratum E2-45].
  • p. 244. The numbers appearing in a duration value must be unsigned, and the number of seconds may not end in decimal point [Erratum E2-23].
  • p. 257 and 258. Use of the length facet has been deprecated for types derived from NOTATION and QName. [Erratum E2-36].
  • p. 259. A number of changes were made to the valid lexical representations of the base64Binary type. They are documented fully in the erratum description. [Erratum E2-9].

Last updated February 19, 2010.