The database contains an XML file containing Russian names of namespaces.
<ТегА xmlns="http://фр.рф/А/Б" xmlns:БББ="http://фр.рф/А/Б/варианты" xmlns:ВВВ="http://фр.рф/В"> <ТегБ> <БББ:ТегВ>содержимое</БББ:ТегВ> </ТегБ> <СлужебнаяИнформация> <ВВВ:GUID>ab959b10-3ce0-4e02-8a5b-e9eec399f3c5</ВВВ:GUID> <ВВВ:ДатаВремя>2016-05-07T14:45:11+03:00</ВВВ:ДатаВремя> </СлужебнаяИнформация> </ТегА> Request type:
SELECT X.* FROM ShemaName.Tablename T, XMLTABLE( 'declare default element namespace "http://фр.рф/А/Б"; declare namespace U="http://фр.рф/А/Б/варианты"; $d' PASSING T.XMLField AS "d" COLUMNS T VARCHAR(1000) PATH 'ТегА/ТегБ/U:ТегВ' ) AS X Causes an error:
ERROR [10504] [IBM][DB2/NT64] SQL16032N The string "http://фр.рф/А/Б" is not a valid URI. Error QName=err:XQST0046. If the request does not declare a namespace and use the PATH construct of the form
'*:ТегА/*:ТегБ/*:ТегВ' then the query works, but for some reason it does not suit me (real XML is more complicated and the namespace is not just there).
Is there a way around this namespace naming restriction?