From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Ali Akbar <the(dot)apaan(at)gmail(dot)com> |
Cc: | "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Fix xpath() to return namespace definitions |
Date: | 2014-06-04 19:37:42 |
Message-ID: | CA+TgmobJ1J+O-_VizGB2cht_pvVCgeqSXm189XDCyF-EAmHxPQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, May 30, 2014 at 5:04 AM, Ali Akbar <the(dot)apaan(at)gmail(dot)com> wrote:
> While developing some XML processing queries, i stumbled on an old bug
> mentioned in http://wiki.postgresql.org/wiki/Todo#XML: Fix Nested or
> repeated xpath() that apparently mess up namespaces.
>
> Source of the bug is that libxml2's xmlNodeDump won't output XML namespace
> definitions that declared in the node's parents. As per
> https://bug639036.bugzilla-attachments.gnome.org/attachment.cgi?id=177858,
> the behavior is intentional.
>
> This patch uses function xmlCopyNode that copies a node, including its
> namespace definitions as required (without unused namespace in the node or
> its children). When the copy dumped, the resulting XML is complete with its
> namespaces. Calling xmlCopyNode will need additional memory to execute, but
> reimplementing its routine to handle namespace definition will introduce
> much complexity to the code.
>
> Note: This is my very first postgresql patch.
Please add your patch here so we don't forget about it:
https://commitfest.postgresql.org/action/commitfest_view/open
Please see also:
https://wiki.postgresql.org/wiki/Submitting_a_Patch
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2014-06-04 19:45:44 | Re: Hide 'Execution time' in EXPLAIN (COSTS OFF) |
Previous Message | Magnus Hagander | 2014-06-04 19:21:28 | Re: Sigh, we need an initdb |