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: digitome@iol.ie (Sean Mc Grath)
  • To: xml-dev@ic.ac.uk
  • Date: Sun, 11 Jan 1998 20:24:01 +0000

>Michael Kay wrote:
>> the XML community. Philosophically - at least in terms of any 
>> ontological system I am aware of it is a nonsense....

[Paul Prescod]
>
>You've missed the point that attributes have an important feature w.r.t
>extensibility. An unknown attribute just disappears in processing, since
>they are named by role. In every XML/SGML processing system I am aware
>of (including XML DTDs, DSSSL, XSL and probably SAX), it is harder to
>handle unknown elements because their GI could represent either their
>role or their object type.

Attributes have a couple of other "attributes" that feature in the list of
pragmatics.

1) An attribute is associated with an element type and typically communicated
as such by parsers. Thus you do not need to establish a context in processing
software. One less piece of state-space.

Say element types foo and bar have an attribute "n" and we wish to print out
its value for foo elements only.

We have this (in pseudo-something)
:
        element foo {
                print attributes["n"]
        }

Rather than this:

        element n {
                if parent == "foo"
                        print GetDataDescdendants()
        }


2) Attributes can be added without changing the instance. This is a sort of "out
of line linking" that allows new layers of meaning to be added to elements
perhaps
years after the content has been created. Although this approach has its limits,
it can be hugely useful as Eliot Kimber et. al. have demonstrated on this list
many times.

It will be possible, I imagine, to do this sort of on-the-fly layering with
sub-elements
rather than attributes in, say, XMLData. But the attribute approach just
feels right
somehow:-)

Final comment:
I think  the most exasperating thing for classically trained data modellers
approaching
SGML/XML is that a lot of the established terminology of the field pops up
meaning
completly different things. vis. Entity/Attribute modelling. Argh!



Sean Mc Grath

sean@digitome.com
Digitome Electronic Publishing
http://www.digitome.com


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