Errata

XPath and XPointer

Errata for XPath and XPointer

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 ix
5th sub item under Italics convention

"This" misspelled as "Theis"

Anonymous   
Printed Page 4
Line 10

"indicated type attribute" should be "indicated font-size attribute".

Kristofer Nelson  Feb 02, 2013 
Printed Page 24
Line 12

in "XPath can't locate a document's XML or DTDs", "XML" should be "XML declaration".

Kristofer Nelson  Feb 02, 2013 
Printed Page 30
Lines 8, 13, 18, 21, 26, an 28

The colons at the end of "xsl:", "xlink:", and "xml:" are not in a constant-width font.

This also occurs on page 33, lines 14 and 15, with "myvocab:" and "yourvocab:".

Kristofer Nelson  Feb 02, 2013 
Printed Page 33
Lines 11, 12

The last two lines of the XML fragment should be "</yourvocab:subelem>" and "</myvocab:root>".

Kristofer Nelson  Feb 02, 2013 
Printed Page 35
namespace node on all elements

The book says that the namespace for xlink: does not apply to any elements, but it seems to say differently under the section Namespace nodes on pages 29 and 30. Is the book correct here that all elements have empty namespace node strings?

Kristofer Nelson  Feb 02, 2013 
Printed Page 44
Line 3 (following Table 3-1)

The colons at the end of "attribute::" and "namespace::" are not in a constant-width font.

This also occurs on several other pages when an axis is mentioned in body text without a node test following it: 45, 46, 47, 48, 51, 53, 66, 94, 96, 97, 98, 99, 100, 103, and 108.

Kristofer Nelson  Feb 02, 2013 
Printed Page 53
4th through 7th paragraphs

The parentheses in the example are wrong, if the 'Operator precedence...' paragraph
is to be believed. If 'and' is of higher importance (precedence) than 'or', then:

a = b or c = d and x = y

will be evaluated as though they were coded:

a = b or (c = d and x = y)

Anonymous   
Printed Page 60
example at end of page

missing [ after book:book in the DTD of the example

Anonymous   
Printed Page 60
Line 08

There is a space at the end of the URI in 'xmlns:xlink="http://www.w3.org/1999/xlink/ "'.

Kristofer Nelson  Feb 02, 2013 
Printed Page 67
first xslt example

<xsl:for-each select="book:section/*[1]">

should be:

<xsl:for-each select="//book:section/*[1]">

Anonymous   
Printed Page 67
Line 5

'<xsl:template match="/' should be '<xsl:template match="/">'.

Kristofer Nelson  Feb 02, 2013 
Printed Page 79
Last paragraph

The text states "The first example selects all employee element nodes whose id attributes' values do not equal emp1002 (or that do not have an id attribute at all)", but this disagrees with the first sentence of page 80, which states "This employee element will not be located by the first example, because it has no id attribute at all". The parenthetical remark should apply to the second example instead of to the first example.

See pages 100 through 102 for an example of != not matching elements that lack the relevant attribute.

Kristofer Nelson  Feb 02, 2013 
Printed Page 111
Line 1

The periods at the end of "/.." are not in a constant-width font.

Kristofer Nelson  Feb 02, 2013 
Printed Page 114
Paragraph 4, last sentence

"the" at the beginning of the sentence should be capitalized.

Kristofer Nelson  Feb 02, 2013 
Printed Page 121
Line 3

"The location path selects all book elements for which the first price child has a numeric value greater than 5.00" should say "any price child" instead of "first price child".

Kristofer Nelson  Feb 02, 2013 
Printed Page 129
Line 9

There is not a space after the "*".

Kristofer Nelson  Feb 02, 2013 
Printed Page 139
Line 1

"greater-than symbols with &gt;" should be "less-than symbols with &lt;". In XML, less-than symbols must be escaped, but greater-than symbols do not need to be escaped unless they appear in the string "]]>" but are not intended to end a CDATA section. (See the XML 1.0 specification, section 2.4, Character Data and Markup.)

(Granted, it?s better to escape greater-than symbols when you don?t need to than to not escape them and create invalid XML on occasion, but it?s incorrect to say that greater-than symbols must be escaped as the book implies.)

Kristofer Nelson  Feb 02, 2013 
Printed Page 140
Fourth paragraph (Characters in XML Documents)

"greater-than" and "&gt;" should be "less-than" and "&lt;", as in the errata for page 139.

Kristofer Nelson  Feb 02, 2013 
Printed Page 167
Table 9-5, row 2's interpretation

"Because the target attribute node is the range's start point" should be "Because the node point between the dictionary element's start tag and the first word element's start tag is the range's start point".

Kristofer Nelson  Feb 02, 2013 
Printed Page 170
The xpointer example in the 2nd paragraph of the range-to(locset) heading

The xpointer in the example is inconsistent with the explanation in the text. The
explanation only makes sense if the xpointer is:
xpointer(//account/range-to(amount))

Anonymous   
Printed Page 172
Line 10

The xpointer example is missing a ")" at the end.

Kristofer Nelson  Feb 02, 2013 
Printed Page 172
Lines 10 and 16

Why do the xpointer examples for string-range() include the predicate '[contains(., "Simpson")]'? It seems like the examples might be equivalent if the location set was just "//name" instead.

Kristofer Nelson  Feb 02, 2013 
Printed Page 178
Table A-1 (continued), row 2, description line 4

There is an extra comma.

Kristofer Nelson  Feb 02, 2013 
Printed Page 181
5th paragraph

The explanation of the date:day-in-week(string?) prototype is a copy of the preceding
prototype for date:day-of-week-in-month(string?). It should be something like "If the
string argument is present, it returns a number identifying which weekday is present
for the date in that ISO 8601 string. If a date represents the second Friday in a
month and the first day of the week is Sunday, the value is 6. If the argument is not
present, it returns the value for the current date."

Anonymous   
Printed Page 187
Table A-11 (continued), row 1, description line 2

"URI-deoded" should be "URI-decoded".

Kristofer Nelson  Feb 02, 2013