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

SD1 - Short End Tags

From: Jean Paoli <jeanpa@microsoft.com>
Date: Thu, 15 May 1997 21:14:14 -0700
Message-ID: <78DFE33066ABD0118B9200805FD431BA5EC149@RED-16-MSG.dns.microsoft.com>
To: "'w3c-sgml-wg@w3.org'" <w3c-sgml-wg@w3.org>
SD1 - Short End Tags
-----------------------------------


Structured data introduces a lot of tags, which can overwhelm the actual
data 
content. Repetition of an element's name within an end tag can increase 
readability of a document when the tags are physically distant. However,
when 
used for representing database records, on the leaf nodes, the
repetition adds 
only clutter.

Proposal: For readability and convenience when dealing with database
records, 
the element name within an end tag is optional. That is, </NAME> is same
as </>.


Current syntax:

<ORDERS>
	<ITEM>
		<AUTHOR>Dantzig</AUTHOR>
		<PRICE>5.95</PRICE>
	</ITEM>
	<ITEM>
		<AUTHOR>Wardlaw, Lee</AUTHOR>
		<PRICE>6.58</PRICE>
	</ITEM>
	<ITEM>
		<AUTHOR>Bonner</AUTHOR>
		<PRICE>5.95</PRICE>
	</ITEM>
	<ITEM>
		<AUTHOR>Milne, A. A.</AUTHOR>
		<PRICE>12.50</PRICE>
	</ITEM>
</ORDERS>


Proposed syntax :
(Note 1: we do not propose to banish the old syntax, we just introduce
another one)
(Note 2: we now that one of the goals of XML was to have one and only
one solution
for each problem, but we have faced so much demand in the database world
for this short 
end syntax that we have reported it here)

 
<ORDERS>
	<ITEM>
		<AUTHOR>Dantzig</>
		<PRICE>5.95</>
	</ITEM>
	<ITEM>
		<AUTHOR>Wardlaw, Lee</>
		<PRICE>6.58</>
	</ITEM>
	<ITEM>
		<AUTHOR>Bonner</>
		<PRICE>5.95</>
	</ITEM>
	<ITEM>
		<AUTHOR>Milne, A. A.</>
		<PRICE>12.50</>
	</ITEM>
</ORDERS>

-----------------------------
Received on Friday, 16 May 1997 00:14:51 EDT

This archive was generated by hypermail pre-2.1.9 : Wednesday, 24 September 2003 10:04:32 EDT