Re: Problem with validation against Schema.

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.

Please advise

Thanks
Shay.

> ----- Original Message -----
> From: "Henry S. Thompson" <ht@cogsci.ed.ac.uk>
> To: <shayb@rafael.co.il>
> Cc: "Xmlschema-Dev" <xmlschema-dev@w3.org>
> Sent: Tuesday, February 04, 2003 8:21 PM
> Subject: Re: Problem with validation against Schema.
>
>
> > All the elements in your instance document are in a namespace (as I
> > said in my previous message, this is almost certainly a bug -- remove
> > the xsi: prefix from all your elements -- they're not in the
> > schema-instance namespace, for sure).
> >
> > You schema is explicitly for elements in no namespace.
> >
> > So not surprisingly, it won't validate your instance.
> >
> > ht
> >
> > "SHAY" <shayb@rafael.co.il> writes:
> >
> > > 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">
> >
> > <snip/>
> >
> > > </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>
> >
> > --
> >   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 Thursday, 6 February 2003 17:48:04 UTC