Re: [xml] BUG: <table> tag ends paragraph

Date view Thread view Subject view Author view

From: Wayne Davison (wayned@users.sourceforge.net)
Date: Wed Feb 21 2001 - 13:50:42 EST


On 21 Feb 2001, Jonas Borgström wrote:
> after a quick look at the code in HTMLparser.c it looks like the line:
>
> "table", "p", "head", "h1", "h2", "h3", "h4", "h5", "h6", "pre",
>
> should be removed from the char *htmlStartClose[] initialisation.
>
> What do you think about this?

No, that would break all other table tags that didn't have an inline
display style.

The problem you've noticed is just the tip of a larger issue: libxml
doesn't parse styles at all. In order to allow styles (from sheets or
inline elements) to affect the paragraph-ness of the standard elements
(and also to support user-defined paragraph elements), it becomes
necessary for libxml to parse all aspects of style (including loading
and parsing all linked style sheets). Once this is done, libxml could
eliminate some of the elements in htmlStartClose[] array, and instead
query the paragraph-display-attribute of the tags and act accordingly.

I personally would like to see full style support in libxml. I would
like the parser to keep track of the current state of all of the
styles, and to allow me to query specific style settings PLUS ask what
has changed since the last time I asked for changes. We could even
have the standard HTML tags, such as I, B, and FONT, affect the
current style settings. This would allow client code to ignore how
italics got turned on, and just ask libxml, "What's new? Italics is
now on? Great, I'll flip the switch in my rendering."

The crux of the matter is whether this is an appropriate thing for
libxml to be doing. While I would probably lean towards having the
user's code handle this, the problem is that libxml can't do the job
of paragraph-closing properly without understanding styles, and once
it has parsed all the available style information, why should the
user's code have to duplicate all that work?

So Jonas, since you mention that the gtkhtml2 browser wants to act on
the inline display style, does this mean that it already has code to
parse styles? If so, perhaps Daniel would be willing to allow some
style sheet code to be integrated into libxml (if it were compatible
with the LGPL and of an appropriate design for libxml, of course).

Thoughts?

..wayne..

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


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Wed Feb 21 2001 - 14:43:50 EST