[XML-SIG] SAX: distinguising empty and non-empty elements?

Lars Marius Garshol larsga@garshol.priv.no
21 Aug 2002 14:49:19 +0200


* Bud P. Bruegger
|
| Is there a possibility to distinguish between non-empty elements w/o
| content and empty elements in (Python) Sax? 

No. The distinction is considered to be a purely lexical distinction
with no more importance than the difference between &#7E; and &#7e;.
 
| <quote> The single-tag empty element you defined (<item/>) is
| treated exactly the same as a two-tag empty element
| (<item></item>). It is, for all intents and purposes,
| identical. (It's just easier to type and consumes less space.)
| </quote>
| 
| Does this apply only to the example app that echoes an xml file
| using a sax parser or is it general?  

It is general. Notice that neither the infoset nor the DOM maintains
this distinction.

| Any differences between Java and Python?

No.

-- 
Lars Marius Garshol, Ontopian         <URL: http://www.ontopia.net >
ISO SC34/WG3, OASIS GeoLang TC        <URL: http://www.garshol.priv.no >