OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Namespace: what's the correct usage?

> Sorry. I meant that an explanation along with this line is probably more
> adequate for my "XML Schema: DOs and DON'Ts", as the reason of why one
> should avoid unqualified local elements.

Before this discussion comes to an end (if it ever will...) I think I'll add my 2
cents worth. I think we can agree that there is no "correct" way of using
namespaces however both Simon and Kohsuke make a very good point that using
namespaces the way Martin does is confusing for people new to namespaces. I've
just spent 4 months writing a 2 day course on XML Schema (No it's not a
comprehensive course that explains every detail). The course is intended for
people with knowledge in XML and XML Namespaces. I start off with a short review
of DTDs and Namespaces before going into XML Schema. Thus far I've only had one
session so this may not be very significant but what I expected to spend time on
was the more complex issues in XML Schema (complex type derivation, abstract
elements etc.) but I was surprised to see that the attendants understood this very
easily. Instead I had to spend a long time on the Namespace review and especially
default namespace declarations. As long as every element was prefixed it was ok
but default namespace declarations caused confusion. I had planned to discuss the
meaning of the elementFormDefault attribute but I ended up telling them to always
set elementFormDefault="qualified" in their schemas (at least in the beginning)
because there was no way I could explain it to them. I also suggested that they
always should use explicit namespace declaration because it is less confusing.

So, even though Martins use of namespaces is perfectly valid maybe we should be
careful with it's use in consideration of XML developers just beginning to
understand namespaces.