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.



#Automation


#Applicationintegration
#webMethods
#Integration
 View Only
  • 1.  Help with X-Query...

    Posted 02/11/05 01:39 PM

    Hi,

    When I do a http:///tamino/database/chunks?_xquery=for $p in input() return $p

    I get this

    <?xml version="1.0" encoding="ISO-8859-1" ?>
    - <ino:response xmlns:ino=“http://namespaces.softwareag.com/tamino/response2” xmlns:xql=“XQL FAQ (XML Query Language - Frequently Asked Questions)”>
    - <xq:query xmlns:xq=“http://namespaces.softwareag.com/tamino/XQuery/result”>
    - <![CDATA[ for $p in input() return $p
    ]]>
    </xq:query>
    - <ino:message ino:returnvalue=“0”>
    ino:messagelineXQuery Request processing</ino:messageline>
    </ino:message>
    - <xq:result xmlns:xq=“http://namespaces.softwareag.com/tamino/XQuery/result”>
    - xq:object
    -
    -
    -
    i1001
    g1001
    Text…
    chapter

    nl
    false

    -
    -
    1.0.0
    2005-01-12


    -



    Now I’d like to have a query that gives me chunk/* where chunk/meta/identification/id = i1001

    So I tested: http:///tamino/database/chunks?_xquery=for $p in input() where input()/chunk/meta/id=i1001 return $p/chunk/*

    Which gives me a <ino:messagetext ino:code=“INOXQE6360”>Unbound path not allowed here</ino:messagetext>
    ino:messagelineLine 1, column 62: </ino:messageline>

    What am I doing wrong?

    Michel


    #API-Management
    #Tamino
    #webMethods


  • 2.  RE: Help with X-Query...

    Posted 02/11/05 02:55 PM

    Something like this should work:
    for $p in input()/chunk where
    $p/meta/identification/id=“i1001”
    return $p
    HTH


    #webMethods
    #Tamino
    #API-Management


  • 3.  RE: Help with X-Query...

    Posted 02/11/05 04:06 PM

    It doesn’t… sorry…

    Even if I leave out the where-clause it doesn’t return a thing… Any clue?

    Michel


    #webMethods
    #API-Management
    #Tamino


  • 4.  RE: Help with X-Query...

    Posted 02/11/05 05:09 PM

    Could you please post your schema and an xml instance so I can try it.
    Thanks


    #webMethods
    #API-Management
    #Tamino


  • 5.  RE: Help with X-Query...

    Posted 02/14/05 09:12 AM

    Hi Michel and thanks for the information. Your document is in a custom namespace, so the correct form of your XQuery request is:

    declare namespace pre="http://www.nibra.nl/bzk" 
    for $p in input()/pre:chunk 
    where 
    $p/pre:meta/pre:identification/pre:id="0000" 
    return $p


    Your original query worked because it simply asked for everything in collection “chunks”. As soon as you ask specifically for a doctype, your request has to be namespace-correct.
    HTH


    #API-Management
    #webMethods
    #Tamino


  • 6.  RE: Help with X-Query...

    Posted 02/14/05 09:53 AM

    Thank! wouldn’t have thought of that…


    #API-Management
    #webMethods
    #Tamino