/** * Convert the value to a string. The resulting string is the lexical form of the QName, * using the original prefix if there was one. */ public String toString() { return sqName.getDisplayName(); }
/** * Get a description of this function for use in error messages. For named functions, the description * is the function name (as a lexical QName). For others, it might be, for example, "inline function", * or "partially-applied ends-with function". * * @return a description of the function for use in error messages */ public String getDescription() { return details.name.getDisplayName(); }
/** * Get a name identifying the kind of expression, in terms meaningful to a user. * * @return a name identifying the kind of expression, in terms meaningful to a user. * The name will always be in the form of a lexical XML QName, and should match the name used * in explain() output displaying the expression. */ public String getExpressionName() { return "$" + name.getDisplayName(); }
/** * Get the display name of the variable. This is taken from the variable binding if possible * * @return the display name (a lexical QName */ public String getDisplayName() { if (binding != null) { return binding.getVariableQName().getDisplayName(); } else { return variableName.getDisplayName(); } }
/** * Get a description of this function for use in error messages. For named functions, the description * is the function name (as a lexical QName). For others, it might be, for example, "inline function", * or "partially-applied ends-with function". * * @return a description of the function for use in error messages */ @Override public String getDescription() { return getFunctionQName().getDisplayName(); }
/** * Get the name as a string. * @return a string typically in the form "template p:my-template" or "function f:my-function#2" */ public String toString() { //noinspection UnnecessaryParentheses return StandardNames.getLocalName(kind) + " " + name.getDisplayName(); }
/** * Get the name of the function for display in messages * * @return the name of the function as a lexical QName */ public final String getDisplayName() { StructuredQName fName = getFunctionName(); return fName == null ? "(anonymous)" : fName.getDisplayName(); }
/** * Get the display form of a name (the QName), given its name code or fingerprint * * @param nameCode the integer name code or fingerprint of a name in the name pool * @return the corresponding lexical QName (if a fingerprint was supplied, this will * simply be the local name) */ public String getDisplayName(int nameCode) { return getStructuredQName(nameCode).getDisplayName(); }
/** * Get an identifier for the mode for use in error messages * @return either the string "the unnamed mode" or the string "mode NNNN" where "NNNN" * is the display form of the mode's name. */ public String getLabel() { return isUnnamedMode() ? "the unnamed mode" : "mode " + modeName.getDisplayName(); }
/** * Get a description of this function for use in error messages. For named functions, the description * is the function name (as a lexical QName). For others, it might be, for example, "inline function", * or "partially-applied ends-with function". * * @return a description of the function for use in error messages */ public String getDescription() { return getFunctionName().getDisplayName(); }
/** * Produce a short string identifying the expression for use in error messages * * @return a short string, sufficient to identify the expression */ @Override public String toShortString() { return "$" + getVariableQName().getDisplayName(); }
/** * Display a representation of the stack frame on the specified output stream * @param out the output stream */ public void print(PrintStream out) { String name = templateName == null ? "??" : templateName.getDisplayName(); out.println(" at xsl:call-template name=\"" + name + "\" (" + getSystemId() + "#" + getLineNumber() + ")"); } }
/** * Provide a short string showing the contents of the item, suitable * for use in error messages * * @return a depiction of the item suitable for use in error messages */ @Override public String toShortString() { return getFunctionName().getDisplayName() + '#' + getArity(); }
public RoleDiagnostic makeRoleDiagnostic() { RoleDiagnostic role = new RoleDiagnostic(RoleDiagnostic.FUNCTION, getFunctionName().getDisplayName(), 0); role.setErrorCode(getErrorCodeForTypeErrors()); return role; }
public void setVariableBinding(int role, LocalVariableBinding binding) throws XPathException { for (Iterator<LocalVariableBinding> iter = windowVars.valueIterator(); iter.hasNext(); ) { if (iter.next().getVariableQName().equals(binding.getVariableQName())) { throw new XPathException("Two variables in a window clause cannot have the same name (" + binding.getVariableQName().getDisplayName() + ")", "XQST0103"); } } windowVars.put(role, binding); }
public String toString() { FastStringBuffer fsb = new FastStringBuffer(FastStringBuffer.C64); fsb.append("count $"); fsb.append(rangeVariable.getVariableQName().getDisplayName()); return fsb.toString(); } }
@Override public String toShortString() { return "for $" + getVariableQName().getDisplayName() + " in " + (getSequence() == null ? "(...)" : getSequence().toShortString()) + " return " + (getAction() == null ? "(...)" : getAction().toShortString()); }
public String toShortString() { FastStringBuffer fsb = new FastStringBuffer(FastStringBuffer.C64); fsb.append("let $"); fsb.append(rangeVariable.getVariableQName().getDisplayName()); fsb.append(" := "); fsb.append(getSequence().toShortString()); return fsb.toString(); }
/** * Type-check the expression */ public void typeCheck(ExpressionVisitor visitor, ContextItemStaticInfo contextInfo) throws XPathException { RoleDiagnostic role = new RoleDiagnostic(RoleDiagnostic.VARIABLE, rangeVariable.getVariableQName().getDisplayName(), 0); setSequence(TypeChecker.strictTypeCheck( getSequence(), rangeVariable.getRequiredType(), role, visitor.getStaticContext())); evaluator = ExpressionTool.lazyEvaluator(getSequence(), true); }
public String toString() { FastStringBuffer fsb = new FastStringBuffer(FastStringBuffer.C64); fsb.append("let $"); fsb.append(rangeVariable.getVariableQName().getDisplayName()); fsb.append(" := "); fsb.append(getSequence().toString()); return fsb.toString(); } }