XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] Lesson Learned: Use namespaces for both markup anddata

On Wed, Aug 12, 2009 at 4:20 AM, Michael Kay <mike@saxonica.com> wrote:
>
> I definitely don't agree with Roger's idea of using QNames in
> data, either, though-IMHO that dangerously mixes metadata with data.
>

But the notion that metadata and data can be separated is itself deeply
flawed. If I have two lines of business, "product sales" and "services", are
these two things data or metadata? You'll find some systems in which they
are data (rows), others in which they are metadata (columns). Similarly, if
I have three kinds of personnel, "salaried", "hourly-paid", and
"contractors". Or if I have 23 kinds of asset on the books, or 592 kinds of
equipment, I will sometimes want to treat these as types and sometimes as
instances. Mixing metadata and data is something we have to live with.
Functional data models rightly eliminate the distinction.


Michael,

Whilst I agree with your assertion above I still don't think this necessitates namespaced data content. I if have understood your eample you could either have:

<hr:employees xmlns:hr="http://mycompany.com/human-resources/scheme-a">
     <hr:employee type="hourly">fred</hr:employee>
     <hr:employee type="contractor">joe</hr:employee>
     <hr:employee type="salaried">jane</hr:employee>
</hr:employees>

Or

<hr:employees xmlns:hr="http://mycompany.com/human-resources/scheme-b">
     <hr:hourly>fred</hr:hourly>
     <hr:contractor>joe</hr:contractor>
     <hr:salaried>jane</hr:salaried>
</hr:employees>

Clearly mapping between these two simple representations is trivial. I think this is preferable to:

<hr:employees xmlns:hr="http://mycompany.com/human-resources/scheme-c"
                       xmlns:cont="http://mycompany.com/human-resources/contractor"
                       xmlns:hour="http://mycompany.com/human-resources/hourly"
                       xmlns:sal="http://mycompany.com/human-resources/salaried">
     <hr:employee>hour:fred</hr:employee>
     <hr:employee>cont:joe</hr:employee>
     <hr:employee>sal:jane</hr:employee>
</hr:employees>

Which is I think what is being suggested on this thread.

Regards,

Michael Odling-Smee



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS