p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: Beginning XML 3rd Edition (http://p2p.wrox.com/forumdisplay.php?f=149)
-   -   Chapter 5 - Try It Out: Pages 208-210 (http://p2p.wrox.com/showthread.php?t=33682)

Wyatt70 September 25th, 2005 07:00 PM

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:


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


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?

joefawcett September 30th, 2005 07:17 AM

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



Wyatt70 September 30th, 2005 07:52 AM

Here you go:


<?xml version="1.0"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema"
  <group name="NameGroup">
      <element name="first" type="string"/>
      <element name="middle" type="string"/>
      <element name="last" type="string"/>
  <complexType name="NameType">
    <group ref="target:NameGroup"/>
    <attribute name="title" type="string"/>
  <element name="name" type="target:NameType"/>

joefawcett September 30th, 2005 08:03 AM

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.



joefawcett October 5th, 2005 02:14 AM

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.



humayunlalzad November 22nd, 2006 06:54 AM

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.

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

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