Re: Google Summer of Code 2009

From: kartik rustagi <>
Date: Tue Mar 10 2009 - 13:25:48 CET

Hi Martin, can I have a link to the discussion you had last year with
Robert Staudinger regarding writing a DOM wrapper, it will be of help
to me. I couldn't find the idea in your last year's idea list.

ps: Robert was a backup mentor right?


On Tue, Mar 10, 2009 at 3:06 AM, kartik rustagi <> wrote:
> Thanks Martin, I will spend few days with Abi's source code as
> suggested by you to get a clearer picture.
> On Sun, Mar 8, 2009 at 6:01 PM, Martin Sevior <> wrote:
>> Hi Karik,
>>           Thanks very much! It think it might rather straight-forward
>> to write some wrapper code to translate various methods we have for
>> manipulating our piecetable and make  everything look like a DOM tree.
>> We already implement all the features of abiword as named attributes
>> and properties. In some cases the names actually match XHTML
>> To get started look at src/text/fmt/xp/fv_View.h
>> FV_View is the main clas we use to manipulate our underlying document object.
>> In particular see the methods
>>        bool    FV_View::setSectionFormat(const gchar * properties[]);
>>        bool    FV_View::getSectionFormat(const gchar *** properties);
>>        bool    FV_View::setBlockFormat(const gchar * properties[]);
>>        bool    FV_View::getBlockFormat(const gchar *** properties,bool
>> bExpandStyles=true);
>>        bool    FV_View::getCharFormat(const gchar *** properties,bool
>> bExpandStyles=true);
>>        bool    FV_View::getCharFormat(const gchar *** properties,bool
>> bExpandStyles, PT_DocPosition posStart);
>> Which set and return the properties of sections, paragraphs and text runs.
>> I guess the challenge will be to write a C++ object  that behaves like
>> a DOM object. and maps onto our document manipulation methods.
>> To that end I guess we'd need to define the methods and data this DOM
>> object needs to implement.
>> Once we have the C++ object we can wrappers for python, C and other languages.
>> Cheers
>> Martin
>> On Sun, Mar 8, 2009 at 9:30 AM, kartik rustagi <> wrote:
>>> Thanks Martin for replying to me.
>>>  Actually I have done quite a lot of scripting in python involving DOM
>>> and XML. Basically what Document Object Model or DOM does is to return
>>> an object pointing at the head of an XML (or HTML) file and thus
>>> enables us to access the XML (or HTML) document in a hierarchical way.
>>> For eg if I have a XML file:
>>> <xml>
>>>          <info>
>>>                      <name>Kartik Rustagi</name>
>>>                      <age>21</age>
>>>          </info>
>>> </xml>
>>> Now if I will pass this XML file to a DOM parser, It will return me a
>>> DOM object. For example in python (javascript has very similar syntax)
>>> if DOM object 'obj' represent this XML document then
>>> ->obj.getElementsByTagName("info")
>>> will return a list of all xml tags named info in the order of their
>>> appearance in the document and using this we can change, modify the
>>> child tags of "info" tag like name and age here.
>>> Now as you might be knowing that Java script is an object oriented
>>> scripting language. It needs a JS engine to run like Mozilla Firefox
>>> has SpiderMonkey. js is embeded in HTML document to get the dynamic
>>> part of DHTML. Now the whole HTML page is divided into DOM objects
>>> (document object being at the top most level) by the browser and using
>>> js we can manipulate these DOM objects and hence the HTML webpage.
>>> Scripts written in JS can be embedded in HTML page to make it dynamic
>>> and to extract different functionalities from the HTML page, precisely
>>> what we need for this task.
>>> Regarding the prerequisite (change to source code and pic in debug
>>> mode) for applying to AbiSource for Gsoc, I am already done with it.
>>> Sorry for being this verbose. :)
>>> On Sat, Mar 7, 2009 at 7:31 AM, Martin Sevior <> wrote:
>>>> HI Kartik,
>>>>           It's very cool that you are getting a start on this years
>>>> GSoC program and are still interested in AbiWord.
>>>> Last year Robert Staudinger proposed writing a DOM wrapper around our
>>>> PieceTable and FV_View operations. Instead we encouraged him to
>>>> develop a Cairo-based graphics class, which we've now incorporated
>>>> into our mainline builds.
>>>> Upon reflection it appears that a DOM wrapper could be the easiest way
>>>> for a broad adoption of our abiwidget by 3rd party developers.
>>>> There is considerable interest in building web-based applications
>>>> based on Java-scripting browsers. It would be really useful if we
>>>> could somehow allow that type of scripting to be re-used in AbiWord. I
>>>> actually have not investigated at all how this works so it would be a
>>>> useful thing to get started on.
>>>> ie Do some research and tell us how this Javascripting works and how
>>>> it used in web-browsers.
>>>> Also we have a hurdle requirement for all prospective GSoC students.
>>>> Please build the TRUNK version of AbiWord and demonstrate you've made
>>>> a small change to the codebase as listed here.
>>>> We were really impressed with xsun's enthusiasm last year, when he
>>>> submitted numerous patches to improve our latex exporter before the
>>>> GSoC started.
>>>> best regards,
>>>> Martin Sevior
>>>> --------------------------------------------------------------------------------------------------
>>>> Hi,
>>>> I am a prospective student applicant for this years Gsoc. Last year I
>>>> was a bit late and couldn't have enough interaction with abiword's
>>>> developers. Though I am new to Abiword's code base but I have good
>>>> Gtk+ knowledge along with good experience in C++ . I am interested in
>>>> the working on the idea suggested by Fabian and will like to start
>>>> interacting regarding this as soon as possible.
>>>> Regards
>>>> Kartik rustagi
Received on Tue Mar 10 13:25:57 2009

This archive was generated by hypermail 2.1.8 : Tue Mar 10 2009 - 13:25:57 CET