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

java api/x-plorer xquery result mismatch

  • 1.  java api/x-plorer xquery result mismatch

    Posted Wed July 13, 2005 09:01 PM

    Problem overlooking something very basic here, but there’s a mismatch between what I get in X-Plorer and what I get in the Java API using the same query.

    I’ve got a collection of documents of the following structure:

    blah

    I’m trying to retrieve the contents of the “text” element node. The following query works correctly in X-Plorer:
    for $q in input()/ClinicalDocument/component/StructuredBody/component/section
    let $t := $q/:text
    where $q/code[@code="40471"]
    return $t

    This query (in X-Plorer) returns the correct 42 matching nodes. However, when run through the Java API, it returns 42 documents, each of which contains the 42 matching nodes. I could, of course, just take the first document returned by the iterator, but that seems a bit hacky. Any suggestions as to why there is a mismatch, and how I can fix the query to return a single document containing the matching nodes?

    Thanks in advance.


    #webMethods
    #API-Management
    #webMethods-Tamino-XML-Server-APIs