Beginning XML, 2nd Edition
|42||Adding Attributes to Als CD
In this example, the code and the screenshot do not agree. Single quotes are used around the values of the attributes we are asked to add in the code but double quotes appear in the screenshot. As either single or double quotes are acceptable for attributes, either can be used but IE will display whichever you use in the code ordinarily.
Also, the How It Works for this example on Page 43 describes adding the first attribute without quotes and then receiving an error message in IE as the parser finds this error - this step is not described in the Try It Out section.
Thanks to Howard for spotting this.
The screenshot on page 49 is incorrect and does not represent how the file cd4.xml will look when viewed with Internet Explorer 5 or later. It is the one on page 47 repeated.
The correct screenshot (named cd4xml.jpg) is available within the code download for this book.
It shows the inclusion of the <song> and <date-released> elements.
Thanks to Silhone Sung
|84||Unseen members of namespaces list
At the top of page 84 we give a list of namespaces and introduce them as having been seen before in the chapter. In fact, only the pers namespace has been seen before.
The text surrounding the list can be reworded to read:
Imagine we choose to create three namespaces for Serna Ferna Inc:
We could instead create one namespace which the company would use for all of its XML document types. Or, conversely, we could break down or namespaces down further, perhaps splitting the <person> document type into multiple namespaces. Why did we choose three?
|4||88||Incorrect URL for the Java Version of Xalan
The correct URL for the download of Xalan for Java is:
|94||"given" should be "quantity"
paragraph on page 94 incorrectly states that the template shown on page
93 will be applied for any elements named "given". In fact it should be
|94||Incorrect example <first>
explanation of the example given to illustrate the use of the
<xsl:value-of> element does not agree with the example code. The
code uses the <quantity> element, whereas the explanation uses
|94||Incorrect backwards reference to CSS
the 'Associating Stylesheets with XML Documents Using Processing
Instructions' section, there is an erroneous backwards reference to
CSS. At this stage in the book we haven't covered this in detail
(please see Chapter 11 where this discussion does take place).
|4||104||Incorrect font used
The formatting of
the last 2 words on the page should have been the other way around. At
present, the word axis is formatted to indicate that it is the name of
an axis when, in fact, the name of the axis is attribute.
|111||Missing closing slashes
In both code fragments in the <xsl:apply-templates>
section of the page, the <xsl:apply-templates> elements are
missing the closing slash required to make the fragments well formed
|4||127||Header missing from ElemsToAtts.xsl
The line is missing from the top of the ElemsToAtts.xsl stylesheet created in stage 4 of the Try It Out example.
|131||Location of order.xml code
The code for
order.xml is shown on pages 99-100, but it's easy to miss as it's not
used in any Try It Out example until we get to this page.
|132||Try It Out - Default Template Gotchas
n step 3, the command to run the file should be:
|134||Erroneous element in code
The code for
the <xsl:choose> example does not match the text. The code shows
the use of the <salary> element rather than the <number>
|4||140||Wrong function name in stylesheet
On page 123 the stylesheet AttsToElems.xsl is shown. This stylesheet is reshown on page 140, however there is a difference. In the last template of the stylesheet on page 123 the local-name() function is used, but in the last template of the same stylesheet on page 140 the name() function is used. This should still work but the name should not have changed from page 123. Thanks to Michael O' Sullivan for bringing this to our attention
|194||Incorrect NMTOKENS example
The first line of code on page 194 should read:
|260||Incorrect example for date datatype
The value 05-07-1995 has been given as a valid example of date datatype value.
|278||Extending simpleType Definitions
second of the examples showing valid code according to the element
declaration earlier in the page contains an error - the attribute name,
gender, is missing.
|7||293||Incorrect Namespace Prefix
Page 293 shows the following code snippet: <artist title="Mr"> <name:first>Alfred</name:first> <name:middle>middle</name:middle> <name:last>Yankovic</name:last> </artist> The namespace prefix of name: used here is incorrect. This namespace prefix is declared in the root element of the instance document as n: and not name: so this code snippet should be: <artist title="Mr"> <n:first>Alfred</n:first> <n:middle>middle</n:middle> <n:last>Yankovic</n:last> </artist> Note that this also means the very last sentence at the bottom of the page needs the reference to the 'name' prefix changed to n. In other words this last sentence should read: 'therefore we must qualify them with the n prefix we declared in the root element of our instance document'. Thank you Michael O' Sullivan for bringing this to our attention.
Unfortunately the first screenshot on this page is a repeat of the second one.
|353||Minimal Parsing Using Sax
In the Try It Out section beginning on page 352 the java listing in step 2 fails to include the statement:
|441||em should be i
The second code block on the page does not correspond with the first. It shows the use of em in a container relationship, instead of i . The code should read:
|476||Incorrect field name in diagram
In the first diagram on the page, which shows the CorporateCustomer table, the third field name is incorrect.
|552||Running the Address Book Application and Tomcat 4.0.2
Unfortunately, the latest release of Tomcat, Tomcat 4.0.2,
has changed XML parsing capabilities and class loading methods from the
release that was current at the time the book was written. This means
that if you have Tomcat 4.0.2 you will need to carry out some extra
steps in order to run the address book application sucessfully (this is
because the code was designed to run with an earlier version).