Re: Fix XML handling with DOCTYPE

Поиск
Список
Период
Сортировка
От Chapman Flack
Тема Re: Fix XML handling with DOCTYPE
Дата
Msg-id 5C8DC3F7.9050604@anastigmatix.net
обсуждение исходный текст
Ответ на Re: Fix XML handling with DOCTYPE  (Chapman Flack <chap@anastigmatix.net>)
Список pgsql-hackers
On 03/16/19 18:33, Chapman Flack wrote:
> The pre-scan is a simple linear search and will ordinarily say yes or no
> within a couple dozen characters--you could *have* an input with 20k of
> leading whitespace and comments, but it's hardly the norm. Just trying to

If the available regexp functions want to start by munging the entire input
into a pg_wchar array, then it may be better to implement the pre-scan as
open code, the same way parse_xml_decl() is already implemented.

Given that parse_xml_decl() already covers the first optional thing that
can precede the doctype, the remaining scan routine would only need to
recognize comments, PIs, and whitespace. That would be pretty straightforward.

Regards,
-Chap


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

Предыдущее
От: Ramanarayana
Дата:
Сообщение: Re: Unaccent extension python script Issue in Windows
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Possible to modify query language in an extension?