[xml] ignorable whitespace in HTML

Date view Thread view Subject view Author view

From: Wayne Davison (wayned@blorf.net)
Date: Tue Aug 29 2000 - 05:10:56 EDT


The recent ignoreable-whitespace changes have been very helpful in getting
rid of most of the superfluous <P> tags. However, there was still a
problem with newlines occurring outside the HEAD and BODY sections (but
inside the HTML section). For instance:

<HTML>
<HEAD>
<TITLE>test</TITLE>
</HEAD>
<BODY>
Test!

This would insert <BODY><P> after the <HTML> tag and </P> prior to the
<HEAD> tag.

It appears that a simple addition to areBlanks() fixes this:

    if (!xmlStrcmp(ctxt->name, BAD_CAST"html"))
        return(1);

A patch to add this and to fix all the affected *.sax files is attached.

..wayne..


----
Message from the list xml@xmlsoft.org
Archived at : http://xmlsoft.org/messages/
to unsubscribe: echo "unsubscribe xml" | mail  majordomo@xmlsoft.org


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Tue Aug 29 2000 - 02:44:16 EDT