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 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?
  #2 (permalink)  
Old September 30th, 2005, 07:17 AM
joefawcett's Avatar
Wrox Author
Points: 9,763, Level: 42
Points: 9,763, Level: 42 Points: 9,763, Level: 42 Points: 9,763, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Exeter, , United Kingdom.
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

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

--

Joe
  #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>
  #4 (permalink)  
Old September 30th, 2005, 08:03 AM
joefawcett's Avatar
Wrox Author
Points: 9,763, Level: 42
Points: 9,763, Level: 42 Points: 9,763, Level: 42 Points: 9,763, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Exeter, , United Kingdom.
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 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
  #5 (permalink)  
Old October 5th, 2005, 02:14 AM
joefawcett's Avatar
Wrox Author
Points: 9,763, Level: 42
Points: 9,763, Level: 42 Points: 9,763, Level: 42 Points: 9,763, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Exeter, , United Kingdom.
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 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
  #6 (permalink)  
Old November 22nd, 2006, 06: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.


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





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