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

Martin v. Loewis martin@v.loewis.de
02 Sep 2002 22:37:20 +0200


"Juergen Hermann" <jh@web.de> writes:

> >Of course, if you process the DTD, you can tell the difference, right?
> >So an application that wants to make the distinction can, no?
> 
> You can detect whether an element has an EMPTY content model, which 
> makes it a little easier to _generate_ the short form.
> 
> That still makes <t/> and <t></t> equivalent and undetectable on the 
> standard processing levels.

Ah, I didn't understand that this was about that distinction: I
thought that the OP had <t></t> and needed to know whether this was
EMPTY, or just had no content (which can be answered by looking at the
DTD).

I agree that the distinction between <t/> and <t></t> is purely
lexical, and not part of the "true" content.

Regards,
Martin