W3C home > Mailing lists > Public > xmlschema-dev@w3.org > August 2002

RE: Why doesn't this instance document validate?

From: John Verhaeg <jverhaeg@metamatrix.com>
Date: Fri, 23 Aug 2002 09:46:09 -0500
Message-ID: <C7CDD3E67B05D411A45800E018C1614EE6DA8A@mail>
To: "'ht@cogsci.ed.ac.uk'" <ht@cogsci.ed.ac.uk>
Cc: "XML Schema Mailing List (E-mail)" <xmlschema-dev@w3.org>

Thank you very much for the quick answer!  Don't worry about the brevity; I
understood your answer just fine.  Regarding this being a FAQ, I searched
for this topic in the archives yesterday and didn't find any references, but
maybe I was using the wrong keywords...

John P. A. Verhaeg

-----Original Message-----
From: ht@cogsci.ed.ac.uk [mailto:ht@cogsci.ed.ac.uk]
Sent: Friday, August 23, 2002 9:36 AM
To: John Verhaeg
Cc: XML Schema Mailing List (E-mail)
Subject: Re: Why doesn't this instance document validate?

John Verhaeg <jverhaeg@metamatrix.com> writes:

> Can someone tell me why the attached instance document using the attached
> schemas won't validate?  XML Spy is saying "This file is not valid:
> Mandatory local element 'publisher' must be unqualified (i.e. outside of
> namespace), but you are using a default namespace".

Exactly what it says -- you have (by default) specified that
locally-declared elements (which 'publisher' is) must appear
unqualified, but by using a default NS decl in your instance, you've
caused it to appear qualified.

Either use an explicit prefix on the document element only in your
instance, or add "elementFormDefault='qualified'" to your xs:schema

This is a FAQ, sorry for the brief answer, there must be a longer one
around somewhere . . .

  Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
          W3C Fellow 1999--2002, part-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
Received on Friday, 23 August 2002 10:46:15 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:55:58 UTC