OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: Embedding Content as Element Content or As An Attribute Value

[ Lists Home | Date Index | Thread Index ]
  • From: "Michael Kay" <M.H.Kay@eng.icl.co.uk>
  • To: "Paul Prescod" <papresco@technologist.com>, <xml-dev@ic.ac.uk>
  • Date: Mon, 12 Jan 1998 11:34:50 -0000


-----Original Message-----
From: Paul Prescod <papresco@technologist.com>
To: xml-dev@ic.ac.uk <xml-dev@ic.ac.uk>
Date: 11 January 1998 15:50
Subject: Re: Embedding Content as Element Content or As An Attribute Value


Paul Prescod wrote, inter alia:
>I'm surprised, though that you would claim that the distinction between
>"hasproperty" and "containsobject" is missing in every ontological
>system you are aware of. 

That distinction is certainly one of the traditional difficulties of all
data modelling, and thanks, yes, it's helpful to see it in those terms.
But I don't think the XML/SGML distinction between attributes and
content is quite the same. If we consider the difference between:

<PIZZA PRICE="$12.00" DESC="Ham and mushroom"/>
versus
<PIZZA PRICE="$12.00">Ham and Mushroom</PIZZA>

then the distinction is not between an attribute and a contained
object, but between "ordinary" attributes and one "special" attribute
which we call the content of the object. The ontological systems
I am aware of do not treat one of the attributes of an object as being
special in this way.

In fact the representation I am using is more like:
<PIZZA>
  <PRICE>$12.00</PRICE>
  <DESC>Ham and mushroom</DESC>
</PIZZA>

In other words, I am treating all the attributes as "contained objects",
and the reason I am doing this is that in my particular domain, 
some of the attributes may carry additional information (sometimes
called "facets") e.g. where did this information come from, how
reliable is it, and when did it last change.

I apologize for my faux-pas in the suggestion that the scope of
application of XML was wider than that of SGML. I had forgotten,
of course, that to SGML insiders SGML is applicable to 
everything - it is only outsiders who draw boundaries
around it :-)

PS: can I ask for some advice? In my DTD for the above, I want 
to say that the element PIZZA has no immediate character 
content other than ignorable white space. I feel sure it must 
be possible to say this, but I haven't found out how.

The alternative seems to be disallow character content entirely,
and generate documents using a layout such as:

<PIZZA
  ><PRICE>$12.00</PRICE
  ><DESC>Ham and mushroom</DESC
></PIZZA>

but I find it hard to believe this is what the designers
intended.

Mike Kay


xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo@ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS