Table of Contents
Q & A

  By Date
  By Page

Buy this book!
Cookwood Press


I call this section “Errata and Clarifications” because not only does it contain minor typographical errors that, despite my best efforts, made it into the text, it also contains clarifications and added notes about examples, that as I go over them again, seem necessary. I hate to have a long list here, but at the same time, I really want you to get the most out of my book. I hope you'll find the information useful. Comments, as always, are more than welcome.

May 1, 2005

page 103

In line 3 of Figure 7.23 on page 103, there is an extra closing slash (/) in the xsd:extension element. It should read <xsd:extension base="xsd:anyType"> and not <xsd:extension base="xsd:anyType"/>. Note that the Examples already had the correct code. (Thanks to Stuart Bray.)

April 25, 2002

page 80

In Figure 6.18, the second line of the example should read
<density>7</density> and not <density>7</population>. (Thanks to Rita Kaeding.)

April 12, 2002

page 148

In Figure 10.21, the last line should say "Note that the greater-than sign must be written as &gt;." (and not the less-than sign). Thanks to Page Nix.

January 19, 2001

page 26

In the second tip, I say that you can't use words that begin with x, m, and l, because they are reserved for and by the W3C. Perhaps it wasn't clear that was referring to names that begin with x, m, AND, l, as in "xml-this" and "xml-that". I think "names that begin with the letters xml, in any combination of upper- and lowercase) are reserved by the W3C" is a better way of putting it.

(Thanks John Shields.)

January 15, 2001

page 37

In Figure 2.2, the last line of code shown is missing the #REQUIRED option, as is later described on pages 50-51). Note that the code given in the online examples is correct and up-to-date. The line should read:

<!ATTLIST name language (English | Latin) #REQUIRED>

(Thanks Graham Patterson.)

page 78

In Figure 6.8, the first dash shown in the time (20:15-05-05:00) should be a colon:


(Thanks Robert Malcolm.)

January 7, 2001

page 50

In the caption under Figure 3.18, I've interchanged population with year. It should read:

In this example, I only want to allow there to be two possibilities for the value of the year attribute in the population element: 1999 or 2000.

(Thanks to both Robert Miles and David Livesay.)

January 3, 2001

page 12

In the caption under Figure 1.i, the phrase "(not even the URL)" should be deleted, since there is no URL. (Thanks to J. David Eisenberg, hereafter referrred to as JDE.)

The last line of code in Figure i.1 (the hr tag) should come directly after the img tag, not after the text:

<center><img src="tiger.jpg"></center>
<hr width=50% size=5 noshade>
Animal species are disappearing...

See the examples for a complete listing of the file shown in Figure i.1. (Thanks again to JDE.)

page 28

Here's an extra tip that goes along with the third tip on page 28. If you need to have both single and double quotes in the value, see the last tip on page 31. (Thanks JDE.)

pages 58 and 60

It could be argued that the title bar in Figure 4.5 should read "hwi.ent" since that what the file name will be in this particular example. I have chosen to use the more generic "code.xml".

The same goes for the title bar in Figure 4.9. While it's true that in this particular example the file name will be "pic.dtd", I have chosen to show the more generic "code.dtd" in the title bar to indicate that you can use any file name you like.

(Thanks JDE.)

page 62-65

The title bar reads "code.dtd" because what's important is that it is a DTD. The fact that in this particular example it's an internal DTD and is part of an XML file means I could have used a "code.xml" title (as I finally do on page 65), though I chose not to. (Thanks JDE.)

page 78

In step 3, I show three decimals for formatting the seconds in the time, while in the illustration in Figure 6.9, I give an example with four decimals. You can use as many decimals as you need. (Thanks JDE.)

page 81

In Figure 6.20, the code should end with the final forward slash and minOccurs="1" should be deleted. To wit:

<xsd:element name="zipcode" type="zipcodeType"/>

In the caption, the entire second sentence should also be deleted. (Thanks JDE.)

page 83

In Figure 6.24, fourth line from the bottom,, I misspelled Antarctica. Ugh! (Thanks JDE.)

page 91

The last five words in the second to last tip on page 91 should be deleted since you can't set both the default and fixed attributes simultaneously (see last tip). (Thanks Don Woodruff.)

Page 96

The third line of code in Figure 7.7 needs a maxOccurs attribute as follows:

<xsd:element name="subspecies" type="subspeciesType" maxOccurs="unbounded"/>

Otherwise, more than one subspecies element would not be allowed as shown in the top illustration of Figure 7.8. Note that the code in the downloadable examples has already been corrected. (Thanks JDE.)

page 156

In the code in Figure 11.4, there is a tag called current_population. It should just be the same old population tag that we've seen before, especially since the code in the second to last line of Figure 11.5 refers to it that way. (Thanks JDE.)

November 30, 2000

page 76

I think I had "other elements and attributes" on the brain when I wrote the very first line of the introduction (just under the header). But in fact, as I mention on page 75 and throughout the rest of this section, an element "has a simple type if it's only allowed to contain text." Or another way: "An element has a simple type if it's not allowed to contain other elements or attributes." (Only elements of complex type can contain other elements or attributes.) So sorry for the confusion! (Thanks, David Vogel.)

page 48

In Figure 3.13, there is a missing closing bracket (>) at the end of the code (directly after the final parenthesis). (Thanks to Michael Stevulak.)

November 28, 2000

page 76

There has been a change in the specifications with reference to the simple type used for containing URLs. Instead of xsd:uri-reference, as shown in the seventh paragraph under step 3, it is now called xsd:uriReference.

November 21, 2000

page 105-6

There is an important error in the code shown in Figure 7.29 on page 105 (and conveniently repeated in Figure 7.33 on page 106): the attribute must be declared after the end of the sequence, not within it. While this isn't pertinent to the topic at hand (Basing Complex Types on (existing) Complex Types), it does seem like a good idea to use valid complex types for a base... Here is the corrected code (it can also be found in the Examples section).

November 20, 2000

Page 96

The last sentence in the caption to Figure 7.7 should be deleted. The example was changed so that no "no_subspecies" group was created or needed.

November 16, 2000

Page 187

Well, I have to admit that this example has a problem. While the instructions for creating an internal style sheet in the transformed file are perfectly proper and correct--and that is the focus of the example, after all--the actual style sheet doesn't make much sense for the document it's used with. That is, if we're using this style sheet to convert an XML document into HTML, then it doesn't make sense to have a style sheet that applies styles to tags like endangered_species and animal... instead, it would make more sense to have a style sheet with references to tags like p and body (typical HTML tags), which are the tags that will result from the transformation of an XML document with the present style sheet.

November 15, 2000

Page 90

I'm afraid the specifications changed for creating lists between when the book went to print and now. Please check the examples for the correct syntax. I'll have a more detailed explanation of the changes available here shortly.

The gist of it is that when creating a date, instead of using base="individual", you use itemType="individual", where individual is the simple type of the members of the list.

If you want to further restrict a list with facets, like length as in the example in Figure 6.51, you use <xsd:restriction base="original_list_type"> and then specify the facets <xsd:length value="3"/>, and then close with </xsd:restriction>.

November 3. 2000

Page 245

The address for the XML Schema Validator has changed. It is now http://www.w3.org/2000/09/webdata/xsv.

©Copyright 2000 by Elizabeth Castro. All rights reserved.
Please don't copy this page. Instead, link to it! Thanks.