I can't believe that I'm the only one to have stumbled on this problem. So the problems associated with serving SGML over the Web haven't received the attention that's required. The XML effort focused, though, on simplifying SGML syntax in order to promote tool creation. The problem that you're raising has been outside the scope of the XML effort. There are several issues involved in addressing it though.
Any general solution has to start from there.
Context is essential for proper rendering, for example of numbered list items, sections or chapters.