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
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old September 25th, 2005, 07:00 PM
Authorized User
 
Join Date: Nov 2003
Location: , , .
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 5 - Try It Out: Pages 208-210

I am using Visual Studio 2005 Release Candidate to do the exercises.

The exercise had me add the the following statement to my xsd:

Code:
<import namespace="http://www.example.com/name" schemaLocation="name8.xsd"/>
Visual Studio returns the following error message for this statement:

Quote:
quote:The schema referenced from this location in your document contains errors.
I couldn't see anything wrong with this statement, so I went and loaded the file created by the authors. It generates the same error message.

Is there a problem with the XML or is it a problem with Visual Studio 2005?
Reply With Quote
  #2 (permalink)  
Old September 30th, 2005, 07:17 AM
joefawcett's Avatar
Wrox Author
Points: 9,712, Level: 42
Points: 9,712, Level: 42 Points: 9,712, Level: 42 Points: 9,712, Level: 42
Activity: 7%
Activity: 7% Activity: 7% Activity: 7%
 
Join Date: Jun 2003
Location: Exeter, , United Kingdom.
Posts: 3,066
Thanks: 1
Thanked 36 Times in 35 Posts
Default

I don't have a copy to hand so could you post name8.xsd?

--

Joe
Reply With Quote
  #3 (permalink)  
Old September 30th, 2005, 07:52 AM
Authorized User
 
Join Date: Nov 2003
Location: , , .
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Here you go:

Code:
<?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">
  <group name="NameGroup">
    <sequence>
      <element name="first" type="string"/>
      <element name="middle" type="string"/>
      <element name="last" type="string"/>
    </sequence>
  </group>
  <complexType name="NameType">
    <group ref="target:NameGroup"/>
    <attribute name="title" type="string"/>
  </complexType>
  <element name="name" type="target:NameType"/>
</schema>
Reply With Quote
  #4 (permalink)  
Old September 30th, 2005, 08:03 AM
joefawcett's Avatar
Wrox Author
Points: 9,712, Level: 42
Points: 9,712, Level: 42 Points: 9,712, Level: 42 Points: 9,712, Level: 42
Activity: 7%
Activity: 7% Activity: 7% Activity: 7%
 
Join Date: Jun 2003
Location: Exeter, , United Kingdom.
Posts: 3,066
Thanks: 1
Thanked 36 Times in 35 Posts
Default

Schemas aren't my speciality but it appears to work in the older Visual Studio.

I'll try to ask someone on the Microsoft team later today.



--

Joe
Reply With Quote
  #5 (permalink)  
Old October 5th, 2005, 02:14 AM
joefawcett's Avatar
Wrox Author
Points: 9,712, Level: 42
Points: 9,712, Level: 42 Points: 9,712, Level: 42 Points: 9,712, Level: 42
Activity: 7%
Activity: 7% Activity: 7% Activity: 7%
 
Join Date: Jun 2003
Location: Exeter, , United Kingdom.
Posts: 3,066
Thanks: 1
Thanked 36 Times in 35 Posts
Default

Well it works in VS 2005 as well.
is the main schema okay without the import, and is the import in the same folder?

If so then post the main schema and I'll try with that.

--

Joe
Reply With Quote
  #6 (permalink)  
Old November 22nd, 2006, 05:54 AM
Authorized User
 
Join Date: Nov 2006
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Your schema file is working perfectly with my name.xml,
either there is prob with the name.xml file or with VS.
 it would be good if you send the xml file for scrutiny.
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
Chapter 7 Try it Out Problems, pages 238,239. VictorVictor BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 0 February 1st, 2006 07:31 PM
Chapter 9 Protecting Your Pages malhyp Dreamweaver (all versions) 1 August 20th, 2005 04:14 AM
ch 7 page 208 commit.php pipdickenz BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 1 September 8th, 2004 12:08 PM
PHP5 Errata - Pages 207-208 garrisrd BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 1 August 4th, 2004 05:54 PM
Chapter 2, pages 68/69 moviesite.php ruairiglenn04 BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 1 August 1st, 2004 05:27 AM



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


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