Re: xmlconcat (was 9.0 release notes done)

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: xmlconcat (was 9.0 release notes done)
Дата
Msg-id 1269293491.14588.13.camel@vanquo.pezone.net
обсуждение исходный текст
Ответ на Re: xmlconcat (was 9.0 release notes done)  (Andrew Dunstan <andrew@dunslane.net>)
Ответы Re: xmlconcat (was 9.0 release notes done)  (Andrew Dunstan <andrew@dunslane.net>)
Список pgsql-hackers
On sön, 2010-03-21 at 13:07 -0400, Andrew Dunstan wrote:
> Yeah, maybe. According to 
> <http://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html> the only 
> legal child of an XML Document node that is not also a legal child of a 
> DocumentFragment node is a DocumentType node. So we could probably just 
> look for one of those in each argument node and strip it out. That 
> should be fairly lightweight in the common case where it's not present - 
> we'd just be searching for a fixed string. Removing it if found would be 
> more complex. We'd have to parse the node to remove it, since a legal 
> DocumentType node string could appear legally inside a CDATA node.

According to the SQL/XML standard, the document type declaration should
apparently be stripped when doing a concatenation.  (This makes sense
because the result of a concatenation can never be valid according to a
DTD.)

But if we are not comfortable about being able to do that safely, I
would be OK with just raising an error if a concatenation is attempted
where one value contains a DTD.  The impact in practice should be low.



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: proposal: more practical view on function's source code
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: 9.0 release notes done