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.
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.