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.  couple of doubts

    Posted Thu March 13, 2003 10:44 PM

    1). W3C XQuery doesn’t have data manipulation functionality till now. Whatever is available with Software AG’s Quip, is it related to W3C?
    Are insert, updates and delete functions used in working draft of W3C to this present date?

    2 ). if I want to test my own xquery on some xml, where should I place my xquery and xml file? in which directory?

    3). For following query I’am getting following error
    {-- (Q3) Deletes all bids for items that have an end_date lying in the past
    if the number of tuples in bids is higher than 500 --}

    update
    let $bs := document(“data/R-bids.xml”)/bids/bid_tuple
    if (count($bs) > 500) then
    for $a in $bs
    for $b in document(“data/R-items.xml”)/items/item_tuple
    where ($a/itemno = $b/itemno) and ($b/end_date < today())
    delete $a

    Error:

    quip:message

    </quip:message>


    This is to update xquery
    for update
    {-- (Q12) Renames a document. --}

    update
    rename document(“test.xml”) as “test1.xml”

    Error:

    quip:message
    <![CDATA[
    Error (4,1): unparsed data
    ]]>
    </quip:message>



    Can anybody help me here?
    plz its driving me crazy :frowning:
    Thanks in advance.


    #webMethods
    #API-Management
    #Tamino


  • 2.  RE: couple of doubts

    Posted Mon March 17, 2003 01:52 PM

    On your first point, there is activity on defining an update capability for W3C XQuery, but it won’t be part of the initial XQuery 1.0 specification. In Software AG we’re trying to monitor the way this is going, but we need to provide an update capability for Tamino now, so we weren’t able to wait for the standards.

    Your second question: how can you run queries from a file in QuiP? You can select a directory in the small panel on the top-right of the screen; then File/Open will list the .XQuery files in this directory. The query gets its data files relative to the file containing the query, using the document() function.

    Your third question: the query updates/R/U3Q3.XQuery produces a message saying that no update was performed. I think this is the expected behavior if you run it on the data files as issued. This query is designed to tidy up old data if you have added a lot of data.

    The query updates/Tree/U2Q12 fails for me in the same way. I think this query is incorrect. The “rename” expression is designed to change the name of an XML element or attribute node, while this sample appears to be applying it to a document node; but document nodes have no name.

    Michael Kay


    #webMethods
    #API-Management
    #Tamino


  • 3.  RE: couple of doubts

    Posted Thu March 20, 2003 05:06 PM

    Thanks Michael!
    I have one quick question.
    If i have created a XML file and I wrote few queries for that file. Where should I placed these file exactly so that XQuery engine can recognized them?
    Thanks in advance


    #API-Management
    #webMethods
    #Tamino


  • 4.  RE: couple of doubts

    Posted Fri March 21, 2003 11:39 AM

    If you are asking about QuiP, the simplest thing to do is to extend the directory structure that QuiP uses for its sample queries. But you can put your own directories anywhere you like: just browse to them using the usual file open dialogs or the “Directory” and “Browse” buttons. QuiP uses the file extension “.xquery” to identify files containing queries.

    Michael Kay


    #webMethods
    #Tamino
    #API-Management