OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: Endtag attributes

[ Lists Home | Date Index | Thread Index ]
  • From: Steve DeRose <Steven_DeRose@Brown.edu>
  • To: xml-dev@ic.ac.uk
  • 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.....

Steven_DeRose@Brown.edu; http://www.stg.brown.edu/~sjd
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: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