Re: XPATH evaluation
От
Andrew Dunstan
Тема
Re: XPATH evaluation
Дата
Msg-id
4DFB6E25.1000002@dunslane.net
Ответ на
Re: XPATH evaluation (Radosław Smogura)
Список
Дерево обсуждения
XPATH evaluation Radosław Smogura <rsmogura@softperience.eu>
Re: XPATH evaluation Florian Pflug <fgp@phlo.org>
Re: XPATH evaluation Radosław Smogura <rsmogura@softperience.eu>
Re: XPATH evaluation Andrew Dunstan <andrew@dunslane.net>
Re: XPATH evaluation Radosław Smogura <rsmogura@softperience.eu>
Re: XPATH evaluation Andrew Dunstan <andrew@dunslane.net>
Re: XPATH evaluation Radosław Smogura <rsmogura@softperience.eu>
Re: XPATH evaluation Florian Pflug <fgp@phlo.org>
Re: XPATH evaluation Nicolas Barbier <nicolas.barbier@gmail.com>
Re: XPATH evaluation Radosław Smogura <rsmogura@softperience.eu>
Re: XPATH evaluation Andrew Dunstan <andrew@dunslane.net>
Re: XPATH evaluation Nicolas Barbier <nicolas.barbier@gmail.com>
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/*', '>>> xmlns:p="http://postgresql.org/db">>>> :db>')); Produces:
>>>> "{"
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> ",}"
>>>> In above was reduced to this is different infoset then
>>>> input, and those notations are differently interpreted e.g. by XML
>>>> Binding& WebServices. The 1st one will may be mapped to empty string,
>>>> and 2nd one to to null.
>>> Oh, joy :-(
>> I thought these were basically supposed to be the same.
>>
>> The XML Information Set for example specifically excludes:
>>
>> The difference between the two forms of an empty element: | |
>> and ||.||||
>>
>>
>> See Appendix D.
>> Note that this implies that does not have content of an
>> empty string, but that it has no content.
>>
>>
>> cheers
>>
>> andrew
> Indeed, Infoset Spec, and XML Canonization Spec treats same, as
> - my wrong, but 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.
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.
cheers
andrew
В списке pgsql-hackers по дате отправления