[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

xsd : root element not found


xsd root element
Hi all,

I'm having a quick problem here. I've created a schema document based on an
xml format I'm going to be using. When I try to validate the xml document in
XMLSpy Home, I get a "This file is not valid: The element declaration was
not found for root element 'standaloneArticle'." error.

It seems to me that the path to the xsd file in my xml document is not
correct. I'm doing my document editing on my local file system. On my
desktop I've created a folder called 'xml' and I've put both the xsd and the
xml document in that folder at the same level.

Why can't XMLSpy validate my xml? I don't see what I'm doing wrong here.

Thanks,

Darren

(--relevant code follows--)

[from article.xml]
<?xml version="1.0" encoding="utf-8"?>
<standaloneArticle xmlns="http://globals.namespace.org"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 
xsi:schemaLocation="http://globals.namespace.org/content/xml/xsd/v10/article
/single/ standaloneArticle.xsd">
  <article>
...
  </article>
</standaloneArticle>

[from standaloneArticle.xsd]
<?xml version="1.0" encoding="UTF-8" ?> 
<xs:schema
targetNamespace="http://globals.namespace.org/content/xml/xsd/v10/article/si
ngle/"
  xmlns:sar="http://globals.
namespace.org/content/xml/xsd/v10/article/single/"
  xmlns:art="http://globals. namespace.org/content/xml/xsd/v10/article/"
  xmlns:ref="http://globals. namespace.org/content/xml/xsd/v10/reference/"
  xmlns:xs="http://www.w3.org/2001/XMLSchema" 
  elementFormDefault="qualified" 
  attributeFormDefault="qualified">
  <!-- import of external definitions -->
  <xs:import namespace="http://globals.
namespace.org/content/xml/xsd/v10/article/"
           schemaLocation="article.xsd"/>
  <xs:import namespace="http://globals.
namespace.org/content/xml/xsd/v10/reference/"
           schemaLocation="reference.xsd"/>
  <!-- definition of complex type elements -->
  <xs:element name="standaloneArticle">
...
  </xs:element>
</xs:schema>



PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.