Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > BOOK: Beginning XML 3rd Edition
| 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 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
  #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



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 09: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 12:05 AM





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