[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Namespace: what's the 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! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|