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

Re: Endtag attributes

  • From: Steve DeRose <Steven_DeRose@B...>
  • To: xml-dev@i...
  • Date: Tue, 10 Nov 1998 11:23:05 -0400

endtag attributes
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@B...; 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@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.