Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > XML > BOOK: Beginning XML, 5th edition
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old July 4th, 2013, 11:28 AM
Registered User
Points: 5, Level: 1
Points: 5, Level: 1 Points: 5, Level: 1 Points: 5, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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.
Reply With Quote
  #2 (permalink)  
Old July 12th, 2013, 01:29 PM
Registered User
Points: 9, Level: 1
Points: 9, Level: 1 Points: 9, Level: 1 Points: 9, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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).
Reply With Quote
  #3 (permalink)  
Old July 31st, 2014, 07:02 AM
Registered User
Points: 9, Level: 1
Points: 9, Level: 1 Points: 9, Level: 1 Points: 9, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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 ?
Reply With Quote
  #4 (permalink)  
Old July 31st, 2014, 08:48 AM
Registered User
Points: 9, Level: 1
Points: 9, Level: 1 Points: 9, Level: 1 Points: 9, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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
Reply With Quote
  #5 (permalink)  
Old July 31st, 2014, 11:05 AM
Registered User
Points: 9, Level: 1
Points: 9, Level: 1 Points: 9, Level: 1 Points: 9, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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
Reply With Quote
  #6 (permalink)  
Old July 4th, 2015, 12:22 PM
Registered User
Points: 3, Level: 1
Points: 3, Level: 1 Points: 3, Level: 1 Points: 3, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jul 2015
Location: Holland, MI
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>
Reply With Quote
  #7 (permalink)  
Old October 5th, 2016, 03:30 PM
Registered User
Points: 3, Level: 1
Points: 3, Level: 1 Points: 3, Level: 1 Points: 3, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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.
Reply With Quote
  #8 (permalink)  
Old October 5th, 2016, 04:23 PM
Registered User
Points: 9, Level: 1
Points: 9, Level: 1 Points: 9, Level: 1 Points: 9, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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 12: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



All times are GMT -4. The time now is 09:44 PM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.