W3C home > Mailing lists > Public > w3c-sgml-wg@w3.org > May 1997

RE: SD2 - Structured Attributes

From: Andrew Layman <andrewl@microsoft.com>
Date: Thu, 15 May 1997 23:45:39 -0700
Message-ID: <7BB61B44F197D011892800805FD4F7927DD980@RED-03-MSG.dns.microsoft.com>
To: "'James Clark'" <jjc@jclark.com>, "'w3c-sgml-wg@w3.org'" <w3c-sgml-wg@w3.org>
James asks: What is the need that structured attributes are intended to
solve?

Many of the examples in my proposal paper use structured attributes, so
they serve as one type of example.  For instance, when we look at data
typing, we see that some attributes, such as type, have various
sub-attributes. Decimal has the number of digits, the scale, etc. All
optional of course, but all useful.  We have two choices: We either make
a group of attributes that the reader/processor is supposed to know are
related, but are peers as far as the parse tree is concerned, or we make
the attribute itself have structure. The latter contains more
information and is more amenable to automatic tools.

Regarding the question of whether any problem the could be solved via
attributes could also be expressed as subelements: I believed that once.
But the following sort of example convinced me otherwise:

Suppose I have a program the processes author tags such as:

<author>William Shakespeare</author>

Now somebody updates the document to a newer version, say like:

<author><first>William</first>
<last>Shakespeare</last><DSIG>12345</DSIG><author>

What is the value of author?

If the policy is to ignore all unknown tags, the author is "William
Shakespeare12345". If the policy is to ignore all unknown elements, the
author is " ". 

> -----Original Message-----
> From:	James Clark [SMTP:jjc@jclark.com]
> Sent:	Thursday, May 15, 1997 10:32 PM
> To:	'w3c-sgml-wg@w3.org'
> Subject:	Re: SD2 - Structured Attributes
> 
> I have difficulty in accepting structured attributes as a requirement.
> To
> me they seem more like one possible *solution* than a requirement.
> Any
> information that could be expressed as as an attribute could be
> expressed as
> a sub-element.  There may be problems when certain kinds of
> information is
> expressed as sub-elements.  The requirements should be stated in terms
> of
> these problems, then we can examine with an open mind whether
> introducing
> structured attributes is the best way to solve them.
> 
> > The
> >distinction 
> >between contents and attributes is important when tools (particularly
> >down-level 
> >versions of products) need to process data without fully
> understanding
> >its 
> >meaning: unknown attributes are completely ignored, while the
> contents
> >of 
> >unknown elements are retained.
> 
> This is the sort of way I would like to see the requirement expressed:
> how
> can XML be enhanced so that tools can do various kinds of processing
> without
> fully understanding the meaning of elements? Structured attributes
> would be
> one way.  Another way might be a xml- attribute that allows elements
> to be
> categorized in various ways.  Or maybe element types whose names start
> with
> some special character could be reserved for certain kinds of
> semantic.
> 
> Structured attributes may be the right solution, but until we know
> what the
> underlying problems that we are trying to solve are, I don't think we
> can
> make a judgement.
> 
> James
Received on Friday, 16 May 1997 02:45:45 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:25:26 UTC