[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: [xml] Modifications (was: Building libxml2 on solaris)
- From: Daniel Veillard <veillard redhat com>
- To: Rachael Churchill <rachael churchill linguamatics com>
- Cc: xml gnome org, Jason Trenouth <jason trenouth linguamatics com>
- Subject: Re: [xml] Modifications (was: Building libxml2 on solaris)
- Date: Thu, 10 Jul 2008 05:18:06 -0400
On Thu, Jul 10, 2008 at 10:07:07AM +0100, Rachael Churchill wrote:
> Daniel Veillard wrote:
> > What kind of modifications ? I'm wondering ...
> >
> >Daniel
> >
> I made a slight change to xmlParseTryOrFinish (and similarly
> htmlParseTryOrFinish) to change the conditions under which it merges
> consecutive calls to the character callback.
>
> It seemed to be merging them even when I thought it shouldn't, e.g. if
> the user data or the function pointers to the handlers had changed
> between calls. So if I tried to parse the text "foo" with user data X,
> and then the text "bar" with user data Y, it seemed to queue them up and
> parse the whole lot ("foobar") at the end, when the user data was Y.
> This was bad because I wanted the user data to be X when "foo" was being
> parsed.
>
> (It could be that I've misunderstood something, or am calling the
> function wrongly in some way; feel free to correct me if so.)
Well yes in libxml2 you can't make any assumption of when or how many
times the character() SAX callback is called for a given text node. What
you're trying to do is beyond what I can garantee (and may break for
example if there is an entity reference in the text node).
Daniel
--
Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard | virtualization library http://libvirt.org/
veillard redhat com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]