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
Expand all | Collapse all

Retrieving the nonXML object along with the XML document

  • 1.  Retrieving the nonXML object along with the XML document

    Posted Mon August 09, 2004 11:30 PM

    Hi,
    I have a number of XML documents that have a number of images associated with these documents. I want to run an Xquery to retrieve the XML document but at the same time I’d like to retrieve all relevant images. Is there a way to do that? Do I need the nonXML indexer to do this? Currently I’ve loaded the nonXML documents into Tamino but these images are associated with the entire collection not the individual XML document.
    Thanks in advance.


    #webMethods
    #API-Management
    #Tamino


  • 2.  RE: Retrieving the nonXML object along with the XML document

    Posted Thu August 12, 2004 05:14 PM

    This does not involve the non-XML indexer at all. To retrieve a non-XML object from Tamino, you use the ino:id or the docname. You can do a simple HTTP GET request ? for example, if your database URL is “http://example.com/tamino/mydb”, the document you want is in collection “my-coll”, the doctype is “nonXML”, and it has ino:id “5” and docname “myDoc.nx”, you can enter either “http://example.com/tamino/mydb/my-coll/nonXML/@5” or “http://example.com/tamino/mydb/my-coll/nonXML/myDoc.nx” in the location bar of any browser. You can also use X-Query from one of the API’s; for example, in the Tamino API for Java:
    TQuery query=TQuery.newInstance(“nonXML[@ino:id=5]”);

    What the non-XML indexer does is create an XML “shadow” document containing the text from the non-XML document, and store it with text indices. Then a query can find the shadow document using full text search, and then provide the ino:id for retrieving the non-XML document.


    #webMethods
    #API-Management
    #Tamino