delete of document by XMLObject, instance does not have a in

Hello, I am try to delete a >(root) document, but get the error XMLObject has no ino:id
First:
1)I setup a TXQuery to select the expected Document
2) Get baxk a XMLObject
3) try to delete by accessor.delete(XMLObject ) to remove the Document
4) Tamino complains : TXMLObject instance does not have an ino:id

Question
What should i do to get the Document deleted (is there a easy way to delete the Document with out changing the Document definition)??
Blease could you also show a example ?Tamino deleting document

Example of the java methode

sb.append(“declare namespace tf = ‘http://namespaces.softwareag.com/tamino/TaminoFunction’ \n”);
sb.append(“declare namespace xf = ‘W3C XQuery 1.0 and XPath 2.0 Functions and Operators’ \n”);
sb.append(“declare namespace xs = ‘XML Schema’ \n”);
sb.append(“for $q in input()/”);
sb.append(docType);
sb.append("\n");
sb.append(“let $a := $q/metadata/lastLoadDate \n”);
sb.append(“let $b := $q/metadata/public \n”);
sb.append(“where xf:string($b) = ‘false’ and $a > xs:dateTime(’”);
sb.append(df.format(notUsedDate));
sb.append("’) \n");
sb.append(“return ($q) \n”);

String sQuery = sb.toString();
int count = 0;
TConnection con = null;
TXMLObjectAccessor accessor = null;
TXMLObject xmlDoc = null;
StringWriter w = new StringWriter();
boolean bo = false;
TResponse resp = null;
try {
con = getConnection();
accessor = getStreamAccessor(con);

resp = accessor.xquery(new TXQuery(sb.toString()));
bo = resp.hasFirstXMLObject();

if (bo == false) {
return count;
}
}
catch (TXQueryException ex1) {
ErrorObject eo = new ErrorObject(this.LAYER, this.BEAN, 11,
sQuery,
“\nXQueryException=<” +
ex1.getClass().getName() + “>” +
“\nMessage=” + ex1.getMessage());
log.error(eo);
try {
con.close();
}
catch (TConnectionCloseException ex) {}
throw new FvzException(eo);
}
TNonXMLObjectIterator tnxIt = resp.getNonXMLObjectIterator() ; //TEST 30-03-2004
TXMLObjectIterator txIt = resp.getXMLObjectIterator();
count = txIt.getCount();
while (txIt.hasNext()) {
try {
xmlDoc = (TXMLObject) txIt.next();
accessor.delete(xmlDoc);

}
catch (TIteratorException ex2) {
ErrorObject eo = new ErrorObject(this.LAYER, this.BEAN, 12,
"delUnusedQueryHitsDoc() " + docType +
" ",
“TIteratonException Message=” +
ex2.getMessage());
log.error(eo);
throw new FvzException(eo);
}
catch (TNoSuchXMLObjectException ex2) {
ErrorObject eo = new ErrorObject(this.LAYER, this.BEAN, 13,
"delUnusedQueryHitsDoc() " + docType +
" ",
“TNoSuchXMLObjectException Message=” +
ex2.getMessage());
log.error(eo);
throw new FvzException(eo);
}
catch (TDeleteException ex3) {
ErrorObject eo = new ErrorObject(this.LAYER, this.BEAN, 14,
"delUnusedQueryHitsDoc() " + docType +
" ",
“TDeleteException Message=” +
ex3.getMessage());
log.error(eo);
throw new FvzException(eo);
}

Hi,
The accessor.delete(xmlDoc) operation expects the xmlDoc to contain an ino:id attribute (so that it can uniquely identify the instance to be deleted). In your case, because you used an XQuery to return the instances, they do not contain ino:id attributes, so this will not work. You could use X-Query to return your documents and then delete them individually, or use the accessor.delete(TQuery) method.
Your problem is hinted at by the fact that there is no accessor.delete(TXQuery) method. Does anyone know of other ways to address this issue using only XQuery and the TaminoAPI4J?