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?




----- Original Message -----
From: "Eddie Robertsson" <eddie@allette.com.au>
To: "Kohsuke KAWAGUCHI" <kohsukekawaguchi@yahoo.com>
Cc: "Martin Gudgin" <marting@develop.com>; <xml-dev@lists.xml.org>
Sent: Monday, May 21, 2001 3:18 AM
Subject: 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.

Our experience is similar to yours. We ended up putting an entire lecture on
namespaces into our XML class. Once people understand namespaces, the schema
stuff is actually relatively painless. Regarding default namespace decls, I
just tell people not to use them.

> 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.

Interesting. I found it actually *helped* people's understanding of
namespaces to look at elementFormDefault='unqualified' first...

> I also suggested that they
> always should use explicit namespace declaration because it is less
confusing.

Agreed.

>
> 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.

I regularly teach XML to developers, some of whom have no prior XML
experience. There is no doubt that namespaces are the most confusing part of
XML for most people ( and we don't even cover local-scoping until the schema
chapters ).

Regards

Martin Gudgin
DevelopMentor