/** * Issue a warning message * * @param message the message * @param locator the query/stylesheet location associated with the message */ public void issueWarning(String message, Location locator) { if (!isSuppressWarnings()) { staticContext.issueWarning(message, locator); } }
/** * Issue a warning message * * @param message the message * @param locator the query/stylesheet location associated with the message */ public void issueWarning(String message, Location locator) { if (!isSuppressWarnings()) { staticContext.issueWarning(message, locator); } }
/** * Output a warning message * @param message the text of the message */ protected void warning(String message) throws XPathException { String s = t.recentText(); int line = t.getLineNumber(); String lineInfo = (line==1 ? "" : ("on line " + line + ' ')); String prefix = lineInfo + (message.startsWith("...") ? "near" : "in") + ' ' + Err.wrap(s) + ":\n "; env.issueWarning(prefix + message, null); }
/** * Output a warning message * @param message the text of the message */ protected void warning(String message) throws XPathException { String s = t.recentText(); int line = t.getLineNumber(); String lineInfo = (line==1 ? "" : ("on line " + line + ' ')); String prefix = lineInfo + (message.startsWith("...") ? "near" : "in") + ' ' + Err.wrap(s) + ":\n "; env.issueWarning(prefix + message, null); }
/** * Output a warning message * * @param message the text of the message */ protected void warning(String message) { if (!env.getConfiguration().getBooleanProperty(Feature.SUPPRESS_XPATH_WARNINGS)) { String s = t.recentText(-1); String prefix = (message.startsWith("...") ? "near" : "in") + ' ' + Err.wrap(s) + ":\n "; env.issueWarning(prefix + message, makeLocation()); } }
/** * Output a warning message * * @param message the text of the message */ protected void warning(String message) { if (!env.getConfiguration().getBooleanProperty(Feature.SUPPRESS_XPATH_WARNINGS)) { String s = t.recentText(-1); String prefix = (message.startsWith("...") ? "near" : "in") + ' ' + Err.wrap(s) + ":\n "; env.issueWarning(prefix + message, makeLocation()); } }
visitor.getStaticContext().issueWarning( "Cannot resolve relative collation URI " + coll, c.getLocation());
visitor.getStaticContext().issueWarning( "Cannot resolve relative collation URI " + coll, c.getLocation());
public Expression optimize(ExpressionVisitor visitor, ContextItemStaticInfo contextInfo) throws XPathException { Configuration config = visitor.getConfiguration(); selectOp.optimize(visitor, contextInfo); regexOp.optimize(visitor, contextInfo); flagsOp.optimize(visitor, contextInfo); if (matchingOp != null) { matchingOp.optimize(visitor, config.makeContextItemStaticInfo(BuiltInAtomicType.STRING, false)); } if (nonMatchingOp != null) { nonMatchingOp.optimize(visitor, config.makeContextItemStaticInfo(BuiltInAtomicType.STRING, false)); } List<String> warnings = new ArrayList<>(); precomputeRegex(config, warnings); for (String w : warnings) { visitor.getStaticContext().issueWarning(w, getLocation()); } return this; }
arg -> arg.getCardinality() == StaticProperty.EXACTLY_ONE && arg.getItemType() == BuiltInAtomicType.BOOLEAN)) { visitor.getStaticContext().issueWarning( "Did you intend to apply string concatenation to boolean operands? " + "Perhaps you intended 'or' rather than '||'. "
arg -> arg.getCardinality() == StaticProperty.EXACTLY_ONE && arg.getItemType() == BuiltInAtomicType.BOOLEAN)) { visitor.getStaticContext().issueWarning( "Did you intend to apply string concatenation to boolean operands? " + "Perhaps you intended 'or' rather than '||'. "
public void typeCheck(ExpressionVisitor visitor, ContextItemStaticInfo contextInfo) throws XPathException { try { setChildExpression(getChildExpression().typeCheck(visitor, contextInfo)); } catch (XPathException e) { e.maybeSetLocation(getChildExpression().getLocation()); if (!e.isReportableStatically()) { visitor.getStaticContext().issueWarning( "Evaluation will always throw a dynamic error: " + e.getMessage(), getChildExpression().getLocation()); setChildExpression(new ErrorExpression(e)); } else { throw e; } } }
public void optimize(ExpressionVisitor visitor, ContextItemStaticInfo contextInfo) throws XPathException { try { setChildExpression(getChildExpression().optimize(visitor, contextInfo)); } catch (XPathException e) { e.maybeSetLocation(getChildExpression().getLocation()); if (!e.isReportableStatically()) { visitor.getStaticContext().issueWarning( "Evaluation will always throw a dynamic error: " + e.getMessage(), getChildExpression().getLocation()); setChildExpression(new ErrorExpression(e)); } else { throw e; } } }
public void optimize(ExpressionVisitor visitor, ContextItemStaticInfo contextInfo) throws XPathException { try { setChildExpression(getChildExpression().optimize(visitor, contextInfo)); } catch (XPathException e) { e.maybeSetLocation(getChildExpression().getLocation()); if (!e.isReportableStatically()) { visitor.getStaticContext().issueWarning( "Evaluation will always throw a dynamic error: " + e.getMessage(), getChildExpression().getLocation()); setChildExpression(new ErrorExpression(e)); } else { throw e; } } }
public void typeCheck(ExpressionVisitor visitor, ContextItemStaticInfo contextInfo) throws XPathException { try { setChildExpression(getChildExpression().typeCheck(visitor, contextInfo)); } catch (XPathException e) { e.maybeSetLocation(getChildExpression().getLocation()); if (!e.isReportableStatically()) { visitor.getStaticContext().issueWarning( "Evaluation will always throw a dynamic error: " + e.getMessage(), getChildExpression().getLocation()); setChildExpression(new ErrorExpression(e)); } else { throw e; } } }
visitor.getStaticContext().issueWarning("The only value that can pass type-checking is an empty sequence. " + message, this); } else if (requiredItemType.equals(BuiltInAtomicType.STRING) && th.isSubType(supplied, BuiltInAtomicType.ANY_URI)) {
visitor.getStaticContext().issueWarning("The only value that can pass type-checking is an empty sequence. " + message, this); } else if (requiredItemType.equals(BuiltInAtomicType.STRING) && th.isSubType(supplied, BuiltInAtomicType.ANY_URI)) {
visitor.getStaticContext().issueWarning("The only value that can pass type-checking is an empty sequence. " + message, this); } else if (requiredItemType.equals(BuiltInAtomicType.STRING) && th.isSubType(supplied, BuiltInAtomicType.ANY_URI)) {
&& declaredResultType.getPrimaryType().isAtomicType() && declaredResultType.getPrimaryType() != BuiltInAtomicType.STRING) { visitor.getStaticContext().issueWarning( "A function that computes atomic values should use xsl:sequence rather than xsl:value-of", getLocation());
&& declaredResultType.getPrimaryType().isAtomicType() && declaredResultType.getPrimaryType() != BuiltInAtomicType.STRING) { visitor.getStaticContext().issueWarning( "A function that computes atomic values should use xsl:sequence rather than xsl:value-of", getLocation());