final Iterator<UserDefinedFunction> itFunctions = compiled.getContext().localFunctions();
final Set<URI> xqueryLocations = new HashSet<URI>();
while(itFunctions.hasNext()) {
final UserDefinedFunction function = itFunctions.next();
final Annotation annotations[] = function.getSignature().getAnnotations();
Set<org.exquery.xquery3.Annotation> functionRestAnnotations = null;
//process the function annotations
for(final Annotation annotation : annotations) {