From: Jonas Borgströ (jonas@codefactory.se)
Date: Wed Feb 21 2001 - 18:25:17 EST
On 21 Feb 2001 10:50:42 -0800, Wayne Davison wrote:
>
> 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.
>
Would it? modern htmlbrowsers should support nested levels of block
boxex (paragraphs)
and tables. But perhaps it breaks the html4 specifikation. I don't know.
But atleast The linux version of Opera 5.0 renders the above example on
one line. But I can't
get gtkhtml2 to do it because gnome-xml removes (creates two paragraphs)
some important
information before it reaches the saxparser of gtkhtml2
One way to use inline tables like this is to use the <.div> tag instead
of <p> to make the
paragraphs. gnome-xml doesn't close these paragraphs when reaching a
table.
But this doesn't help gtkhtml2 to support allready existing html-pages.
> 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.
>
The problem is that gnome-xml might become quite bloated if it has to be
able to parse
css1 and css2 (and future versions). This is probably not what most
people want.
One way of solving it might be to have some option to toggle this
paragraph-closing
"feature" on and off.
> 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).
>
gtkhtml2 has a great cssparser. And it is LGPL.
/ Jonas
-- Jonas Borgström jonas@codefactory.se CodeFactory AB http://www.codefactory.se/ Office: +46 (0)90 71 86 10 Cell: +46 (0)70 248 89 58 ---- Message from the list xml@rpmfind.net Archived at : http://xmlsoft.org/messages/ to unsubscribe: echo "unsubscribe xml" | mail majordomo@rpmfind.net
This archive was generated by hypermail 2b29 : Wed Feb 21 2001 - 20:43:46 EST