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?



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.