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.  Error:can't open file?

    Posted 03/22/03 05:55 AM

    {
    LET $books := document("data/books.xml")//book
    FOR $book IN $books
    LET $chapters := document($book/@href)//chapter
    RETURN

    {$book/title}

    {
    FOR $chapter IN $chapters
    RETURN
    {$chapter/title}

    }


    }


    I'm getting following error

    books.xml and oopXML.xml are both in same directory i.e data

    Are these functions
    id(IDREF), idref(string) implemented in QUIP?
    Your help is greatly appreciated!
    Thanks
    #Tamino
    #API-Management
    #webMethods


  • 2.  RE: Error:can't open file?

    Posted 03/24/03 10:16 AM

    You don’t actually say what the value of @href is. As far as I know, QuiP is always resolving a relative URI relative to the location of the file containing the query. According to the latest specs (borrowed from XSLT) the URI in this case should be resolved relative to the base URI of the node containing the @href attribute - which in effect means relative to the source document containing the reference - but the document() spec was less explicit at the time QuiP was coded.

    As far as I can tell, the id() and idref() functions are not implemented. This is because QuiP has no concept of type annotation for nodes; if there are no nodes annotated as IDs, then these functions are meaningless.

    Michael Kay


    #API-Management
    #webMethods
    #Tamino


  • 3.  RE: Error:can't open file?

    Posted 03/26/03 05:24 PM

    Michael,
    I’am posting my XML file and query again as follows:


    Object-Oriented XML
    Kurt Cagle
    Rene Dubois


    Programming SVG
    Kurt Cagle


    Early Adopter XQuery
    Dan Maharry
    Kurt Cagle
    Rogerio Saran
    Mark Fussel
    Nalleli Lopez



    and depending upon this file I want to run this query


    {
    LET $books := document(“data/books.xml”)//book
    FOR $book IN $books
    LET $chapters := document($book/@href)//chapter
    RETURN

    {$book/title}

    {
    FOR $chapter IN $chapters
    RETURN
    {$chapter/title}

    }


    }


    Now I guess it should take href value (XML file) and try to collect chapter nodes of them.
    Is it not possible to get all href value (xml files) from this query?
    I’m getting following error

    books.xml and oopXML.xml are both in same directory i.e data


    #Tamino
    #webMethods
    #API-Management


  • 4.  RE: Error:can't open file?

    Posted 03/27/03 01:22 PM

    As I suggested in my previous response, QuiP is not implementing the rule that where the first argument to document() is a node, the relative URI is resolved relative to the base URI of that node. Also, QuiP doesn’t provide the second argument to the document() function, and it doesn’t provide the resolve-uri function defined in later XQuery working drafts. So I’m afraid there is no easy workaround to this: the only thing I could suggest would be to preprocess the data files using XSLT to make all URIs absolute.

    I’m afraid this is the downside of using a prototype implementation of a working draft specification.

    Michael Kay


    #API-Management
    #webMethods
    #Tamino