Lists Home |
Date Index |
- From: Steve DeRose <Steven_DeRose@Brown.edu>
- To: firstname.lastname@example.org
- Date: Tue, 10 Nov 1998 11:23:05 -0400
At 3:31 PM -0400 11/9/98, Anders W. Tell wrote:
>As a part of a small R&D project Im I trying to look into the issues
>of elements vs. attributes and having attributes in endtags
>(im know its outside current xml standard).
>But Im having trouble finding any work being presented around
>pros and cons with endtag attributes.
>Is there anyone that could point me to research /papers/discussion on
>the net ?
>This would help me enormously.
>Im especially interested in arguments for having endtag arguments.
There is a detailed discussion of the semantics and design of attributes
vs. elements in my book "The SGML FAQ Book", that you may find helpful
(along with discussions of nearly every other controversial question about
SGML and XML).
Common practice is that attributes represent information relevant to an
element as a whole -- not to a tag. And in XML, tags aren't commonly
considered first-class objects: they're a syntactic way of labelling the
actual objects, namely elements; so giving them their own properties seems
to me a bit out of keeping with the model. Given that, it would not fit to
have different attributes on the end-tag than on the start-tag. On the
other hand, having the same attributes on both ends would be redundant.
One argument I have heard for them was that if you had them you might be
able to parse backwards. But I have never found a good occasion to do that,
and if in fact you can parse XML backwards otherwise, it hardly matters
whether the parser finds the attributes first or last anyway. If you allow
them, you have additional semantics to define (the syntax is obviously
trivial), like what it means if you have the same name (with the same or
different values) on both ends of an element, etc. etc.
I don't know of an analogous precedent in other languages either (though
perhaps there's one out there somewhere). Thus, I think you'll find little
discussion in the literature.
I've seen them show up in HTML as typos. Perhaps you could describe
specifically what it is you think they would be useful for.....
Visiting Chief Scientist, Scholarly Technology Group, and
Adjunct Associate Professor, Brown University;
Chief Scientist, Inso Corporation
xml-dev: A list for W3C XML Developers. To post, mailto:email@example.com
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:firstname.lastname@example.org the following message;
To subscribe to the digests, mailto:email@example.com the following message;
List coordinator, Henry Rzepa (mailto:firstname.lastname@example.org)