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?


So making an 'employee' element  a child of an 'employer' element clearly implies some semantics that the employer 'has' the employees. But does it not imply when making an 'employee' and 'employer' element or its type a derivative of a 'person' element or type that the 'employer' is a 'person' and the 'employee' is a person? Or is it just that these XSD implied semantics are not so reliable? Because they might merely be a convenience for structural reasons? I get the impression though that much is made semantically of such XSD implications in some languages such as XBRL.

-----Original Message-----
From: Michael Kay
Sent:  03/05/2010 8:37:10 pm
To: stephengreenubl@gmail.com
Cc: 'xml-dev'
Subject:  RE: [xml-dev] 'is-a' Relationships in XML?

> 
> Can we then say that XSD is the primary way we add semantics 
> to XML? 

Oh dear, semantics. I hate the word. A schema may well hint at the semantics
of the data, but I don't think it really does anything other than constrain
the space of valid documents. It's quite possible and common to write
schemas that impose constraints but tell you nothing about the semantics of
the data - for example that the type (content model) for a table cell is a
restriction of the type (content model) for a paragraph.

The fact that you can derive by restriction or by extension exacerbates
this: if <employee> allows all the child elements of <person> and then some
extra fields, then you can derive employee by extension from person, or you
can derive person by restriction from employee. In the latter case, if you
inferred person is-a employee ("A person is an employee with no salary"),
you would be wrong. It's a syntactic/structural relationship not a semantic
one.

Regards,

Michael Kay
http://www.saxonica.com/
http://twitter.com/michaelhkay 







[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