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] 'is-a' Relationships in XML?

My 2 cents.  I agree with Rick's view.  I would also add that XML
doesn't work directly with semantics because the intent of model is to
represent components of an Infoset (elements, attributes, etc.) and how
those components fit within a tree.  With care, it comes close to
semantics but the model doesn't define relationships (except between
Infoset components).  The consuming and producing code always have to
have an agreement on how those concepts translate into relationships and
concepts.

What does the following markup really mean?

<employer>
  <name>ABC Corp.</name>
  <employee><name>Matt</name></employee>
</employer>

As a human, I can infer what the construct might mean but the
understanding of the relationships between <employer> and <employee>
must be built into the application code.

This gets a step closer (and more verbose):

<employer>
  <name>ABC Corp.</name>
  <employs>
    <employee><name>Matt</name></employee>
  </employs>
</employer>

But it still requires a level of agreement that is not built into the
XML model as <employs> is still just an element.  There is no direct
notion that it really represents a relationship and it doesn't express
(nor is it intended to) that "employs" might be the inverse of "employed
by".

RDF still requires a certain degree of agreement on what "employs"
really means from a business/language perspective (or what should be
done with it) but the model itself is formalized into classes (things)
and properties (relationships) as opposed to elements and attributes.

The XML model says there are elements with child elements.  The RDF
model says there are "things" that have properties (and relationships
with other things).  These things/properties can be serialized in XML
using elements/attributes.  But it's all about the model and a question
on whether it is important to formally expose (through the model) the
concepts of things/properties.  In my mind, none of this detracts from
the usefulness/importance of XML in any way.  At a bare minimum, it is a
building block.




> -----Original Message-----
> From: rjelliffe@allette.com.au [mailto:rjelliffe@allette.com.au]
> Sent: Tuesday, May 04, 2010 12:34 AM
> To: xml-dev
> Subject: Re: [xml-dev] 'is-a' Relationships in XML?
> 
> >  Is there any way to express the
> > other key relationship of 'is-a' in XML? Is this something a schema
> > language can express?
> 
> Use RDF.
> 
> > Can we say that element (or even type) A 'is-an'
> > element (or type) B? Any plans to add this 'feature' to the XML
> > technologies if it isn't one already? It might be a key gap to fill.
> I
> > might want to somehow imply that my <invoice/> is a <document/>. Are
> > substitution groups (with, apparently, some inadequacies) the only
> way to
> > express such a relationship in XML?
> 
> Schemas do not deal with semantics but values and occurrence
> relationships. They are superficial.
> 
> Some people try to make schemas do more: for example the XBRL people
> try
> to do semantic modeling of a kind using XML Schemas constructs. I
don't
> know that it is very prudent.
> 
> What substitution groups and so in in XML Schemas give us is not "X is
> a
> Y" but "X has the same has-a's as Y". In other words, the superficial
> properties of Y also are what we expect to see in X. Semantics is a
> slippery word, so sometimes this superficial similarity between X and
Y
> may be enough; however, the fact that each element X and Y in the same
> substitution group has a different name suggests that X and Y are not
> semantically equivalent: if they were they would have the same name
> (localization and legacy excepted.)
> 
> Cheers
> Rick Jelliffe
> 
> P.S. I don't buy that XML and XML Schemas even expresses "has-a" on
any
> semantic level btw.
> 
> 
>
_______________________________________________________________________
> 
> XML-DEV is a publicly archived, unmoderated list hosted by OASIS
> to support XML implementation and development. To minimize
> spam in the archives, you must subscribe before posting.
> 
> [Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/
> Or unsubscribe: xml-dev-unsubscribe@lists.xml.org
> subscribe: xml-dev-subscribe@lists.xml.org
> List archive: http://lists.xml.org/archives/xml-dev/
> List Guidelines: http://www.oasis-open.org/maillists/guidelines.php



[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