}
public Sequence eval(Sequence[] args, Sequence contextSequence)
throws XPathException {
final Profiler profiler = context.getProfiler();
if (isCalledAs("enable-profiling")) {
final int verbosity = ((IntegerValue)args[0].itemAt(0)).getInt();
profiler.setEnabled(true);
profiler.setVerbosity(verbosity);
} else {
profiler.setEnabled(false);
}
return Sequence.EMPTY_SEQUENCE;
}