how to get ino:id with xqueryresults?


I’ve tried to get some results by performing a standard xquery to the database. Since the mentioned methods in the examples require either ino:docname or ino:id and I do not know them, I had to get the queryresults via a dataset. I did this:

public static XmlDocument GetXmlViaDataSet(string url, string collection, string queryString, string name)     //Liest Ergebnisse eines querys in ein XMLDocument

            TaminoDataAdapter adapter = new TaminoDataAdapter(url, collection);
            adapter.Behavior = TaminoAdapterBehavior.ReadOnly;

            DataSet ds = new DataSet(name);
            string query2 = "input()" + queryString; 
            TaminoQuery tamQuery = new TaminoQuery(queryString);
            int count = adapter.Fill(ds, tamQuery);
            XmlDocument xdoc = new XmlDocument();

            XmlDeclaration dec = xdoc.CreateXmlDeclaration("1.0", "utf-8","");
            return xdoc;

What I get is an xmldoucument, with all the results inside - just what I needed. I can perform a xslt Transformation with the result to show the XMLDocument as a HTML Table for example.
Problem is, that I want to have the ability to click on one of my results to edit them. But to do so, I’d need either the ino:id or the ino:documentname property of the element I want to edit…

But, since I got the result via query and the dataset, no such information is available, this means that I have no reference at all and so I can’t get the specific element for editing.
Is there a way to get the results via a query from tamino, maybe as single Taminodocument each, so that I can access the needed properties?

What I want is a method that returns each element as a Taminodocument,
with no more parameters than the ones given here:

public static TaminoDocument[] GetTaminoDocuments(string url, string collection, string queryString)

Is this possible?

I think that you can emulate this behavior using tf:getInoId + tf:getDocname in the XQuery.

This is hinted at the example under Processing Document Lists here:

thanks for your quick reply. I will have a look at this now!