Re: xmlconcat (was 9.0 release notes done)

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: xmlconcat (was 9.0 release notes done)
Дата
Msg-id 1269458112.1185.6.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 ons, 2010-03-24 at 14:51 -0400, Andrew Dunstan wrote:
> Actually, I have come to the conclusion that the biggest problem in
> this 
> area is that we accept XML documents with a leading DOCTYPE node at
> all. 
> Our docs state:
> 
>     The xml type can store well-formed "documents", as defined by the
>     XML standard, as well as "content" fragments, which are defined by
>     the production XMLDecl? content in the XML standard.
> 
> A document with a leading DOCTYPE node matches neither of these
> rules, 
> and when we strip the XMLDecl from a piece of XML where it's followed
> by 
> a DOCTYPE node we turn something that is legal XML into something
> that 
> isn't, even by our own (or possibly the standard's) relaxed
> definition. 
> A doctypedecl can only follow an  XMLDecl, see 
> <http://www.w3.org/TR/2006/REC-xml11-20060816/#sec-prolog-dtd>.

Our version of SQL/XML support references SQL:2003 which references XML
1.0, where omitting the XMLDecl is legal.  You can't omit the XMLDecl in
XML 1.1, because you need it to communicate the fact that it's version
1.1.

But note that that is correctly supported:

=# select xmlconcat('<?xml version="1.0"?><foo/>', '<?xml
version="1.0"?><bar/>'); xmlconcat
--------------<foo/><bar/>

and

=# select xmlconcat('<?xml version="1.1"?><foo/>', '<?xml
version="1.1"?><bar/>');            xmlconcat
-----------------------------------<?xml version="1.1"?><foo/><bar/>




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

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: xmlconcat (was 9.0 release notes done)
Следующее
От: Markus Wanner
Дата:
Сообщение: Re: dtester-0.1 released