From: | Hannu Krosing <hannu(at)2ndQuadrant(dot)com> |
---|---|
To: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
Cc: | Simon Riggs <simon(at)2ndQuadrant(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Peter Eisentraut <peter_e(at)gmx(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Nikolay Samokhvalov <samokhvalov(at)gmail(dot)com> |
Subject: | Re: xpath processing brain dead |
Date: | 2009-03-02 13:15:03 |
Message-ID: | 1235999703.7911.6.camel@huvostro |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, 2009-03-02 at 07:54 -0500, Andrew Dunstan wrote:
>
> Simon Riggs wrote:
> > On Sun, 2009-03-01 at 18:22 -0500, Andrew Dunstan wrote:
> >
> >
> >> I think the XML type needs to conform to the SQL/XML spec. However, we
> >> are trying to apply XPath, which has a different data model, to that
> >> type - hence the impedance mismatch.
> >>
> >> I think that the best we can do (for 8.4, having fixed 8.3 as best we
> >> can without adversely changing behaviour) is to throw the
> >> responsibility
> >> for ensuring that the XML passed to the function is an XML document
> >> back on the programmer. Anything else, especially any mangling of the
> >> XPath
> >> expression, presents a very real danger of breaking on correct input.
> >>
> >
> > Can we provide a single function to bridge the gap between fragment and
> > document? It will be clearer to do this than to see various forms of
> > appending/munging, even if that function is a simple wrapper around an
> > append.
> >
> >
>
> I have no objection to providing an *extra* function that explicitly
> wraps non-documents and prefixes the xpath expression in that case, and
> is documented to have limitations. But I don't think we can provide a
> single function that always "does the right thing", especially when that
> is so ill-defined in the case of fragments.
Is it just that in you _can't_ use Xpath on fragments, and you _need_ to
pass full documents to Xpath ?
At least this is my reading of Xpath standard.
> cheers
>
> andrew
--
Hannu Krosing http://www.2ndQuadrant.com
PostgreSQL Scalability and Availability
Services, Consulting and Training
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2009-03-02 13:25:34 | Re: xpath processing brain dead |
Previous Message | Andrew Dunstan | 2009-03-02 12:54:05 | Re: xpath processing brain dead |