Definitive XML Schema
Priscilla Walmsley (pwalmsley@datypic.com)
ISBN: 0130655678
1st edition, , Prentice Hall PTR.
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 thanname
.
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:
xsi:schemaLocation="http://example.org/doc doc.xsd http://www.w3.org/2001/XMLSchema http://www.w3.org/2001/XMLSchema.xsd">
Chapter 7
- p. 123. "Example 7-3 shows two local element declarations,
size
andcolor
name
andsize
." - 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 declarationelement" - p. 134. Third bullet: "relying on that element
or attributebeing 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 istrue
, that element must be empty"
Chapter 9
- p. 158. Table 9-1. The value
extension
is not allowed for thefinal
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 10.2.3.3 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
, andez
will not match the regular expression. This is because the "^" character only negates thea-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
through-24:00-14:00
."+24:00+14:00
Chapter 14
- p. 316. Table 14-8 says that either the
base
attribute or thesimpleType
child is required for therestriction
child ofsimpleType
. Actually, thebase
attribute is always required. - p. 329. In Example 14-24, the
RestrictedLetterType
type should usesimpleContent
instead ofcomplexContent
. Also, it should not have amixed="true"
attribute. The definition of this type should read:
<xsd:complexType name="RestrictedLetterType"> <xsd:simpleContent> <xsd:restriction base="LetterType"> <xsd:simpleType> <xsd:restriction base="xsd:string"/> </xsd:simpleType> </xsd:restriction> </xsd:simpleContent> </xsd:complexType>
Chapter 17
- p. 382. First paragraph: "...the product/number field would
bringyield more than one field node..." - p. 386. "The
key
referenced by akeyref
must be defined in the same element declaration, or in a declaration of one of itschildrendescendants." - p. 393. Second-to-last paragraph: "
UnqualifiedUnprefixed names in XPath expressions are always assumed to be in no namespace." - p. 394. First paragraph: "Example 17-10 uses
unqualifiedunprefixed names..."
Chapter 18
- p. 409. Second paragraph: "...redefining
as shown in Example 18-6...".DescriptionGroupIdentifierGroup - p. 410. In Example 18-7,
prod1.xsd
needs to import the XML namespace since it referencesxml: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"/> </xsd:attributeGroup> </xsd:schema>
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 undefinedSizeSystemType
. They should be changed to refer toxsd: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 exceptappinfo
and
."choicedocumentation
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 ofnotation
is not required. Rather, either thepublic
orsystem
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 constraininglanguage
was relaxed to allow up to eight characters for each part of the value [Erratum E2-25]. - p. 231. For
float
anddouble
, 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 fortime
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 fromNOTATION
andQName
. [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.