public EvaluationResult evaluate(List inputs, EvaluationCtx context) {
        // Evaluate the arguments
        AttributeValue [] argValues = new AttributeValue[inputs.size()];
        EvaluationResult result = evalArgs(inputs, context, argValues);
        if (result != null)
            return result;

        // Now that we have real values, perform the numeric conversion
        // operation in the manner appropriate for this function.
        switch (getFunctionId()) {
        case ID_STRING_NORMALIZE_SPACE: {
            String str = ((StringAttribute) argValues[0]).getValue();

            // Trim whitespace from start and end of string
            int startIndex = 0;
            int endIndex = str.length() - 1;
            while ((startIndex <= endIndex) &&
                   Character.isWhitespace(str.charAt(startIndex)))
                startIndex++;
            while ((startIndex <= endIndex) &&
                   Character.isWhitespace(str.charAt(endIndex)))
                endIndex--;
            String strResult = str.substring(startIndex, endIndex+1);

            result = new EvaluationResult(new StringAttribute(strResult));
            break;
        }
        case ID_STRING_NORMALIZE_TO_LOWER_CASE: {
            String str = ((StringAttribute) argValues[0]).getValue();

            // Convert string to lower case
            String strResult = str.toLowerCase();

            result = new EvaluationResult(new StringAttribute(strResult));
            break;
        }
        }

        return result;
    }