SoC Update: Week 10: GXml
- From: Richard Schwarting <aquarichy gmail com>
- To: gnome-soc-list gnome org
- Subject: SoC Update: Week 10: GXml
- Date: Mon, 1 Aug 2011 20:16:21 -0400
Hello list! Thank you to those who read these e-mails. I hope they are of some interest!
This past week has been spent doing
- Desktop Summit preparations! This actually consumed most of
my Friday, even, and while it's not strictly part of GSoC, I am hoping
attending the Desktop Summit will benefit GXml. :)
- Polishing code, including the Document class and
DocumentFragment. DocumentFragment through libxml2 didn't behave
exactly as I had hoped, so I had to add more local logic in GXml. I've
tried to keep the amount of local logic to a minimum, but that has
sometimes involved rewriting chunks of code or redesigning a few things,
which can take more time than just writing the DOM Level 1Core's
functionality myself.
- NodeList support. NodeList is iterable and supports methods
from GLib.List, but does not subclass GLib.List, since depending on the
usage, it is sometimes backed by libxml2's nodes' linked list. One of
my favourite features that I worked on this past week which took a
little bit of planning and prototyping was having a live NodeList for
get_elements_by_tag_name (). By "live", we mean that if you obtain a
NodeList of descendant elements from element A with tag name B, if you
later add a new descendant to A with the tag name B, it should be
present in the earlier-obtained NodeList. This now involves each
element maintaining a list of such NodeLists that have been requested at
that element, and addition and removal of nodes to an element now
notify its ancestors which check whether they're watching a NodeList for
the new/old element's tag name. If so, they update the NodeList.
Despite being happy to have implemented it, as its an API I used in
other DOM implementations, I'm considering disabling this functionality
by default, because I can imagine it being expensive when you're not
actually using get_elements_by_tag_name () but have many insertions or
deletions to do via the DOM, and letting users enable it at the Document
level. Or enabled by default with an option to disable. We'll see.
- Namespace support investigation. Support for namespaces
exists in DOM Level 2 Core, but I believe it would require too much work
beyond the scope of this GSoC right now to implement all the
namespace-related changes from DOM Level 2 Core. I looked at libgdata
to try to understand just where and for what it required namespace
support, so perhaps I can implement a subset now at the Document level,
and worry about it at the Element and Attr level later. That's going to
be a focus of this week, as well as polishing the libgdata patch so I
can give it to Philip Withnall for comments.
I'll be making my way from Guelph, Ontario to Berlin, Germany over part
of Wednesday and Thursday this week, so my next update might be longer
or shorter depending on how well I can work on planes and trains!
Cheerio!
Richard Schwarting
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]