/** * Pre-evaluate the function * @param visitor an expression visitor */ public Expression preEvaluate(ExpressionVisitor visitor) throws XPathException { String s = visitor.getStaticContext().getDefaultCollationName(); return new StringLiteral(s); }
/** * Pre-evaluate the function * @param visitor an expression visitor */ public Expression preEvaluate(ExpressionVisitor visitor) throws XPathException { String s = visitor.getStaticContext().getDefaultCollationName(); return new StringLiteral(s); }
/** * Pre-evaluate the function * @param visitor an expression visitor */ public Expression preEvaluate(ExpressionVisitor visitor) throws XPathException { String s = visitor.getStaticContext().getDefaultCollationName(); return new StringLiteral(s); }
String collationName = env.getDefaultCollationName(); URI collationURI; try {
String collationName = env.getDefaultCollationName(); URI collationURI; try {
public RetainedStaticContext(StaticContext sc) { this.config = sc.getConfiguration(); this.packageData = sc.getPackageData(); if (sc.getStaticBaseURI() != null) { staticBaseUriString = sc.getStaticBaseURI(); try { this.staticBaseUri = ExpressionTool.getBaseURI(sc, null, true); } catch (XPathException e) { staticBaseUri = null; } } this.defaultCollationName = sc.getDefaultCollationName(); this.decimalFormatManager = sc.getDecimalFormatManager(); this.defaultElementNamespace = sc.getDefaultElementNamespace(); defaultFunctionNamespace = sc.getDefaultFunctionNamespace(); backwardsCompatibility = sc.isInBackwardsCompatibleMode(); if (Version.platform.JAXPStaticContextCheck(this, sc)) { //updated in method } else { this.namespaces = new HashMap<>(4); NamespaceResolver resolver = sc.getNamespaceResolver(); for (Iterator<String> it = resolver.iteratePrefixes(); it.hasNext(); ) { String prefix = it.next(); if (!prefix.equals("xml")) { namespaces.put(prefix, resolver.getURIForPrefix(prefix, true)); } } } }
public RetainedStaticContext(StaticContext sc) { this.config = sc.getConfiguration(); this.packageData = sc.getPackageData(); if (sc.getStaticBaseURI() != null) { staticBaseUriString = sc.getStaticBaseURI(); try { this.staticBaseUri = ExpressionTool.getBaseURI(sc, null, true); } catch (XPathException e) { staticBaseUri = null; } } this.defaultCollationName = sc.getDefaultCollationName(); this.decimalFormatManager = sc.getDecimalFormatManager(); this.defaultElementNamespace = sc.getDefaultElementNamespace(); defaultFunctionNamespace = sc.getDefaultFunctionNamespace(); backwardsCompatibility = sc.isInBackwardsCompatibleMode(); if (Version.platform.JAXPStaticContextCheck(this, sc)) { //updated in method } else { this.namespaces = new HashMap<>(4); NamespaceResolver resolver = sc.getNamespaceResolver(); for (Iterator<String> it = resolver.iteratePrefixes(); it.hasNext(); ) { String prefix = it.next(); if (!prefix.equals("xml")) { namespaces.put(prefix, resolver.getURIForPrefix(prefix, true)); } } } }
String collationName = env.getDefaultCollationName(); URI collationURI; try {
String collationName = env.getDefaultCollationName(); URI collationURI; try {
/** * Type-check the expression * @return the checked expression */ public Expression typeCheck(ExpressionVisitor visitor, ItemType contextItemType) throws XPathException { operand0 = visitor.typeCheck(operand0, contextItemType); operand1 = visitor.typeCheck(operand1, contextItemType); StaticContext env = visitor.getStaticContext(); StringCollator comp = env.getCollation(env.getDefaultCollationName()); if (comp==null) { comp = CodepointCollator.getInstance(); } XPathContext context = env.makeEarlyEvaluationContext(); comparer = new GenericAtomicComparer(comp, context); // evaluate the expression now if both arguments are constant if ((operand0 instanceof Literal) && (operand1 instanceof Literal)) { return Literal.makeLiteral((AtomicValue)evaluateItem(context)); } return this; }
sortSpec.ascending = true; sortSpec.emptyLeast = ((QueryModule)env).isEmptyLeast(); sortSpec.collation = env.getDefaultCollationName();
/** * Type-check the expression * @return the checked expression */ public Expression typeCheck(ExpressionVisitor visitor, ItemType contextItemType) throws XPathException { operand0 = visitor.typeCheck(operand0, contextItemType); operand1 = visitor.typeCheck(operand1, contextItemType); StaticContext env = visitor.getStaticContext(); StringCollator comp = env.getCollation(env.getDefaultCollationName()); if (comp==null) { comp = CodepointCollator.getInstance(); } XPathContext context = env.makeEarlyEvaluationContext(); comparer = new GenericAtomicComparer(comp, context); // evaluate the expression now if both arguments are constant if ((operand0 instanceof Literal) && (operand1 instanceof Literal)) { return Literal.makeLiteral((AtomicValue)evaluateItem(context)); } return this; }
String uri = env.getDefaultCollationName(); stringCollator = env.getCollation(uri);
String uri = env.getDefaultCollationName(); stringCollator = env.getCollation(uri);
String uri = env.getDefaultCollationName(); stringCollator = env.getCollation(uri);
sortSpec.ascending = true; sortSpec.emptyLeast = ((QueryModule) env).isEmptyLeast(); sortSpec.collation = env.getDefaultCollationName();
sortSpec.ascending = true; sortSpec.emptyLeast = ((QueryModule) env).isEmptyLeast(); sortSpec.collation = env.getDefaultCollationName();
/** * Type-check the expression * * @return the checked expression */ /*@NotNull*/ public Expression typeCheck(ExpressionVisitor visitor, ContextItemStaticInfo contextInfo) throws XPathException { getLhs().typeCheck(visitor, contextInfo); getRhs().typeCheck(visitor, contextInfo); StaticContext env = visitor.getStaticContext(); StringCollator comp = visitor.getConfiguration().getCollation(env.getDefaultCollationName()); if (comp == null) { comp = CodepointCollator.getInstance(); } XPathContext context = env.makeEarlyEvaluationContext(); comparer = new GenericAtomicComparer(comp, context); // evaluate the expression now if both arguments are constant if ((getLhsExpression() instanceof Literal) && (getRhsExpression() instanceof Literal)) { return Literal.makeLiteral(evaluateItem(context), this); } return this; }
/** * Type-check the expression * * @return the checked expression */ /*@NotNull*/ public Expression typeCheck(ExpressionVisitor visitor, ContextItemStaticInfo contextInfo) throws XPathException { getLhs().typeCheck(visitor, contextInfo); getRhs().typeCheck(visitor, contextInfo); StaticContext env = visitor.getStaticContext(); StringCollator comp = visitor.getConfiguration().getCollation(env.getDefaultCollationName()); if (comp == null) { comp = CodepointCollator.getInstance(); } XPathContext context = env.makeEarlyEvaluationContext(); comparer = new GenericAtomicComparer(comp, context); // evaluate the expression now if both arguments are constant if ((getLhsExpression() instanceof Literal) && (getRhsExpression() instanceof Literal)) { return Literal.makeLiteral(evaluateItem(context), this); } return this; }
public Expression typeCheck(ExpressionVisitor visitor, ContextItemStaticInfo contextInfo) throws XPathException { StaticContext env = visitor.getStaticContext(); String defaultCollationName = env.getDefaultCollationName(); final Configuration config = visitor.getConfiguration(); StringCollator collation = config.getCollation(defaultCollationName);