Re: [xml-dev] RE: When you create a markup language, what do yourparent elements mean? What do your children elements mean?

From: Michael Kay <mike@saxonica.com>

To: xml-dev@lists.xml.org

Date: Thu, 29 Sep 2011 09:31:30 +0100

I think most examples of parent-child relationships fall into one of
three categories:
(a) representing the properties of an object
<book>
<price>3.25</price>
</book>
(b) representing a one-to-many relationship (often a "containment" or
"aggregation" relationship, though in my experience data modellers do
not use those terms consistently)
<county name="Berkshire">
<town name="Windsor"/>
<town name="Reading"/>
</county>
(c) representing a many-to-many relationship with the help of link elements:
<xs:attribute-group name="G">
<xs:attribute ref="A"/>
<xs:attribute ref="B"/>
</xs:attribute-group>
(represents a many-to-many relationship between attribute groups and
attributes).
In each case there are other choices available to the schema designer,
and different designers will quite legitimately make different choices;
there are no "normalization rules" governing XML schema design as there
are in relational databases. A good schema design will however exhibit
some internal consistency.
Document modelling is of course rather different from data modelling.
With document-oriented models, the parent-child relationship usually
reflects a textual containment hierarchy that corresponds to the
abstracted structure of a rendition of the document.
Michael Kay
Saxonica
On 26/09/2011 23:49, Costello, Roger L. wrote:
> Hi Folks,
>
> These two markup languages have a consistent definition of what parent elements and child elements mean:
>
> 1. RDF
> 2. GML
>
> Both languages specify that parent elements represent a resource or object and child elements represent properties or attributes.
>
> Are those the only markup languages that have a consistent definition of what parent elements and child elements mean?
>
> If one is creating a markup language and wants to adopt a consistent definition for parent elements and child elements, is resource/object and property/attribute the only way to accomplish it?
>
> Is an Object-Oriented approach to markup the only viable approach when one wants to have a consistent definition for parent elements and child elements? That would be quite astonishing, given that people such as Tim Bray argue that "XML is 180 degrees apart from OO".
>
> /Roger
>
>
> _______________________________________________________________________
>
> 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
>
>