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

Re: Document is invalid: no grammar found


cd.xsd
Jose Airton wrote:

> 
> I created a XML instance : cd.xml and a schema cd.xsd.
> 
> In the begining of cd.xml, it is like the following:
> 
> <cd xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:noNamespaceSchemaLocation="file:///c:/cd.xsd">
> 
> when I run parser, it always gives error message:
> 
> "Document is invalid: no grammar found.

The problem is in the specification of the schema location, but there 
are several possiblities.

1) Is the schema really at c:\cd.xsd?  That would be really unlikely. 
If you meant to use a relative path, you should say just "cd.xsd", if 
the schema is in the same directory as the source file, otherwise use a 
relative path starting from the document location without any "file:///" 
or "c:/".  Remember that the processor already knows the base of the 
document's path, and so does not need to be told "file:///" or whatever.

This is the most likely problem.  If the path you gave is truly the 
correct absolute path, then you may be getting bit by the fact that 
file: URIs are not adequately  specified by the rfc - and some 
processors think they should be receiving different formats for a file: 
URI, especially with a Windows path.

2) Try changing the slashes after "c:" to backslashes
3) Try changing from "file"///" to "file://" or "file:/" or "file:". 
Various processors in the past have wanted to have these (incorrect) 
variations.

Cheers,

Tom P

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.