public Item evaluateItem(XPathContext c) throws XPathException {
NodeInfo target;
if (argument.length > 1) {
target = (NodeInfo)argument[1].evaluateItem(c);
} else {
Item current = c.getContextItem();
if (current==null) {
dynamicError("The context item for lang() is undefined", "XPDY0002", c);
}
if (!(current instanceof NodeInfo)) {
dynamicError("The context item for lang() is not a node", "XPDY0002", c);
}
target = (NodeInfo)current;
}
final Item arg0Val = argument[0].evaluateItem(c);
final String testLang = (arg0Val==null ? "" : arg0Val.getStringValue());
boolean b = isLang(testLang, target);
return BooleanValue.get(b);
}