Manos,
I probably confused the matter by my choice of element type
names in the example. Let me use <father> and <son>
along with <P> and <Q> as examples in imaginary instances
of <foo>
<foo><father><son></son></father></foo>
<foo><son><father></father></son></foo>
<foo><P><Q></Q></P></foo>
<foo><Q><P></P></Q></foo>
My point was simply that XML licenses none of the
following inferences as true of these examples:
father HAS-A son
son HAS-A father
P HAS-A Q
Q HAS-A P
Humanly speaking, you could arrange a private agreement by
which hierarchical containment "means" HAS-A, but XML does of
itself warrant any such intepretation for the structural
relatiohship between container and contained.
The only reason this is important (?) is that
people tend to attribute meanings to XML conventions
that are not countenanced by the XML specification.
This can lead to hard-wired application-level
processing semantics (as in the widespread case of "use
attributes instead of elements if you want to
ensure that the text of the 'content' is hidden
from view..."). The notion of common conventions
and best practices notwithstanding, allowing
unauthorized semantics to attach to XML is
dangerous business.
Len's clearer statement about XML's fundamental
indifference to HAS-A and IS-A is adequate; his
clarification that agreement is outside the scope
of XML (and must be made explicit by humans) is
likewise to the point.
Best wishes,
Robin
--------------------------------------------------------
On Tue, 30 Apr 2002, Manos Batsis wrote:
> I guess I have to agree with Len about HAS-A but not because of the
> containment; because of the formal XML interpretation. The [children]
> Information Item says so [1].
>
> However, an element also has [parent], [namespace name] etc information
> items. Attributes have a relative set of infoitems. Isn't that a
> generalized, self-contained IS-A description of a node's self?
>
> Cheers,
>
> Manos
>
>
> [1] http://www.w3.org/TR/xml-infoset/#infoitem.element
>
>
> > -----Original Message-----
> > From: Bullard, Claude L (Len) [mailto:]
> > Sent: Monday, April 29, 2002 6:31 PM
> > To: 'Robin Cover'
> > Cc: Manos Batsis;
> > Subject: RE: [xml-dev] XML information modeling best practices
> >
> >
> > We would have to agree that containment equals 'has-a'.
> > What the XML containment semantic implies is up to the application
> > designer. That is so. One might argue that a zero occurrence
> > indicator says "might have-a".
> >
> > But HAS-A can be agreed upon with no extra information being
> > added to the XML to indicate the agreement. IS-A can't. Or....
> >
> > The point is that RDF semantics are RDF semantics. I don't see
> > a way out of the application IS-A application tautology. One
> > shouldn't compare XML semantics to RDF semantics. One should
> > understand what RDF semantics model and decide if that is
> > necessary for the application at hand or if a generalized
> > RDF processor (whatever it does) is doing something useful
> > for the system at hand.
> >
> > len
> >
> > From: Robin Cover [mailto:]
> >
> > I'm not sure I agree with Len, if the claim is (?) that
> > XML explicitly models HAS-A.
> >
> > For <foo><bar></bar></foo> we can say of the encoded
> > instance that "the element foo hierarchically contains the element
> > bar," but we have no authorization to believe that the
> > explicit structural relationship implies HAS-A. Maybe
> > bar HAS-A foo, maybe foo HAS-A bar, or maybe neither is
> > true if we understand HAS-A as representing the notion of
> > a property/attribute.
> >
> > For <parent><child></child></parent> one could mean at the
> > application level that a parent has a child, or that a
> > child has a parent, or neither, or any of a thousand other
> > possible relationships that might be imagined; this structural
> > form "A hierarchically nested in B" licenses no interpretation
> > in terms of HAS-A, IS-A, IS-PART-OF, or anything else. Structurally
> > XML implies notions of is-adjacent-to, precedes, follows,
> > is-hierarchically-within [etc.] but a far as I know, these
> > structural relationships predicated of the serial encoding
> > have no authorized semantics in any domain.
> >
> > Or... ?
> > >
> > > To subscribe or unsubscribe from this list use the subscription
> > > manager: <http://lists.xml.org/ob/adm.pl>
> > >
> > >
> >
>