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

Re: SD2 - Structured Attributes

From: Rick Jelliffe <ricko@allette.com.au>
Date: Fri, 16 May 1997 18:53:52 +1000
Message-Id: <199705160856.SAA11908@jawa.chilli.net.au>
To: "Andrew Layman" <andrewl@microsoft.com>, "'James Clark'" <jjc@jclark.com>, "'w3c-sgml-wg@w3.org'" <w3c-sgml-wg@w3.org>
> From: Andrew Layman <andrewl@microsoft.com>

> James asks: What is the need that structured attributes are intended to
> solve?
...
> 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 " ". 

Your two alternate policies (ignore unkown elements, or include them) come
from the browser world, and neither are common in the SGML world. And I don't
think they are appropriate to XML either, in that the data being transmitted using
XML may well be not be literature but databases.  In SGML, the mixing of 
printing and non-printing elements is very common, and the selection of 
elements to print in some circumstances, with various prefixes, or in various
orders, is equally common. 

Under your proposal, something is an element if it prints, and something is
an attribute if it does not.  This is not a workable demarcation for multiple-
target documents. 

If you specifically want to demarcate metadata, wouldn't 
<author><first>William</first>
<last>Shakespeare</last><DSIG class="metadata">12345</DSIG></author>
give you what you need, without the cost of an extra tag.

Or, better, in my opinion, is to flag it with a processing instruction
near the top of the document, e.g.: 
<?MS-structured-data meta="DSIG" ?>
or even
<?MS-structured-data  meta="DSIG"  context="author" target="MS-IE-6.*+" ?>

Using processing instructions for this would let you define a whole series
of useful behaviours without tying the data to a single application type,
and without arbitrarily assigning a "printable" semantic to elements. 
 
Rick Jelliffe

 
Received on Friday, 16 May 1997 04:56:00 UTC

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