# HG changeset patch # User Sascha L. Teichmann # Date 1403779480 -7200 # Node ID 6d5cbd69511acb3deb90c15d301e155a279475e7 # Parent d1cfd23e35cd58b5ade1d1d6d4bed35f92063ee2 Added dc:lowercase() dc:uppercase() diff -r d1cfd23e35cd -r 6d5cbd69511a artifacts/src/main/java/org/dive4elements/river/artifacts/datacage/templating/FunctionResolver.java --- a/artifacts/src/main/java/org/dive4elements/river/artifacts/datacage/templating/FunctionResolver.java Wed Jun 25 15:40:44 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/datacage/templating/FunctionResolver.java Thu Jun 26 12:44:40 2014 +0200 @@ -86,6 +86,20 @@ functions = new HashMap(); + addFunction("lowercase", 1, new XPathFunction() { + @Override + public Object evaluate(List args) throws XPathFunctionException { + return args.get(0).toString().toLowerCase(); + } + }); + + addFunction("uppercase", 1, new XPathFunction() { + @Override + public Object evaluate(List args) throws XPathFunctionException { + return args.get(0).toString().toUpperCase(); + } + }); + addFunction("contains", 2, new XPathFunction() { @Override public Object evaluate(List args) throws XPathFunctionException {