Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > BOOK: Beginning XML, 5th edition
|
BOOK: Beginning XML, 5th edition
This is the forum to discuss the Wrox book Beginning XML 5th Edition by Joe Fawcett, Danny Ayers, Liam R. E. Quin; ISBN: 978-1-1181-6213-2
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning XML, 5th edition section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 4th, 2013, 11:28 AM
Registered User
 
Join Date: Jul 2013
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default chapter 4 validation error

Hi, when i try to validate contacts3.xml from chapter 4, i get the following errors:

21:57 Attribute value "John Doe" of type ID must be an NCName when namespaces are enabled.
33:12 An element with the identifier "Fawcett" must appear in the document.
 
Old July 12th, 2013, 01:29 PM
Registered User
 
Join Date: Jul 2013
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

If you look at the example in the printed book very carefully you'll see it has John_Doe with an underscore for the contact attribute. The same underscore should be used in the person attribute of the contact element, but seems to have been lost in the printed version of the file (I don't know if it was in the file sent to Wrox, this wasn't one of my chapters, sorry).
 
Old July 31st, 2014, 07:02 AM
Registered User
 
Join Date: Jun 2014
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default And more . . .

The second error was due to the authors having used "Joe_Fawcett" for the contact element's person attribute but then entering "Joseph Fawcett" in the knows element's contacts attribute . . .

By the DTD, both these attributes must be the same.

Say, Liamo -- was there ever a publisher's editor on this book ?
You know, the guy who might have divided up the chapters between the various authors and who then reviewed the finished work . . .

Or was he completely out of it too, just like his charges ?
 
Old July 31st, 2014, 08:48 AM
Registered User
 
Join Date: Jul 2013
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by corinthian13 View Post
The second error was due to the authors having used "Joe_Fawcett" for the contact element's person attribute but then entering "Joseph Fawcett" in the knows element's contacts attribute . . .

By the DTD, both these attributes must be the same.

Say, Liamo -- was there ever a publisher's editor on this book ?
You know, the guy who might have divided up the chapters between the various authors and who then reviewed the finished work . . .

Or was he completely out of it too, just like his charges ?
Attribute - think of it as a test :-)

Publisher's Editor - yes, but she was not a domain expert. The schedule meant we didn't get to review each other's chapters either. I hate these multi-author books, although I think this one turned out better than many of them, and not many XML books are being published these days. - Liam
 
Old July 31st, 2014, 11:05 AM
Registered User
 
Join Date: Jun 2014
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

. . . and not many XML books are being published these days. - Liam

Don't tempt me.

By the way, would you use your good offices to ensure the creation of a proper error reporting webpage on the Wrox website so that all those errors - typos and no-typo errors in the text, as well as all those code example errors - can be listed chapter by chapter, page by page, para by para ?

The existing system forces error reporters to go through the usual customer relations junk and then ignores all the errors reported . . .
An automated system (e.g. 3 independent reports for a confirmation) would be so much easier on everyone, publisher and reader alike.

"Let's do somethin' for those damn niqqers", as LBJ used to say.

Last edited by corinthian13; August 1st, 2014 at 12:17 PM.. Reason: Additions
 
Old July 4th, 2015, 12:22 PM
Registered User
 
Join Date: Jul 2015
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default And then there were three...

I picked up on the John Doe and Fawcett errors and corrected them through trial-and-error, but the one that really tripped me up was a recurring validation error stating that there needed to be an element with an ID for "Danny Ayers". I finally just added a third "contact" node for "Danny Ayers" to meet that requirement:

<contact person="Danny_Ayers" tags="author dude">
<name>
<first>Danny</first>
<last>Ayers</last>
</name>
<location>
<address>Address is not known</address>
</location>
<phone kind="Home">425 245 4356</phone>
<knows contacts="Joseph_Fawcett John_Doe"/>
<description>Junior Technical Consultant for LMX.</description>
</contact>
 
Old October 5th, 2016, 03:30 PM
Registered User
 
Join Date: Sep 2016
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default More example errors Danny_Ayers

Hey folks, another problem with the 'TRY IT OUT'. Chapter 5 (Defining XML Schema) Page 151 "Making Contact - Built-in XML Schema Data Type" contacts6.xml.

Good old Danny_Ayers is listed twice in:
<knows contacts="Liam_Quin Danny_Ayers" />
<knows contacts="Joe Fawcett Danny_Ayers" />

then in the psd file <attribute name="contacts" type="IDREFS">. Oops!

Remove Danny or add him to the contacts6.xml file and it validates.

Why you're at it, another typo in contacts6.xml: change 'Joe Fawcett' to 'Joe_Fawcett'.

I'm not a rookie at this code stuff, be writing code since the mid 1980's, so wasn't thrown off by the typos nor the sloppy editing but seriously if you're new to XML and purchased this book to learn XML typos like this can be at best: annoying, at worst: force you to consider why you would ever purchase a book from this publisher again.
 
Old October 5th, 2016, 04:23 PM
Registered User
 
Join Date: Jul 2013
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by corinthian13 View Post
. . . and not many XML books are being published these days. - Liam

Don't tempt me.

By the way, would you use your good offices to ensure the creation of a proper error reporting webpage on the Wrox website

.
Sorry I missed this before. I'm afraid I don't have any particularly good standing with Wrox, who were bought by Wiley. I'd actually like to revise this book and fix the errors (and maybe add a new chapter on XSL-FO and CSS for print), but I was brought in at the last minute when Danny Ayers fell ill, and wrote some of the other chapters for him.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Validation Problems in Chapter 9 PMooney90 BOOK: Beginning ASP.NET 4 : in C# and VB 6 August 31st, 2011 06:53 PM
Chapter 9 - Validation question Rushino BOOK: Beginning ASP.NET 4 : in C# and VB 3 April 26th, 2010 03:47 AM
validation problem Chapter 8 Glenn BOOK: Beginning Oracle Application Express ISBN: 9780470388372 3 January 16th, 2010 01:32 AM
Chapter 2 Package validation error LesThompson BOOK: Expert SQL Server 2005 Integration Services ISBN: 978-0-470-13411-5 0 October 24th, 2008 01:19 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.