Jeffrey C. Ollie wrote: > On Wed, 2007-01-10 at 11:29 +0100, Max CtRiX wrote: > >> Jeffrey C. Ollie wrote: >> > I've been pretty quiet on the lists for a while, but why are we adding >> > an XML parser to OpenPBX? I thought that one of the goals of OpenPBX >> > was to stop doing things like this and relying on external libraries? >> >> Basically for 2 reasons: >> 1) we need an alternative to take away that crappy config files we are using >> 2) we have to focus on the real meat >> > > So why are you trying to be an XML parsing expert now? By implementing > your own XML parsing library that's what you need to be now. XML may > seem simple to parse, but I'm sure that there are some corner cases that > aren't covered properly, there are probably bugs, and you have none of > the features like XInclude, namespaces, and validation that make XML > really useful. > > And now that I've looked at the source it seems that you've just taken > the source of ezXML and imported it into the OpenPBX sources. From what > I see on the ezXML web page (<http://ezxml.sourceforge.net/>) ezXML > can't even check properly for well-formedness. > > yes it's ezxml. As i said, that didn't took a long time to introduce to openpbx. i have never used libxml2 and i don't waste my time for another option.
As it's a library, if another one want to pick it up, insert libxml2 or whatever you like, update the docs and the wikis to add the istructions, i'll be glad to use it. >> While expanding 1) and 2) it turns out that: >> >> 1) the real meat on that branch is (will be) sofia (ie: using external >> libraries) >> >> 2) that simple xml parser works quite well and i can use it in a simple >> way (so i can focus on the real meat) >> >> 3) i don't want to spend time to study external XML parsers and >> validators and implementing it >> > > libxml2 is perfectly capable of loading an XML document without > validating it if you don't want to. I don't know what you mean by > "implementing it" - you've got to learn the API of any library whether > it's internal or external. > > Let's say: i don't want to learn another API because i'm focusinf on sofia. If someone else does it, i'll use it. >> 4) we have had many problems with portability on platforms != Linux and >> embedding such a small library is not a bad idea >> > > Oh please. libxml2 is likely *more* portable than OpenPBX. And now the > job of maintaining an XML library just became ours. Really, I thought > that one of the major goals of the OpenPBX project was to stop embedding > code like this and to use external libraries. > > probably you were not in the channel when we switched from editline to readline. As already stated, if someone is willing to use libxml2, he can do it and i'll use it. >> if compared to the >> troubles that MANY people who don't even know how to install an external >> library from sources can arise, even among the people who should be >> supposed to work with us (And that seems to work agaings us instead) >> > > I'll bet that libxml2 is available as a binary package for 99.9% of the > systems we care about. If this was really your concern, what about > sofia-sip itself? Or the dozens of other libraries that we require for > full functionality... > > See above. >> So in conclusion: >> >> If someone writes a working XML config wrapper relying on an external >> library (_the code complexity would be the same, imho_, because that >> parser that i included is really simple), writes the docs and tests it >> on all platform and frees me from doing that instead of concentrating on >> sofia, that is a good point to do it >> > > This statement makes me wonder how hard you've investigated other XML > libraries. From what I can see libxml2 isn't that hard to develop with > (see http://xmlsoft.org/examples/tree1.c for one example that compares > favorably with the example on ezXML's web page). > > And if you really want to stick with ezXML let's leave it as an external > library rather than importing the source into OpenPBX. > > i've investigated enough to pick the one that suited my needs and allowed me to write sofia (freeswitch uses the same library in the core and not as an external dependency) >> P.S.: i have added also some functions (=a library??) to manage memory >> pools because i didn't find any external and suitable alternative. >> > > Which ones did you look at? > http://trac.openpbx.org/cgi-bin/trac.cgi/browser/openpbx/branches/openpbx-sofia/include/openpbx/opbx_mpool.h?rev=2408 If you have any other optionit's welcome. Max P.S.: -rw-r--r-- 1 root root 1147004 2006-10-26 23:23 /usr/lib/libxml2.so.2.6.27 libxml2 is not so suitable for embedded stuff... -rw-r--r-- 1 ctrix ctrix 74668 Jan 11 21:03 libopenpbx_la-opbx_xml.o this is only a bit more suitable (the first is stripped, the second isn't) _______________________________________________ Openpbx-dev mailing list [email protected] http://lists.openpbx.org/mailman/listinfo/openpbx-dev
