Re: [xml] reuse (aka "dict")

On Thu, Jul 31, 2008 at 07:23:11PM +0300, Eli Marmor wrote:
I believe that it is very important to support dicts in HTML too. And contrary
to XML, HTML is case-insensitive and the number of options is very low so a
dictionary has a lot of effect.

Is it planned?  Can I do it?  Where to start?

I wrote that first:

  planned, not really ...
  Can you do it: sure, I'm a taker of good patches :-)
  where to start ... hum ... you need to initiate a dictionary, add it 
to the parser context, make sure it's linked to the document when created
in the SAX2 callbacks and change the parser to allow taking advantage of
a context dictionnary if present. You can remove a hell lot of string 
comparison going that way mapping back to pointer compares.

  the hard part is to make sure to not break existing programs using the
libvirt API, 

but then I checked htmlDoRead() it seems that there is already dictionnary
support, for example htmlParseHTMLName do an xmlDictLookup
So to me there is a dictionary being used.
If you checked for ID *values* then sure this can't go up in a dictionary
since only markup strings use the dictionary to not explode usage if 
parsing huge instances.

  Double check the code, check for xmlDict usages in the HTML parser
code, I think it's there just that you mis interpreted some results.


Red Hat Virtualization group
Daniel Veillard      | virtualization library
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]