[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

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

  • From: digitome@i... (Sean Mc Grath)
  • To: xml-dev@i...
  • Date: Sun, 11 Jan 1998 20:24:01 +0000

Re: Embedding Content as Element Content or As An Attribute Value
>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@d...
Digitome Electronic Publishing
http://www.digitome.com


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


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.