X-Query Is not working with nodes prefixed with Namespaces!

Hi,
I am regularly receiving an XML document from Adobe. The XML file refers to a namespace ‘aic’ (Adobe In Copy). After inserting the file as an instance to Tamino Server, the XML file will look something like this:

<aic:document … ino:id=“1” …>
aic:swatchlist
.
.
.
</aic:swatchlist>
.
.
.
</aic:document>
When I query the XML DB from X-Query using the following simple query

/aic:document [@ino:id=“1”]

I get the intended result.

However, (AND HERE IS THE PROBLEM)
When I extended the above query to the following:

/aic:document [@ino:id=“1”]/aic:swatchlist

I get no result.

Mind you that when I removed the namespace ‘aic’ from the entire document and reinserted again to the XML DB and queried it, the results were just fine.

The question is:
IS THERE ANY PROBLEM WITH HAVING A NAMESPACE IN AN XML DOCUMENT WHEN IT COMES TO X-QUERY ?

X-Query is obsolete technology and in general doesn’t coexist well with namespaces. I’d strongly recommend using XQuery instead.

declare namespace aic="whatever the namespace URL is"
declare namespace tf="http://namespaces.softwareag.com/tamino/TaminoFunction"

input()/aic:document[tf:getInoId(.) = 1]/aic:swatchlist