Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > XML > BOOK: Beginning XML 3rd Edition
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning XML 3rd Edition
This is the forum to discuss the Wrox book Beginning XML, 3rd Edition by David Hunter, Andrew Watt, Jeff Rafter, Jon Duckett, Danny Ayers, Nicholas Chase, Joe Fawcett, Tom Gaven, Bill Patterson; ISBN: 9780764570773
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning XML 3rd 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
 
 
Thread Tools Display Modes
  #1 (permalink)  
Old December 18th, 2007, 10:53 AM
Registered User
 
Join Date: Dec 2007
Location: Brighton, MA, USA.
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Error in "Try It Out", pages 149-150

I'm working on the Chapter 5 "Try It Out" on pages 149-50, and keep getting the same error when I try to validate the xml file in Codeplot, though I've checked what I've written against what's in the book, and it seems to match. The error I'm getting is:

[Error] Document is invalid: no grammar found. Line 2, Column 6
[Error] Document root element "name", must match DOCTYPE root "null". Line 2, Column 6

Do you know why I'm getting this? The text of the xml doc I'm validating is:

<?xml version="1.0"?>
<name
   xmlns="http://www.example.com/name"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://www.example.com/name name5.xsd"
   title="Mr.">
      <first>John</first>
      <middle>Fitzgerald Johansen</middle>
      <last>Doe</last>
</name>

And the text of the .xsd file is:

<?xml version="1.0"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:target="http://www.example.com/name"
targetNamespace="http://www.example.com/name" elementFormDefault="qualified">
   <element name="name">
      <complexType>
         <sequence>
            <element name="first" type="string"/>
            <element name="middle" type="string"/>
            <element name="last" type="string"/>
         </sequence>
         <attribute name="title" type="string"/>
      </complexType>
   </element>
</schema>

Thanks,
Peter Floyd
pfloyd@asp.md

 


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
Chapter 5 "Try It Out", pgs. 149-50 pfloyd BOOK: Beginning XML, 4th Ed ISBN: 978-0-470-11487-2 0 December 21st, 2007 05:15 PM
More than 150 Ajax links ajax JSP Basics 2 January 20th, 2007 02:46 AM
SQL Help on Users and Authentication page 149 seanmayhew BOOK: ASP.NET Website Programming Problem-Design-Solution 1 May 26th, 2004 10:30 AM
CH5 pg 150 While Loops wadesmart BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 11 November 8th, 2003 04:51 PM
Chapter 5 page 150 - Wondering why.... potassium Beginning PHP 3 July 27th, 2003 01:05 AM



All times are GMT -4. The time now is 06:29 AM.


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