[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] xsd : root element not found
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! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|