Corrections to Chapter 17 of XML in a Nutshell, 3rd edition, XML Schemas

p. 281, after the 1st paragraph, change the sample command line

% java dom.Writer -V -S addressdoc.xml

so that the switches are given in lower case:

% java dom.Writer -v -s addressdoc.xml

The uppercase switches turn off schema validation, which is exactly what is not wanted here.

p. 282, In Example 17-4, xmlns:xsi="http://www.w3.org/2001/XMLSchema" should be xmlns:xs="http://www.w3.org/2001/XMLSchema"

p. 286: The first code fragment on the page should declare the xs prefix, not the xsi prefix. That is change

<xs:schema xmlns:xsi="http://www.w3.org/2001/XMLSchema"
  targetNamespace="http://namespaces.oreilly.com/xmlnut/address">

to

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
  targetNamespace="http://namespaces.oreilly.com/xmlnut/address">

p. 287: The second code fragment on the page should declare the xs prefix, not the xsi prefix. That is change

<xs:schema xmlns:xsi="http://www.w3.org/2001/XMLSchema"
  targetNamespace="http://namespaces.oreilly.com/xmlnut/address"
  xmlns:addr="http://namespaces.oreilly.com/xmlnut/address"> 

to

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
  targetNamespace="http://namespaces.oreilly.com/xmlnut/address"
  xmlns:addr="http://namespaces.oreilly.com/xmlnut/address"> 

p. 289: Example 17-7 should declare the xs prefix, not the xsi prefix. That is change

<xs:schema xmlns:xsi="http://www.w3.org/2001/XMLSchema"
  targetNamespace="http://namespaces.oreilly.com/xmlnut/address"
  xmlns:addr="http://namespaces.oreilly.com/xmlnut/address"
  elementFormDefault="qualified">

to

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
  targetNamespace="http://namespaces.oreilly.com/xmlnut/address"
  xmlns:addr="http://namespaces.oreilly.com/xmlnut/address"
  elementFormDefault="qualified">

p. 297: Example 17-9 should declare the xs prefix, not the xsi prefix. That is change

<xs:schema xmlns:xsi="http://www.w3.org/2001/XMLSchema">

to

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">

p. 301: Example 17-12 should declare the xs prefix, not the xsi prefix. That is change the first line from

<xs:schema xmlns:xsi="http://www.w3.org/2001/XMLSchema"

to

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"

p. 302: Both code fragments on this page should declare the xs prefix, not the xsi prefix. That is change the first lines from

<xs:schema xmlns:xsi="http://www.w3.org/2001/XMLSchema"

to

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"


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

Copyright 2005, 2006 Elliotte Rusty Harold
elharo@metalab.unc.edu
Last Modified November 1, 2006