If you decided to get involved, please use https://bugs.launchpad.net/libmetalink/+bug/632928
On Monday, April 30, 2012 10:36:38 PM UTC+9, Tatsuhiro Tsujikawa wrote: > > Hi, > > Here is the some pointers to get started work of libmetalink meta4 support. > > 0. The source code of libmetalink is > https://code.launchpad.net/~metalink-dev/libmetalink/trunk > We use bzr for VCS. You can get branch using `bzr branch > lp:libmetalink` > > 1. We want to autodetect metalink version 3 and version 4 (aka meta4). > To do this, we use XML namespace URI. > Metalink3 uses "http://www.metalinker.org/" as the name space and > meta4 uses > "urn:ietf:params:xml:ns:metalink". > Unfortunately, current libmetalink codebase does use namespace aware > API. > So the first work is to change the code to use namespace aware API. > The libmetalink supports both expat and libxml2 for reading XML file. > We concentrate on expat first. If we have spare time, then we can work > with > libxml2 but I think it is optional. > For XML namespace handling, see expat documentation[1]. > aria2 source code[2] is also useful though it is C++. > > 2. Move metalink3 parser state functions in metalink_pstate.{h,c} to > metalink_pstate_v3.{h,c}. > Also append "_v3" to their name to indicate that they are metalink3 > version functions. > I think the all *_state_{start,end}_fun functions other than > null_state_start_fun, initial_state_start_fun and skip_state_start_fun are > metalink3 parser state functions. Run test that make sure that > no regression is introduced. > > 3. Add meta4 parser state functions in metalink_pstate_v4.{h,c}. > The entry point to meta4 parser functions is initial_state_start_fun(): > If the XML namespace indicates metalink4 then enter meta4 parser > functions. > Otherwise metalink3 functions. > You may need to add some functions to metalink_pctrl.{h,c} for meta4 > aria2 source code is also useful here: see [3]. > We need to test case for meta4 in this step too. > After this step, we will have working library to support both > Metalink3 and meta4 > with the auto-detection mechanism. > > For each step, you commit your changes to your local branch and send me a > patch using bzr send with -o option. You can learn about bzr send command > in the page [4]. > I review your changes and if it is OK, I'll merge and commit the changes > to the official repository. > For each step, I can provide more detailed help if you ask me. > I think aria2 source code is very useful for this project. Checkout aria2 > source file starts with "Metalink" and "Expat". > > [1] http://www.xml.com/pub/a/1999/09/expat/index.html > [2] https://github.com/tatsuhiro-t/aria2/blob/master/src/ExpatXmlParser.cc > [3] > https://github.com/tatsuhiro-t/aria2/blob/master/src/MetalinkParserStateImpl.cc > [4] > http://doc.bazaar.canonical.com/latest/en/user-guide/sending_changes.html > > -- You received this message because you are subscribed to the Google Groups "Metalink Discussion" group. To view this discussion on the web visit https://groups.google.com/d/msg/metalink-discussion/-/vN4aH4xuKfQJ. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/metalink-discussion?hl=en.
