wwwlib SGML.c and entity names in attribute values?

I may be missing something obvious, but I suddenly noticed that the
wwwlib SGML.c model does not support at all entities in attribute

The current model in SGML is to generate start_element, end_element,
entity and content calls to upstream. This model does not fit at all,
if the entiry appears inside an attribute value, which should already
have been parsed by the time start_element occurs?

I think the entity upstream call is a misdesign and should be removed.
The SMGL.c (or equivalent) needs to "unpack" entities itself. For ISO
8859-1 characters this doesn't appear to be a problem, but I am
wondering how the problem is solved for entities that don't map into
ISO 8859-1 character sequences?

Any ideas? (Has this been discussed to the death somewhere already?)

Markku Savela (msa@hemuli.tte.vtt.fi),     Technical Research Centre of Finland
Multimedia Systems, P.O.Box 1203,FIN-02044 VTT,http://www.vtt.fi/tte/staff/msa/