/** * Constructor * @param sequence the sequence to be atomized * @param config the Configuration. Used only for optimization, may be null. Atomization is faster if * it is known in advance that all nodes will be untyped. */ public Atomizer(Expression sequence, Configuration config) { super(sequence); this.config = config; if (config != null) { untyped = (config.areAllNodesUntyped()); computeSingleValued(config.getTypeHierarchy()); } sequence.setFlattened(true); }
/** * Constructor * @param sequence the sequence to be atomized * @param config the Configuration. Used only for optimization, may be null. Atomization is faster if * it is known in advance that all nodes will be untyped. */ public Atomizer(Expression sequence, Configuration config) { super(sequence); this.config = config; if (config != null) { untyped = (config.areAllNodesUntyped()); computeSingleValued(config.getTypeHierarchy()); } sequence.setFlattened(true); }
/** * Constructor * @param sequence the sequence to be atomized * @param config the Configuration. Used only for optimization, may be null. Atomization is faster if * it is known in advance that all nodes will be untyped. */ public Atomizer(Expression sequence, Configuration config) { super(sequence); this.config = config; if (config != null) { untyped = (config.areAllNodesUntyped()); computeSingleValued(config.getTypeHierarchy()); } sequence.setFlattened(true); }
/** * Type-check the expression */ public Expression typeCheck(ExpressionVisitor visitor, ItemType contextItemType) throws XPathException { operand = visitor.typeCheck(operand, contextItemType); // If the configuration allows typed data, check whether the content type of these particular nodes is untyped final TypeHierarchy th = visitor.getConfiguration().getTypeHierarchy(); computeSingleValued(th); visitor.resetStaticProperties(); if (th.isSubType(operand.getItemType(th), BuiltInAtomicType.ANY_ATOMIC)) { return operand; } operand.setFlattened(true); return this; }
/** * Type-check the expression */ public Expression typeCheck(ExpressionVisitor visitor, ItemType contextItemType) throws XPathException { operand = visitor.typeCheck(operand, contextItemType); // If the configuration allows typed data, check whether the content type of these particular nodes is untyped final TypeHierarchy th = visitor.getConfiguration().getTypeHierarchy(); computeSingleValued(th); visitor.resetStaticProperties(); if (th.isSubType(operand.getItemType(th), BuiltInAtomicType.ANY_ATOMIC)) { return operand; } operand.setFlattened(true); return this; }
/** * Type-check the expression */ public Expression typeCheck(ExpressionVisitor visitor, ItemType contextItemType) throws XPathException { operand = visitor.typeCheck(operand, contextItemType); // If the configuration allows typed data, check whether the content type of these particular nodes is untyped final TypeHierarchy th = visitor.getConfiguration().getTypeHierarchy(); computeSingleValued(th); visitor.resetStaticProperties(); if (th.isSubType(operand.getItemType(th), BuiltInAtomicType.ANY_ATOMIC)) { return operand; } operand.setFlattened(true); return this; }
computeSingleValued(th); resetLocalStaticProperties(); ItemType operandType = getOperandItemType();
computeSingleValued(th); resetLocalStaticProperties(); ItemType operandType = getOperandItemType();
computeSingleValued(getConfiguration().getTypeHierarchy()); Expression operand = getBaseExpression().simplify(); if (operand instanceof Literal) {
computeSingleValued(getConfiguration().getTypeHierarchy()); Expression operand = getBaseExpression().simplify(); if (operand instanceof Literal) {