[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Namespace: what's the correct usage?

  • From: Martin Gudgin <marting@d...>
  • To: Eddie Robertsson <eddie@a...>,Kohsuke KAWAGUCHI <kohsukekawaguchi@y...>
  • Date: Mon, 28 May 2001 12:22:54 +0100

discuss correct usage

----- Original Message -----
From: "Eddie Robertsson" <eddie@a...>
To: "Kohsuke KAWAGUCHI" <kohsukekawaguchi@y...>
Cc: "Martin Gudgin" <marting@d...>; <xml-dev@l...>
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


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.