[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Namespace: what's the correct usage?
- From: Jeff Rafter <firstname.lastname@example.org>
- To: Jonathan Borden <email@example.com>
- Date: Mon, 21 May 2001 17:16:45 -0700
> nothing changes the rules of XML 1.0 and XML namespaces. In your example
> _each_ <name> element is qualified by the http://foo namespace. none are
> > or it is an unqualified element from the urn:x2 namespace (which
> > is the more correct assumption).
> there is no such thing as an "unqualified element from the urn:x2
> namespace". doesn't exist.
This is where the confusion is, and this is what I was trying to point out.
Without the xmlns='' a validator wouldn't know where to look for the
declaration of name (which according to XML Namespaces would be http://foo
and according to XML Schemas would be urn:x2). If the unr:x2 schema defined
the name element (and kept the default unqualified setting) then that schema
should be used for validation instead of the http://foo definition of name
(at that level).
> this example, and your analysis of it are proof that this construct is
> confusing. it is _genuinely_ confusing. i say "let's keep life as simple
My analysis was intended to prove the confusion while adhering to the spec.
I agree that simplicity should win out in this case, by all means...
> I agree, (aside from the fact that urn:x2 is not a 'legal' URI)
> http://example.org is defined by an RFC to be used as an example URI.
Sorry for perpetuating the bad URI.
XML Development and Developer Web Hosting