webMethods

webMethods

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
Expand all | Collapse all

Xquery and tsd:objectRef behavior

  • 1.  Xquery and tsd:objectRef behavior

    Posted Wed March 01, 2006 10:37 PM

    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,


    #Tamino
    #webMethods
    #API-Management


  • 2.  RE: Xquery and tsd:objectRef behavior

    Posted Thu March 16, 2006 02:12 PM

    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


    #API-Management
    #webMethods
    #Tamino