IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

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
  • 1.  TQuery to obtain the ino:id of a Non XML

    Posted Mon November 27, 2006 11:53 AM

    Hello!

    I want to obtain the ino:id and the ino:docname of the resources added in a doctype. I use the TQuery(doctype). I found out that this brings from the server the whole document. For xml I can use : TQuery(“doctype/@ino:id”) but for NON XML it doesn’t work.

    Is it a way to do it for Non XML, too?

    Thanks!


    #API-Management
    #webMethods
    #webMethods-Tamino-XML-Server-APIs


  • 2.  RE: TQuery to obtain the ino:id of a Non XML

    Posted Mon November 27, 2006 03:20 PM

    ok, I found out how. Using tf:getInoId() function.

    But the code below throw the exception

    Database access failure (6321, INOXQE6321, Runtime type exception: invalid node-type, Expected NodeType: document):

    declare namespace tf = “http://namespaces.softwareag.com/tamino/TaminoFunction
    declare namespace ino=“http://namespaces.softwareag.com/tamino/response2
    for $q in collection(“Personal_Info”)/ino:nonXML
    return

    {tf:getInoId($q)}
    {tf:getDocname($q)}


    #webMethods
    #webMethods-Tamino-XML-Server-APIs
    #API-Management


  • 3.  RE: TQuery to obtain the ino:id of a Non XML

    Posted Mon November 27, 2006 06:37 PM

    The parameter for tf:getDocname must be a document node. Try changing your code to read tf:getDocname(root($q)).


    #webMethods
    #webMethods-Tamino-XML-Server-APIs
    #API-Management


  • 4.  RE: TQuery to obtain the ino:id of a Non XML

    Posted Tue November 28, 2006 05:29 PM

    Thanks, It works now!

    Any way, with the method I presented before problems can come up if the doctype has a prefix (xsl:stylesheet) because the xquery needs the namespace to be declared.

    A faster way I found to obtain both the docname and id is through TQuery:

                               doctype/@ino:docname | @ino:id  
    

    Previously I’ve tried “doctype/@*” and “doctype/@ino:docname , @ino:id” but the syntax seems not to be implemented in tamino xpath.


    #webMethods-Tamino-XML-Server-APIs
    #webMethods
    #API-Management