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.  problem with delete a document per docname

    Posted Wed March 12, 2008 12:07 PM

    Hallo there,
    my XQuery to delete a document per docname looks like this:

    declare namespace tf = "http://namespaces.softwareag.com/tamino/TaminoFunction"
    update for $q in collection('myCollection')/myDocRootElement
    where tf:getDocname($q)='myDocname'
    do(
    delete $q/..
    )

    And I’ve got a error with messsage " Runtime type exception: invalid node-type;Expected NodeType: document"

    Can you tell me, what’s wrong?

    thank you in advance

    mzha


    #webMethods
    #Tamino
    #API-Management


  • 2.  RE: problem with delete a document per docname

    Posted Wed March 12, 2008 06:25 PM

    Hi,

    sorry, I cannot test thsi at the moment, but the error message indicates taht you should use root($q) rather than $q. Please try:

    
    declare namespace tf = "http://namespaces.softwareag.com/tamino/TaminoFunction"
    update for $q in collection('myCollection')/myDocRootElement
    where tf:getDocname(root($q))='myDocname'
    do(
    delete root($q)
    )

    If thsi does not work, please tell and I will set up a system to test

    regards

    harald


    #Tamino
    #webMethods
    #API-Management


  • 3.  RE: problem with delete a document per docname

    Posted Thu March 13, 2008 10:01 AM

    Hi Harald,

    Thanks a lot. It works now. :wink:

    mzha


    #webMethods
    #Tamino
    #API-Management