String xupdateInsertAfter = null;
if (parent) {
xa = getAttributes(request.getParameter(pname), xa.tagID);
xupdateInsertAfter = "<xupdate:insert-after select=\"" + select
+ " \"><xupdate:element name=\""
+ new XPath(select).getNameWithoutPredicates() + "\"" + namespaceAttribute
+ ">" + xa.xupdateAttrExpr + removeParent(request.getParameter(pname))
+ "</xupdate:element></xupdate:insert-after>";
} else {
xupdateInsertAfter = "<xupdate:insert-after select=\"" + select
+ " \"><xupdate:element name=\""
+ new XPath(select).getNameWithoutPredicates() + "\"" + namespaceAttribute
+ ">" + xa.xupdateAttrExpr + request.getParameter(pname)
+ "</xupdate:element></xupdate:insert-after>";
}
getLogger().debug(".update(): Update Node (insert-after): " + xupdateInsertAfter);
String xupdateRemove = "<xupdate:remove select=\"" + select + " \"/>";
getLogger().debug(".update(): Update Node (remove): " + xupdateRemove);
String xupdateUpdateAttribute = "<xupdate:update select=\""
+ new XPath(select).removePredicates(select) + "[@tagID='temp']/@tagID"
+ " \">" + xa.tagID + "</xupdate:update>";
getLogger().debug(".update(): Update Node (update tagID attribute): "
+ xupdateUpdateAttribute);
return "<xupdate:modifications xmlns:xupdate=\"http://www.xmldb.org/xupdate\">"