e.setXPathContext(context);
e.setLocator(this);
if (argument.length > 2) {
Value errorObject = ((Value)SequenceExtent.makeSequenceExtent(argument[2].iterate(context))).reduce();
if (errorObject instanceof SingletonItem) {
Item root = ((SingletonItem)errorObject).getItem();
if ((root instanceof NodeInfo) && ((NodeInfo)root).getNodeKind() == Type.DOCUMENT) {
XPathEvaluator xpath = new XPathEvaluator();
XPathExpression exp = xpath.createExpression("/error/@module");
NodeInfo moduleAtt = (NodeInfo)exp.evaluateSingle((NodeInfo)root);
String module = (moduleAtt == null ? null : moduleAtt.getStringValue());