- From: Eric van der Vlist <vdv@dyomedea.com>
- Date: Mon, 29 Jan 2001 12:39:33 +0100
- To: Martin Gudgin <marting@develop.com>
- CC: XML Schema Dev <xmlschema-dev@w3.org>
Martin Gudgin wrote: > > Hi Eric, > > Thanks very-much for you input, comments inline. You're welcome, this is an interesting point (IMHO). > > Martin Gudgin > DevelopMentor > > ----- Original Message ----- > From: "Eric van der Vlist" <vdv@dyomedea.com> > To: "Martin Gudgin" <marting@develop.com> > Cc: "XML Schema Dev" <xmlschema-dev@w3.org> > Sent: Monday, January 29, 2001 11:06 AM > Subject: Re: Unknown prefix xml? > > > Martin Gudgin wrote: > > > > > > Just to be sure... You are saying I have to put > > > > > > xmlns:xml='http://www.w3.org/XML/1998/namespace' > > > > > > in my schema document? > > > > Yes. > > > > > That seems very weird. The xml namespace prefix is always in scope, why > > > should I have to declare it. > > > > My take on this is that W3C XML Schema is trying to kill 2 birds with a > > single declaration. > > > > When you write xmlns:foo="http://bar" in a schema, you do 2 different > > things: > > > > 1) you declare a namespace prefix per the namespaces in XML 1.0 rec > > that, most of the time, you will not use as a namespace prefix. > > [MJG] > Well, I will use it as a namespace prefix. Maybe not in the name of an element or attribute but > elsewhere where QNames are needed ( element and attribute decls for example ). What I meant is that you are declaring xmlns:foo="http://bar" without any intention to write somewhere in the document <foo:element> or <element foo:attribute="...">. > > > > 2) you declare to the schema processor that you will be using the prefix > > 'foo' inside W3C XML Schema attributes to identify the namespace > > "http://bar". > > [MJG] > I don't really see the distinction. Element names and attributes names are QNames. Certain > attributes in the schema language are QNames. Sorry for the rant. IMHO, this usage is creating unnecessary adherence between namespace prefixes and schema information. > > > > The xml namespace prefix is always in your scope per the namespace rec > > to perform 1), but not ins your scope to perform 2). > > [MJG] > Hmmm. This seems counterintuitive to me. I know Henry was keen that he be allowed to map > http://www.w3.org/1998/XML/namespace to an arbitrary prefix but I didn't think it was because the > xml prefix wasn't in-scope for attributes of type QName. But I could be misremembering... Again, it's my personal take on the subject. > > > > > MSXML sees this as an error, complaing that the prefix xml is invalid. > > > Xerces and Oracle accept it. Either way it doesn't solve my problem. A modified schema with the > > > above declaration still gives the same error[3] > > > > I am confused with your schema. It has no global element definition... > > Is it intended to be included in another one ? Otherwise I don't see > > which instance document can be validated ? Could you provide one ? > > [MJG] > The schema is the instance. I'm trying to validate it against the schema-for-schemas. This is a > minimum repro test case from a much larger schema I'm trying to validate. I can provide a schema > with an element decl if you like but it won't make any difference to the problem at hand :-( No, I had just missed the point. I think your problem is that there is no namespace definition for the schema target namespace. When I add one, it validates using either XML Spy 3.5 or XSV (I haven't the most recent version installed, though). Eric -- ------------------------------------------------------------------------ Eric van der Vlist Dyomedea http://dyomedea.com http://xmlfr.org http://4xt.org http://ducotede.com ------------------------------------------------------------------------
Received on Monday, 29 January 2001 06:39:37 UTC