final Sequence result = new ValueSequence();
// Check input parameters
if (args.length == 0) {
final String uuid = UUIDGenerator.getUUIDversion4();
result.add(new StringValue(uuid));
} else if (args.length == 1) {
final String parameter = args[0].getStringValue();
final String uuid = UUIDGenerator.getUUIDversion3(parameter);
result.add(new StringValue(uuid));
} else {
logger.error("Not a supported number of parameters");
throw new XPathException("Not a supported number of parameters");
}