On 27/02/11 19:37, David E. Wheeler wrote:
> On Feb 27, 2011, at 11:23 AM, Tom Lane wrote:
>
>> Well, that's why I asked --- if it's going to be a huge chunk of code,
>> then I agree this is the wrong path to pursue. However, I do feel that
>> libxml pretty well sucks, so if we could replace it with a relatively
>> small amount of code, that might be the right thing to do.
> I think that XML parsers must be hard to get really right, because of all those I've used in Perl, XML::LibXML is far
andaway the best. Its docs suck, but it does the work really well.
>> No, because the xpath stuff is fundamentally broken, and nobody seems to
>> know how to make libxslt do what we actually need. See the open bugs
>> on the TODO list.
> XPath is broken? I use it heavily in the Perl module Test::XPath and now, in PostgreSQL, with my explanation
extension.
>
> http://github.com/theory/explanation/
>
> Is this something I need to worry about
I don't believe that XPath is "fundamentally broken", but I think Tom
may have meant xslt. When reviewing a recent patch to xml2/xslt I found
a few bugs in the way were using libxslt, as well as a bug in the
library itself (see
http://archives.postgresql.org/pgsql-hackers/2011-02/msg01878.php).
However if Tom does mean that xpath is the culprit, it may be with the
way the libxml2 library works. It's a very messy singleton. If I'm
wrong, I'm sure I'll be corrected!
Regards,
--
Mike Fowler
Registered Linux user: 379787