Errata

Java and XML

Errata for Java 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.

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 103
middle code sample

<!ELEMENT JavaXML:Content (JavaXML:Chapter+, JavaXML:SectionBreak?)+)>

should read:

<!ELEMENT JavaXML:Contents ((JavaXML:Chapter+, JavaXML:SectionBreak?)+)>

Same change on p. 104, 105, and 107.

Anonymous   
Printed Page 130
1st paragraph

I took the code for chapter 5 from the book's website.
I ran SAXParserDemo without fault. However, when I commented out

<!ENTITY OReillyCopyright SYSTEM
"../entities/copyright.txt">

in file "ch05/DTD/JavaXML.dtd", and uncommented

<!ENTITY OReillyCopyright SYSTEM
"http://www.oreilly.com/catalog/9780596000165/docs/copyright.xml">

in the same file, I got the following error:

**Parsing Fatal Error**
Line: 1
URI: http://www.oreilly.com/catalog/9780596000165/docs/copyright.xml
Message: White space is required between the version and the encoding
declaration.
Error in parsing: Fatal Error encountered

I'm using the Xerces parser, version 1.4.1

Anonymous   
Printed Page 225
new Document instantiation

I have the June 2000 (first edition) of the "Java and XML" book, and the
piece of code on page 225 is written as:

Document doc = new Document(new Element("config", ns))
.setDocType(new DocType("linux:config", "DTD/linux.dtd"))
.addProcessingInstruction("cocoon-process", "type="xsp"")

The downloadable source code is written as:
Document doc = new Document(new Element("config", ns))
.setDocType(new DocType("linux:config", "DTD/linux.dtd"))
.addContent(new ProcessingInstruction("cocoon-process", "type="xsp"")

The addContent method in the downloadable source code is not consistent with
the use of the addProcessingInstruction method, as written on page 225. The
downloadable source code compiles successfully, whereas the source code
written in the book does not.

Has there been a change to the JDOM API? I noticed that the addChild method
doesn't seem to work either. Thanks!

Anonymous