Re: Problem with validation against Schema.

"SHAY" <shayb@rafael.co.il> writes:

> Hello Henry.
> 
> I followed your instructions and the outcome is: Removal of the xsi:
> prefix from the elements raises this Error massage: “The element
> 'proposals' is used but not declared in the DTD/Schema”.  I tried
> not to mention the xsi attribute at all, something like this:
> 
> <proposals noNamespaceSchemaLocation="file:///C:/My
> Documents/proposal1.xsd">
> 
> But in this case the processor doesn’t even bother to locate the
> schema. It ignores it.  Only when the xsi: prefix is attached to all
> elements the schema is located and checked for well-formedness. But
> - no validation performed.

I didn't say to remove the declaration, or to remove the prefix from
the attribute.  Your instance should begin:

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

I encourage you to look at the Primer [1], or get an introductory XML
Schema book -- you seem to be a bit unfamiliar with how namespaces and
schemas work.

ht

[1] http://www.w3.org/TR/xmlschema-0/
-- 
  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 Friday, 7 February 2003 04:18:42 UTC