RE: Is this reasonable: classify each element as either an Object or property

<[email protected]>
Newsgroups gmane.text.xml.schema.devel
Message-ID <5D27281509882544A841804E4EBA914C311E3B210E@EXWA-MBX01.nexus.csiro.au>
This is RDF/XML. 


-----Original Message-----
From: Michael Kay [mailto:[email protected]] 
Sent: Friday, 4 November 2011 8:15 AM
To: [email protected]
Subject: Re: Is this reasonable: classify each element as either an Object or property

On 03/11/2011 20:29, Costello, Roger L. wrote:
> Hi Folks,
>
> I am thinking that it is useful to identify each element in a schema as either an Object or a property.
>
> Objects are described by one or more properties.
>
> The value of a property may be either simple or an Object.
>
> Here is an example of an XML document containing two Objects (Book and Person) and three properties (title, author, name):
>
> <Book>
>      <title>The Implementation of Functional Programming Languages</title>
>      <author>
>          <Person>
>              <name>Simon L. Peyton Jones</name>
>          </Person>
>      </author>
> </Book>
>
> Notice that two of the properties (title and name) have a simple value. One property (author) has an Object value.
>
> Is this a reasonable desire?
>
> /Roger
>
>
I think it's a bit 'perfectionist' and can lead to unnecessary and 
inconvenient extra layers of tagging. It can also lead to unproductive 
debates about semantic distinctions that have little practical 
importance. For example, this kind of approach, when taken to extremes, 
can lead to

<Person>
<name>....</name>
<phone>01189482766</phone>
</Person>

being replaced by

<Person>
<name>....</name>
<phone>
<TelephoneServiceEndpoint>
<supplier>
<PhoneCompany>
<name>BT</name>
</PhoneCompany>
</supplier>
<number>
<PhoneNumber>
             01189482766
</PhoneNumber>
</number>
</TelephoneServiceEndpoint>
</phone>
</Person>

Don't laugh: I see exactly this kind of bloat in many standardized XML 
vocabularies such as FpML.

Michael Kay
Saxonica
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.