On 10 July 2010 14:12, Mike Fowler <m...@mlfowler.com> wrote: > Robert Haas wrote: >> >> On Fri, Jul 9, 2010 at 4:06 PM, Peter Eisentraut <pete...@gmx.net> wrote: >> >>> >>> On ons, 2010-07-07 at 16:37 +0100, Mike Fowler wrote: >>> >>>> >>>> Here's the patch to add the 'xml_is_well_formed' function. >>>> >>> >>> I suppose we should remove the function from contrib/xml2 at the same >>> time. >>> >> >> Yep > > Revised patch deleting the contrib/xml2 version of the function attached. > > Regards, > > -- > Mike Fowler > Registered Linux user: 379787 > sql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-hackers > >
Would a test for mismatched or undefined namespaces be necessary? For example: Mismatched namespace: <pg:foo xmlns:pg="http://postgresql.org/stuff">bar</my:foo> Undefined namespace when used in conjunction with IS DOCUMENT: <pg:foo xmlns:my="http://postgresql.org/stuff">bar</pg:foo> Also, having a look at the following example from the patch: SELECT xml_is_well_formed('<local:data xmlns:local="http://127.0.0.1";><local:piece id="1">number one</local:piece><local:piece id="2" /></local:data>'); xml_is_well_formed -------------------- t (1 row) Just wondering about that semi-colon after the namespace definition. Thom -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers