W3C home > Mailing lists > Public > xmlschema-dev@w3.org > February 2003

RE: Problem with validation against Schema.

From: SHAY <shayb@rafael.co.il>
Date: Tue, 4 Feb 2003 20:14:54 +0200
To: "Xmlschema-Dev" <xmlschema-dev@w3.org>
Message-ID: <HHEHLIFHOAOHODJDKNPPMEFDCAAA.shayb@rafael.co.il>

Thanks for your quick response.
The processor\browser is Microsoft Explorer 6.0. I'm not using any special
application to validate the Instance against the schema I created. I'm just
loading the instance using a script and interpreting the parseError
property.
As I mentioned, after checking the schema for well formedness(By the
processor), no validation is done.
The following is my Schema:
<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<xsd:annotation>
	<xsd:documentation xml:lang="en">
		schema for the proposals tracking application designed for Rafael
	</xsd:documentation>
</xsd:annotation>

<xsd:element name="proposals" type="PROPOSALSTYPE"/>

	<xsd:complexType name="PROPOSALSTYPE">
		<xsd:element name="PROPOSAL" type="PROPOSALTYPE" minOccurs="1"
maxOccurs="unbounded"/>
	</xsd:complexType>

<xsd:complexType name="PROPOSALTYPE">
	<xsd:sequence>
		<xsd:element name="proposal_description" type="xsd:long"/>
		<xsd:element name="P.O">
			<xsd:complexType>
				<xsd:simplecontent>
					<xsd:extension base="xsd:string">
						<xsd:attribute name="Dater" type="xsd:date"/>
					</xsd:extension>
				</xsd:simplecontent>
			</xsd:complexType>
		</xsd:element>
		<xsd:elemet name="status" type="xsd:string"/>
		<xsd:attribute name="Date" type="xsd:date" use="required"/>
	</xsd:sequence>

</xsd:complexType>

</xsd:schema>

The Instance goes like this:

<?xml version="1.0"?>

<xsi:proposals xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="file:///C:/My Documents/proposal1.xsd">

	<xsi:PROPOSAL>
		....
		....

	</xsi:PROPOSAL>

</xsi:proposals>

Thanks
Shay.


-----Original Message-----
From: ht@inf.ed.ac.uk [mailto:ht@inf.ed.ac.uk]On Behalf Of Henry S. Thompson
Sent: Friday, January 31, 2003 12:46 AM
To: shayb@rafael.co.il
Cc: Xmlschema-Dev
Subject: Re: Problem with validation against Schema.


You don't say what processor/validator you are using, which makes it
hard to help you.

Putting the xsi: prefix on your elements is certainly wrong.

Look _very_ closely at the error message you're getting, it probably
will tell you what the problem is.  Failing that, include [at least a
bit of] the schema document in your next posting.

ht
--
  Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
                      Half-time member of W3C Team
     2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
	    Fax: (44) 131 650-4587, e-mail: ht@cogsci.ed.ac.uk
		     URL: http://www.ltg.ed.ac.uk/~ht/
 [mail really from me _always_ has this .sig -- mail without it is forged
spam]
Received on Tuesday, 4 February 2003 13:15:43 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:36 GMT