Hi
This proposal is followup of implementation of XMLTABLE.
Lot of XML documents has assigned document namespace.
<rows xmlns="http://x.y"><row><a>10</a></row></rows>
For these XML document any search path must use schema "
http://x.y". This is not too intuitive, and from XMLTABLE usage is not too user friendly, because the default column path (same like column name) cannot be used. A solution of this issue is default namespace - defined in SQL/XML.
example - related to previous xml
without default namespace:
'/aux:rows/aux:row' PASSING ...
COLUMNS a int PATH 'aux:a')
with default namespace
'/rows/row' PASSING ...
COLUMNS a int);
Unfortunately the libxml2 doesn't support default namespaces in XPath expressions. Because the libxml2 functionality is frozen, there is not big chance for support in near future. A implementation is not too hard - although it requires simple XPath expressions state translator.
The databases with XMLTABLE implementation supports default namespace for XPath expressions.
The patch for initial implementation is attached.
Regards
Pavel