|
WARNING: this is outdated document. Please go to http://developer.postgresql.org/index.php/XML_Todo! [1]
TODO("+" means that the issue is resolved)
-- most important: --
* + !!! ability to parse both XML docs and chunks
* * error reporting (error messages by libxml's error codes) - finish
* ? encoding issues (convert to database encoding ?)
* + xmlpath non-standard function (xml _xmlpath(xml data, text query))
* * sql/xml functions according sql:2003/14
* -* xmlvalidate (dtd, xsd?) according sql:2003/14
* - type casting according sql:2003/14
* - documentation
* * !!! installation: fix USE_XML issue (*.c-s do not detect it now...)
* - installation: --with-xml=<path>
* - installation: we cannot use #ifdef USE_XML in .bki files - find another way (straight SQL in initdb??)
* - xpath_array(): is it really necessary to use xmlChar2text before array accum?
* - TESTING, EXAMPLES (regression tests?)
-- more: --
+ Finish initial things (see deliverables in the proposal:
http://chernowiki.ru/index.php?node=87)
+ Support XML CONTENT and XML SEQUENCE as possible kinds of XML
type (according SQL/XML:4.2.2, 6.1, 10.16). As for sequence,
to implement this fully is rather difficult task, because to do it
we should be able to work with XQuery sequences - i.e. to have
XQuery processor (or at least part of it). The second difficulty is
that implementing it in SQL/XML manner needs grammar hacking (TODO:
think, how to do it w/o hacking, as alternative to SQL/XML syntax).
One of subtasks for this global task is: to implement last steps of
XMLPARSE according SQL/XML:10.16 (create XQuery document entity).
E Implement SQL/XML syntax for XML type specs: XML(DOCUMENT(ANY)),
XML(CONTENT(ANY)), etc (SQL/XML:4.2.2).
* Parsing a binary sting as an XML value (SQL/XML:10.16).
E {PRESERVE | STRIP} WHITESPACE options for XMLPARSE
(SQL/XML:6.15, 10.16, Features X065, X066, X065, X066).
* Function for escaping strings for xml data (encode entities) (non-standard?)
* XPath function (what about standard? Seems that only XMLQUERY is present
there - i.e. XQuery as more powerful and including XPath...)
* Allow passing DTD to _xmlvalidate() as a simple VARCHAR string, not only as
an URI.
* Data manipulation (updates, insertes) according SQL/XML (SQL/XML:14)
* Information schema according SQL/XML (SQL/XML:20); first of all, XML_SCHEMAS
view.
-- SQL/XML publishing func-s: --
* XMLDOCUMENT (SQL/XML:6.12)
* XMLCAST (SQL/XML:6.5)
* Integration with XML type (xml in, xml out)
+ Fix XMLCOMMENT - now it produces invalid comments ('<-- ... -->' instead of
'<!-- ... -->')
* Inline ORDER BY for XMLAGG: ...xmlagg(xmlelement(...) order by col1) ...
* 'RETURNING [ CONTENT | SEQUENCE ]' spec for XMLDOCUMENT, XMLAGG, XMLPI, ...
+ For XMLPI: first argument should be 'NAME ...' (so-called, PI target),
this syntax is similar to XMLELEMENT.
* XMLTEXT (SQL/XML:6.18)
E XMLPI now produces simple result, it do not worry about content.
It's necessary to check, that the name of instruction is valid
+ Both statements are "valid" at the moment (fix grammar!):
"select XMLPI(NAME 'aaa');" & "select XMLPI(NAME NAME 'aaa');"
E XMLCONCAT (and others) should accept NULLs as input
E This should work:
select XMLCONCAT((select data from xmls where id = 1),
XMLELEMENT(name xx, '22'));
E Look at the piece of grammar: "XMLELEMENT '(' NAME ColLabel ')'".
"Bad" example: select xmlelement(name "A<!--111", '22'); =>
produces invalid XML
* Is this OK?
template1=# select xmlelement(name test, xmlattributes(1 as a, 1 as a));
xmlelement
---------------------
<test a="1" a="1"/>
(1 row)
* Not any <value expression> can be passed after name in xmlelement
(check standard, maybe both cases are beyond XMLELEMENT definition):
test=# select xmlelement(name a, 1, xmlelement(name b, 2));
ERROR: syntax error at or near ","
LINE 1: select xmlelement(name a, 1, xmlelement(name b, 2));
^
test=# select xmlelement(name a, xmlelement(name b, 2), 1);
xmlelement
------------------
<a><b>2</b>1</a>
(1 row)
* Following stmt causes segfault:
select text_xmlagg_accum('jhkj'::text, 'jhkjh'::text);
+ XMLPI is wrong now ("XMLPI '(' NAME a_expr ')'" in gram.y)
It should accept 2 params: the name identifier and string value
expression.
+ XMLPI and XMLCOMMENT: if NULL is given as <string value expression>,
then NULL should be returned (now we have segfault on NULLs!)
* XMLROOT: values for STANDALONE option now requre quotes ('), standard
defines three "keyword" values: YES, NO, NO VALUE (w/o quotes).
New keywords in grammar?..
* XMLROOT: VERSION should be required param
* ! XMLROOT was deleted in SQL/XML:2006 at all (XMLDOCUMENT added) !
* XMLELEMENT: [...][{, <xml element content> } ... ] <right paren>
Now, we can pass any number of child XMLELEMENTs, but (e.g.) this
doesn't work: select xmlelement(name aaa, now(), now());
* Doc (func.sgml) needs review
* "Invalid PI name" when inserting XML docs with prolog into table.
4183
URL of this document: http://chernowiki.ru/96.html Links: [1] http://developer.postgresql.org/index.php/XML_Todo!
|