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.  XQuery - update

    Posted Mon February 27, 2006 12:59 PM

    Help me, Please!!
    Reading works
    Query:
    declare namespace tf=“http://namespaces.softwareag.com/tamino/TaminoFunction
    for $a in input()/letter/status/user
    where tf:getInoId($a)= 5 and $a = ‘BE6C30E174350000’
    return $a
    Return:
    <xq:result …>
    BE6C30E174350000
    </xq:result>

    And when I try to update
    Query:
    declare namespace tf=“http://namespaces.softwareag.com/tamino/TaminoFunction
    update for $a in input()/letter/status/user
    where $a = ‘BE6C30E174350000’ and tf:getInoId($a)= 5
    do(
    replace $a with attribute flag1 {55555555555}
    )
    Return:
    <ino:message ino:returnvalue=“6450”>
    <ino:messagetext ino:code=“INOXQE6450”>Update results in non-well-formed document</ino:messagetext>
    </ino:message>
    Note:
    flag1 - have type “xs:long”

    Approximate XML:

    ... BE6C30E174350001 BE6C30E174350002 BE6C30E174350003 BE6C30E174350004

    That it is necessary to make that worked??

    Thanks in advance for any help.


    #webMethods
    #Tamino
    #API-Management


  • 2.  RE: XQuery - update

    Posted Mon February 27, 2006 01:41 PM

    you try to replace an element by an attribute.


    #webMethods
    #API-Management
    #Tamino


  • 3.  RE: XQuery - update

    Posted Mon February 27, 2006 04:10 PM

    declare namespace tf=“http://namespaces.softwareag.com/tamino/TaminoFunction
    update for $a in input()/letter/status/user
    where $a = ‘BE6C30E174350000’ and tf:getInoId($a)= 5
    do(
    replace $a/@flag1 with attribute flag1 {55555555555}
    )


    #Tamino
    #webMethods
    #API-Management