Errata

XML Pocket Reference

Errata for XML Pocket Reference

Submit your own errata for this product.

The errata list is a list of errors and their corrections that were found after the product was released.

The following errata were submitted by our customers and have not yet been approved or disproved by the author or editor. They solely represent the opinion of the customer.

Color Key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted by Date submitted
Printed Page 9
Example 2 sample.dtd

using IE 5

The XML page cannot be displayed
Cannot view XML input using style sheet. Please correct the error and then click the
Refresh button, or try again later.
-----------------------------------------------------------

Attribute 'xmlns:OReilly' must be a #FIXED attribute. Line 3, Position 70

<!ATTLIST OReilly:Books xmlns:OReilly CDATA "http://www.oreilly.com">

Anonymous   
Printed Page 12
Line 8

The line:
<xsl:output method="html">
is missing the closing slash.

Anonymous   
Printed Page 12
Example 3 sample.xsl

using IE 5.0

The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and then click
the Refresh button, or try again later.

--------------------------------------------------------------

End tag 'xsl:stylesheet' does not match the start tag 'xsl:output'. Line 40, Position
3

</xsl:stylesheet>
--^

Anonymous   
Printed Page 19
last few paragraphs

xml:lang values are not defined by ISO-639 at all, but by RFC 1766, which
has been obsoleted by RFC 3066.
Moreover, ISO-639 now allows for three-letter codes (in ISO-639-2).

The first sentence of the last paragraph, "In addition, ISO-3166 provides
for nonstandardized languages and language variants." is wrong. Corrected
and reworded: "Most language tags in use (whether for languages or for
'dialects') consist of an ISO-639 two or three letter code plus an optional
ISO-3166 country code, as described above. But RFC 3066 also allows for
tags with other syntaxes."

Anonymous   
Printed Page 57
1st paragraph

The example for xsl:for-each uses xsl:process, but xsl:process is
not defined by the book. A friend of mine says that there is no
such thing as xsl:process, but I'm new to XML, so I don't know about that.
I suspect that the example should use xsl:apply-templates instead.

Anonymous   
Printed Page 57
line 3

<li><xsl:process select="title"></li>

1-this is not well formed xml which xslt must be!
2-there is no 'process' element in xslt (this edition [the second]
came out after xslt 1.0 reached general rec. level at W3C).

Anonymous   
Printed Page 57
<xsl:if> code example, 3rd line

A better, if not more correct, way to do this example, would be to replace the 3rd line in the code by:

<xsl:if test="not(position()=last())">, </xsl:if>

since last() returns the total number of notes (of which the context node is a part)

Your code example,
<xsl:if test="not([last()])">, </xsl:if>

gave me this error:
javax.xml.transform.TransformerConfigurationException: Programmer's assertion in getNextStepPos: unknown stepType: 28

when I used it thusly:

<xsl:template match="finding/finding/finding">
<xsl:value-of select="name" />
<xsl:if test="not([last()])">, </xsl:if>
</xsl:template>

, unless this was an incorrect usage. If I use this:

<xsl:template match="finding/finding/finding">
<xsl:value-of select="name" />
<xsl:if test="not(position()=last())">, </xsl:if>
</xsl:template>

, it works great.

Anonymous   
Printed Page 66
under heading "lang"

correct "1766" to "3066".

Anonymous   
Printed Page 74
last item on page

I believe the path <para[last()]> should be written without the angel brackets!

Anonymous   
Printed Page 76
2nd paragraph under "Functions" heading

replace this:

[...] (optional arguments are followed by a question mark):

with this:

[...] (optional arguments are shown in brackets):

or something like that.

Anonymous   
Printed Page 137
3rd paragraph

<xsl:for-each select="addressbook/address/[starts-with(state, 'M')]">

The above code is from the 'Another Example' paragraph. You will need to remove the
'/' after the 'address' to remove the error

Anonymous