Re: [HACKERS] XPATH evaluation

2011-06-18 Thread Radosław Smogura
Nicolas Barbier Friday 17 of June 2011 17:29:57 > 2011/6/17, Andrew Dunstan : > > On 06/17/2011 10:55 AM, Radosław Smogura wrote: > >> XML canonization preservs whitespaces, if I remember > >> well, I think there is example. > >> > >> In any case if I will store image in XML (I've seen this), pre

Re: [HACKERS] XPATH evaluation

2011-06-17 Thread Nicolas Barbier
2011/6/17, Andrew Dunstan : > On 06/17/2011 11:29 AM, Nicolas Barbier wrote: > >> CDATA sections are just syntactic sugar (a form of escaping): > > Yeah. OTOH doesn't an empty CDATA section force a child element, where a > pure empty element does not? Wow, some Googling around shows that there is

Re: [HACKERS] XPATH evaluation

2011-06-17 Thread Andrew Dunstan
On 06/17/2011 11:29 AM, Nicolas Barbier wrote: 2011/6/17, Andrew Dunstan: On 06/17/2011 10:55 AM, Radosław Smogura wrote: XML canonization preservs whitespaces, if I remember well, I think there is example. In any case if I will store image in XML (I've seen this), preservation of white sp

Re: [HACKERS] XPATH evaluation

2011-06-17 Thread Radosław Smogura
Andrew Dunstan Friday 17 of June 2011 17:09:25 > On 06/17/2011 10:55 AM, Radosław Smogura wrote: > > Andrew Dunstan Friday 17 of June 2011 15:47:04 > > > >> On 06/17/2011 05:41 AM, Florian Pflug wrote: > >>> On Jun17, 2011, at 11:09 , Radosław Smogura wrote: > 1. > SELECT (XPATH('/root

Re: [HACKERS] XPATH evaluation

2011-06-17 Thread Nicolas Barbier
2011/6/17, Andrew Dunstan : > On 06/17/2011 10:55 AM, Radosław Smogura wrote: > >> XML canonization preservs whitespaces, if I remember >> well, I think there is example. >> >> In any case if I will store image in XML (I've seen this), preservation of >> white spaces and new lines is important. >

Re: [HACKERS] XPATH evaluation

2011-06-17 Thread Florian Pflug
On Jun17, 2011, at 17:09 , Andrew Dunstan wrote: > If you store images you should encode them anyway, in base64 or hex. > More generally, data that needs that sort of preservation should possibly be > in CDATA nodes. All very true. Still, ideally we'd return the XML exactly as stored, though, ev

Re: [HACKERS] XPATH evaluation

2011-06-17 Thread Radosław Smogura
Florian Pflug Friday 17 of June 2011 11:41:08 > On Jun17, 2011, at 11:09 , Radosław Smogura wrote: > > 1. > > SELECT (XPATH('/root/*', 'http://olacle.com/db"; > > xmlns:p="http://postgresql.org/db";> > db>')); Produces: > > "{" > > > > > > > > > > > > > > > > ",}" > > In above was r

Re: [HACKERS] XPATH evaluation

2011-06-17 Thread Andrew Dunstan
On 06/17/2011 10:55 AM, Radosław Smogura wrote: Andrew Dunstan Friday 17 of June 2011 15:47:04 On 06/17/2011 05:41 AM, Florian Pflug wrote: On Jun17, 2011, at 11:09 , Radosław Smogura wrote: 1. SELECT (XPATH('/root/*', 'http://olacle.com/db"; xmlns:p="http://postgresql.org/db";>')); Produce

Re: [HACKERS] XPATH evaluation

2011-06-17 Thread Radosław Smogura
Andrew Dunstan Friday 17 of June 2011 15:47:04 > On 06/17/2011 05:41 AM, Florian Pflug wrote: > > On Jun17, 2011, at 11:09 , Radosław Smogura wrote: > >> 1. > >> SELECT (XPATH('/root/*', 'http://olacle.com/db"; > >> xmlns:p="http://postgresql.org/db";> >> :db>')); Produces: > >> "{" > >> > >>

Re: [HACKERS] XPATH evaluation

2011-06-17 Thread Andrew Dunstan
On 06/17/2011 05:41 AM, Florian Pflug wrote: On Jun17, 2011, at 11:09 , Radosław Smogura wrote: 1. SELECT (XPATH('/root/*', 'http://olacle.com/db"; xmlns:p="http://postgresql.org/db";>')); Produces: "{" ",}" In above was reduced to this is different infoset then input, and those

Re: [HACKERS] XPATH evaluation

2011-06-17 Thread Florian Pflug
On Jun17, 2011, at 11:09 , Radosław Smogura wrote: > 1. > SELECT (XPATH('/root/*', 'http://olacle.com/db"; > xmlns:p="http://postgresql.org/db";>')); > Produces: > "{" > > > > ",}" > In above was reduced to this is different infoset then input, > and those notations are differently inte

[HACKERS] XPATH evaluation

2011-06-17 Thread Radosław Smogura
Hello, During review of https://commitfest.postgresql.org/action/patch_view?id=580 I found following problems with XPath. 1. SELECT (XPATH('/root/*', 'http://olacle.com/db"; xmlns:p="http://postgresql.org/db";>')); Produces: "{" ",}" In above was reduced to this is different in