diff --git a/exist-core/src/main/java/org/exist/xquery/functions/inspect/InspectFunctionHelper.java b/exist-core/src/main/java/org/exist/xquery/functions/inspect/InspectFunctionHelper.java index cc654ef99dc..94bc0bd79ea 100644 --- a/exist-core/src/main/java/org/exist/xquery/functions/inspect/InspectFunctionHelper.java +++ b/exist-core/src/main/java/org/exist/xquery/functions/inspect/InspectFunctionHelper.java @@ -63,7 +63,7 @@ public static int generateDocs(final FunctionSignature sig, final UserDefinedFun XQDocHelper.parse(sig); final AttributesImpl attribs = new AttributesImpl(); - attribs.addAttribute("", "name", "name", "CDATA", sig.getName().toString()); + attribs.addAttribute("", "name", "name", "CDATA", sig.getName().getStringValue()); attribs.addAttribute("", "module", "module", "CDATA", sig.getName().getNamespaceURI()); final int nodeNr = builder.startElement(FUNCTION_QNAME, attribs); writeParameters(sig, builder); @@ -130,7 +130,7 @@ private static void writeAnnotations(final FunctionSignature signature, final Me final AttributesImpl attribs = new AttributesImpl(); 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(); @@ -166,7 +166,7 @@ private static void generateDependencies(final UserDefinedFunction function, fin final AttributesImpl attribs = new AttributesImpl(); for (final FunctionSignature signature : signatures) { attribs.clear(); - attribs.addAttribute(null, "name", "name", "CDATA", signature.getName().toString()); + attribs.addAttribute(null, "name", "name", "CDATA", signature.getName().getStringValue()); attribs.addAttribute("", "module", "module", "CDATA", signature.getName().getNamespaceURI()); attribs.addAttribute("", "arity", "arity", "CDATA", Integer.toString(signature.getArgumentCount())); diff --git a/exist-core/src/main/java/org/exist/xquery/functions/inspect/InspectModule.java b/exist-core/src/main/java/org/exist/xquery/functions/inspect/InspectModule.java index af760ffc53b..c9862a6626f 100644 --- a/exist-core/src/main/java/org/exist/xquery/functions/inspect/InspectModule.java +++ b/exist-core/src/main/java/org/exist/xquery/functions/inspect/InspectModule.java @@ -117,7 +117,7 @@ public Sequence eval(final Sequence[] args, final Sequence contextSequence) thro // variables for (final VariableDeclaration var : externalModule.getVariableDeclarations()) { attribs.clear(); - attribs.addAttribute("", "name", "name", "CDATA", var.getName().toString()); + attribs.addAttribute("", "name", "name", "CDATA", var.getName().getStringValue()); final SequenceType type = var.getSequenceType(); if (type != null) { attribs.addAttribute("", "type", "type", "CDATA", Type.getTypeName(type.getPrimaryType()));