Dave Thomas wrote:
> 
> Following the raging success of my last RCR, here's other.
> 
> I'm finding myself using Ruby with XML more and more. However, I'm
> reluctant to distribute applications that use xmlparser, as it forces
> the applications' users to install both expat and the xml module.
> 
> So, I'm proposing that we include these in the Ruby core, and
> therefore make them globally available. The expat license allows this,
> so I suspect the main problem might be one of size (expat will add
> about 200k to the download).

A warning about this...

Be very careful about "bundling" expat, and making it different to any expat
already installed on the system, or even installed later for use with
another application. This can cause nasty segfaults if the API changes. We
have already seen this in the mod_perl world, where XML::Parser used its own
version of expat, as did mod_php, as did Apache itself. Result: kerash. Big
time. Its a horrible task to try and clean this mess up, and the only clean
solution is to KEEP EXPAT AS A SEPARATE DISTRIBUTION. Sorry for the caps but
its a really significant issue.

I suggest looking at what Python does: Ship an all python XML parser with
core. Make sure it implements SAX2, and make sure other parsers do the same.
That way anyone can install an expat based parser that implements SAX2 and
use that for a speed boost.

Also, I suggest looking at the perl SAX2 bindings [1], rather than the
Python or Java ones, as they are definitely nicer to program with.

[1] http://bitsko.slc.ut.us/~ken/perl-xml/sax-2.0.html

-- 
<Matt/>

    /||    ** Founder and CTO  **  **   http://axkit.com/     **
   //||    **  AxKit.com Ltd   **  ** XML Application Serving **
  // ||    ** http://axkit.org **  ** XSLT, XPathScript, XSP  **
 // \\| // ** mod_perl news and resources: http://take23.org  **
     \\//
     //\\
    //  \\