W3C home > Mailing lists > Public > xmlschema-dev@w3.org > May 2009

XML XSD Validation

From: Rajeevr <rajeevr@cisco.com>
Date: Thu, 28 May 2009 08:33:25 -0700 (PDT)
Message-ID: <23764252.post@talk.nabble.com>
To: xmlschema-dev@w3.org

I am using Xerces for validating a XML against a XSD. Xsd validation can be
done by two ways: noNamespaceSchemaLocation/schemaLocation. 
I successfully validated it against XSD by using noNamespaceSchemaLocation
like this:

<?xml version="1.0"?>
<dictionary xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

But I am facing problem in schemaLocation. When I provide schemaLocation
which is well accessible and available in my local machine, Xerces throws
this error: cvc-elt.1: Cannot find the declaration of element 'dictionary'.
I put dictionary.xsd file under tomcat and started the tomcat server. But 

<?xml version="1.0"?>
<dictionary xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

XSD File;
<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
	<xsd:element name="dictionary" type="dictionaryType"/>
	<xsd:complexType name="dictionaryType">
			<xsd:element name="word" type="wordType" maxOccurs="unbounded"/>

Someone please help me out to understand the exact problem.


View this message in context: http://www.nabble.com/XML-XSD-Validation-tp23764252p23764252.html
Sent from the w3.org - xmlschema-dev mailing list archive at Nabble.com.
Received on Thursday, 28 May 2009 16:17:36 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:56:16 UTC