/** * Convert the pattern to a typed pattern, in which an element name is treated as * schema-element(N) * * @param val either "strict" or "lax" depending on the value of xsl:mode/@typed * @return either the original pattern unchanged, or a new pattern as the result of the * conversion * @throws net.sf.saxon.trans.XPathException if the pattern cannot be converted */ @Override public Pattern convertToTypedPattern(String val) throws XPathException { Pattern b2 = getBasePattern().convertToTypedPattern(val); if (b2 == getBasePattern()) { return this; } else { return new BasePatternWithPredicate(b2, getPredicate()); } }
/** * Convert the pattern to a typed pattern, in which an element name is treated as * schema-element(N) * * @param val either "strict" or "lax" depending on the value of xsl:mode/@typed * @return either the original pattern unchanged, or a new pattern as the result of the * conversion * @throws net.sf.saxon.trans.XPathException if the pattern cannot be converted */ @Override public Pattern convertToTypedPattern(String val) throws XPathException { Pattern b2 = getBasePattern().convertToTypedPattern(val); if (b2 == getBasePattern()) { return this; } else { return new BasePatternWithPredicate(b2, getPredicate()); } }
/** * Copy a pattern. This makes a deep copy. * * @return the copy of the original pattern * @param rebindings variables that need to be re-bound */ /*@NotNull*/ public Pattern copy(RebindingMap rebindings) { BasePatternWithPredicate n = new BasePatternWithPredicate( getBasePattern().copy(rebindings), getPredicate().copy(rebindings)); ExpressionTool.copyLocationInfo(this, n); return n; }
/** * Copy a pattern. This makes a deep copy. * * @return the copy of the original pattern * @param rebindings variables that need to be re-bound */ /*@NotNull*/ public Pattern copy(RebindingMap rebindings) { BasePatternWithPredicate n = new BasePatternWithPredicate( getBasePattern().copy(rebindings), getPredicate().copy(rebindings)); ExpressionTool.copyLocationInfo(this, n); return n; }
BasePatternWithPredicate pp = new BasePatternWithPredicate( new NodeTestPattern(new MultipleNodeKindTest(UType.ELEMENT_OR_ATTRIBUTE)), IntegratedFunctionLibrary.makeFunctionCall(new IsIdRef(), new Expression[]{})
BasePatternWithPredicate pp = new BasePatternWithPredicate( new NodeTestPattern(new MultipleNodeKindTest(UType.ELEMENT_OR_ATTRIBUTE)), IntegratedFunctionLibrary.makeFunctionCall(new IsIdRef(), new Expression[]{})
Pattern basePattern = base.toPattern(config); if (!isPositional(th)) { return new BasePatternWithPredicate(basePattern, filter); } else if (basePattern instanceof NodeTestPattern && basePattern.getItemType() instanceof NodeTest &&
Pattern basePattern = base.toPattern(config); if (!isPositional(th)) { return new BasePatternWithPredicate(basePattern, filter); } else if (basePattern instanceof NodeTestPattern && basePattern.getItemType() instanceof NodeTest &&
throw e2; } else { Pattern p = new BasePatternWithPredicate( new NodeTestPattern(ErrorType.getInstance()), new ErrorExpression(err)); p.setLocation(allocateLocation());
throw e2; } else { Pattern p = new BasePatternWithPredicate( new NodeTestPattern(ErrorType.getInstance()), new ErrorExpression(err)); p.setLocation(allocateLocation());