Xquery and tsd:objectRef behavior

All.

We are implementing a system where the documents could have other embedded documents in some of their nodes as a Reference.

Tamino provides a feature to retrieve those documents with the referenced documents instead of their reference key, declaring a tsd:objectRef in the schema and performing an X-Query. However sometimes we need to perform XQueries over the documents where the references were declared and we do not care about the embedded documents, in this last case I’ve realized that XQuery cannot be always performed even if the XQuery is valid.

For example:

The Ref Schema has an element with the following tsd:objectRef.

<tsd:objectRef>
                <tsd:collectionRef>xtendcms</tsd:collectionRef>
                <tsd:accessPredicate operator = "=">
                  <tsd:nodeRef>HelloWorld/GeneralData/ID</tsd:nodeRef>
                </tsd:accessPredicate>
           </tsd:objectRef>

Executing a simple X-Query such as:

/Ref

the document is retrieved Ok with its embedded documents.

However executing a simple Xquery such as:

 declare namespace tf = "http://namespaces.softwareag.com/tamino/TaminoFunction" 
               let $Ref:=input()/Ref
               return $Ref

The following error is shown:

Processing of data with X-Tension or X-Node mapping is not supported by XQuery

But if I execute the last query with a dummy filter (GeneralData/ID never is an empty element) such as :

 declare namespace tf = "http://namespaces.softwareag.com/tamino/TaminoFunction" 
               let $Ref:=input()/Ref[GeneralData/ID!='']
               return $Ref

The XQuery is performed Ok and it retrieves the documents without the embedded documents which is ok.

I would like to know why the first XQuery is not supported; instead the second one works ok.

Tamino Version: 4.4.1 for Windows

Thanks for your time.

Regards,

This problem was caused by another nodeRef declared in a complex element.
Removing the nodeRef in the complex element the query can be performed ok.

Regards,

Claudio