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.


#TechXchangePresenter
 View Only

QuiP Functions with Update

  • 1.  QuiP Functions with Update

    Posted Wed February 12, 2003 03:04 PM

    Hello,

    I work with QuiP for update XML documents and I’ve found out a problem: I make the following code:
    ----------------------------------
    update
    for $doc in document(“GXLReader.xml”)//package-decl
    where $doc/@name = “venice”
    replace $doc/@name
    with attribute name {“teste”}
    ---------------------------------

    It runs OK. However, if I transform this code in a function like this below, it don’t runs anyway.

    -------------------------------------
    define function MovingClassBetweenPackages(string $documento, string $package_original, string $package_final)
    returns element
    {
    update
    for $doc in document($documento)//package-decl
    where $doc/@name = string($package_original)
    replace $doc/@name with attribute name {“teste”}
    }



    {
    {MovingClassBetweenPackages(“GXLReader.xml”, “venice”, “teste”)}
    }

    ------------------------------------------------
    I receive the following error message: "Error (4,1): closing parenthesis missing. Actual token found: update "
    Could anyone help me?
    I attached the file GXLReader.xml
    Thanks in advance.

    Paulo Henrique
    GXLReader.xml (56.7 KB)


    #webMethods
    #Tamino
    #API-Management