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

Re: Namespace: what's the correct usage?

  • From: "Simon St.Laurent" <simonstl@s...>
  • To: Martin Gudgin <marting@d...>
  • Date: Sat, 19 May 2001 18:27:36 +0000

may well correct usage
On 19 May 2001 21:17:06 +0100, Martin Gudgin wrote:
> > > package example.org.person;
> > >
> > > public class person
> > > {
> > >     String given;
> > >     String family;
> > > }
> > >
> > > to me at least...
> >
> > The difference is that in XML elements are first class entities, that is
> the
> > "given" element is not declared within the scope of the "person" class.
> 
> But attributes are declared in the scope of their owner element. Why not
> child elements? This is the crux of the question I think.

You certainly can write processors which behave this way, but there's
nothing _in the markup_ which indicates that the namespace scope for the
child elements behaves that way.

If you start from public class person and think of it as a simple
serialization problem, you may well end up with a very different answer
than if you set out to solve the question of how best to mark this
information up in an XML document.

Unfortunately, I think the way you're going about using namespaces makes
a lot of potentially unfounded assumptions about how the document will
be processed.  In an environment you completely control, that's fine,
but if your documents ever leak out to the rest of the world, you may
well find that no one else shares your assumptions and that therefore
the document is interpreted quite differently.



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-2007 All Rights Reserved.