Perl and XML

Errata for Perl and XML

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. If the error was corrected in a later version or reprint the date of the correction will be displayed in the column titled "Date Corrected".

The following errata were submitted by our customers and approved as valid errors by the author or editor.

Color Key: Serious Technical Mistake Minor Technical Mistake Language or formatting error Typo Question Note Update



Version Location Description Submitted By Date Submitted Date Corrected
Printed
Page 5
computer output, 5th line from end

"<email>meowmeow@augh.org</email>" should be: "<email>meow@263A.org</email>"

Anonymous   
Printed
Page 5
1st code segment, line 10

<email>i-like-cheese@jmac.org</email> NOW READS: <email>joewrigley@jmac.org</email>

Anonymous    Jul 01, 2004
Printed
Page 6
Paragraph starting with "In the Perl world"

"through the use pragma" NOW READS "through a use directive".

Anonymous    Jul 01, 2004
Printed
Page 21
Paragraph starting with :Finally"

"&#00DC;" HAS BEEN CHANGED to "&#x00DC"

Anonymous    Jul 01, 2004
Printed
Page 23
1st paragraph

"The answer is: declare the decoding in the XML declaration." NOW READS: "The answer is: declare the encoding in the XML declaration."

Anonymous    Jul 01, 2004
Printed
Page 24
1st sentence

Spurious "hackers" HAS BEEN DELETED.

Anonymous    Jul 01, 2004
Printed
Page 29
4th paragraph, lines 3,5

max-inclusive NOW READS maxExclusive max-length NOW READS maxLength

Anonymous    Jul 01, 2004
Printed
Page 32
Step 7 of tranformation list

<xsl:apply-tempaltes/> NOW READS: <xsl:apply-templates/>

Anonymous    Jul 01, 2004
Printed
Page 38
Example 3-1

The regexes in the example use "/^&..." instead of the correct "/^<..." This should be changed in 8 places on page 39 (one if(), 7 elsif()). The elsif on page 40 is correct as is. ***Yes, that's correct. I am embarassed by this one.

Anonymous   
Printed
Page 44
Example 3-2, print statements on lines 12 and 14

NOW READ: print STDERR " ERROR in '$xmlfile': $@ "; print STDERR "'$xmlfile' is well-formed ";

Anonymous    Jul 01, 2004
Printed
Page 52
IN PRINT: Second paragraph, last sentence

"...thinking in standards-complaint ways." NOW READS: "...thinking in standards-compliant ways."

Anonymous    Jul 01, 2004
Printed
Page 53
First example (top of page)

return unless ($node->nodeType eq &XML_ELEMENT_NODE); NOW READS: return unless ($node->nodeType eq XML_ELEMENT_NODE() );

Anonymous    Jul 01, 2004
Printed
Page 53
code example in sub{} at top of page

I could not get Example 3-6 to work unless I changed the "return" line to be: return unless (ref($node) eq 'XML::LibXML::Element'); [note: I had previously changed the earlier error (rm the "&"), but this did not matter.] This problem is CORRECTED with the CHANGE to page 53 noted above.

Anonymous    Jul 01, 2004
Printed
Page 59
Second row of table, first column

$endoding NOW READS: $encoding

Anonymous    Jul 01, 2004
Printed
Page 59
2nd paragraph

"You can, however, ... to come through dateattributes..." NOW READS: "You can, however, ...to comb through date attributes..."

Anonymous    Jul 01, 2004
Printed
Page 60
example 3-10, line 2

my $writer = new XML::Writer( OUTPUT =$output ); NOW READS: my $writer = new XML::Writer( OUTPUT =$output, NEWLINES =1);

Anonymous    Jul 01, 2004
Printed
Page 66
Code snippet in the middle

The comment in line 2 of the code snippet previously wrapped into line 3 Line 3 of the code snippet NOW READS: # utf-8

Anonymous    Jul 01, 2004
Printed
Page 67
Example 3-12 code

Line 9 of the code is missing the trailing semicolon. It should be: $u .= " Oh, hey, it's Unicode all of a sudden. Hooray!! ";

Anonymous   
Printed
Page 67
1st paragraph

"...(inlcuding Mac OS X)..." NOW READS "...(including Max OS X)..."

Anonymous    Jul 01, 2004
Printed
Page 68
Paragraph starting "Unicode"

"first two bits" NOW READS "first two bytes"

Anonymous    Jul 01, 2004
Printed
Page 68
Footnote

"identify the document at UTF-8" NOW READS: "identify the document as UTF-8"

Anonymous    Jul 01, 2004
Printed
Page 87
2nd Paragraph, the sentence,

"The program preserves the document prolog, processing instructions, and comments." HAS BEEN DELETED.

Anonymous    Jul 01, 2004
Printed
Page 95
second line from bottom

The line "Use of uninitialized value in print at conv line 39." probably shouldn't be there. The same for the top of page 96 too. > ***Yes, that is an embarassing error. Please remove those lines.

Anonymous   
Printed
Page 97
characters handler method

$self->in_element( h1 ) NOW READS $self->in_element('h1')

Anonymous    Jul 01, 2004
Printed
Page 109
Snippet of XML at the top

There are no slashes in the closing tags: <ip>...<ip> should be <ip>...</ip> etc. ***Yes. =======

Anonymous   
Printed
Page 112
three times on page 112 and 113

Three instances of "Makefile.PM" NOW READ "Makefile.PL".

Anonymous    Jul 01, 2004
Printed
Page 125
within the code sample

my package XML::Parser is current as of 6/26/2002 and I installed XML::Grove today from the author's site. Accordingly, when the code sample on page 125 is attempted, the following error message is encountered: Can't locate object method "name" via package "XML::Grove::PI" at ... It appears the name method is not valid for objects in the list of $grove->contents. ***I don't know. I don't have time to research this. Maybe for the next edition. =====

Anonymous   
Printed
Page 140
2nd code example

When the code example calls the purge_nselems subroutine, the ampersand in the code does not appear as an ampersand but instead as an ampersand PLUS the string "amp;". As the form for the errata submissions is probably also buggy in accepting ampersands, I avoid using a real ampersand to describe the bug. ***I don't understand this erratum. However, you can remove the & character from line 10 of that example and it would be better style. ======

Anonymous   
Printed
Page 155
Example 8-10, 4th paragraph, line 2

foreach my $file ( @source_files ) { should read : foreach my $source_file (@ source_files) { ***Replace with this: foreach my $source_file (@source_files) {

Anonymous