diff --git a/exist-core/src/main/java/org/exist/xquery/functions/util/DescribeFunction.java b/exist-core/src/main/java/org/exist/xquery/functions/util/DescribeFunction.java index e91c81523d1..343c86a06bb 100644 --- a/exist-core/src/main/java/org/exist/xquery/functions/util/DescribeFunction.java +++ b/exist-core/src/main/java/org/exist/xquery/functions/util/DescribeFunction.java @@ -199,7 +199,7 @@ private void writeAnnotations(FunctionSignature signature, MemTreeBuilder builde if (annots != null) { for (final Annotation annot : annots) { attribs.clear(); - attribs.addAttribute(null, "name", "name", "CDATA", annot.getName().toString()); + attribs.addAttribute(null, "name", "name", "CDATA", annot.getName().getStringValue()); attribs.addAttribute(null, "namespace", "namespace", "CDATA", annot.getName().getNamespaceURI()); builder.startElement(ANNOTATION_QNAME, attribs); final LiteralValue[] value = annot.getValue();