/** * Copy an expression. This makes a deep copy. * * @return the copy of the original expression * @param rebindings variables that need to be re-bound */ /*@NotNull*/ public Expression copy(RebindingMap rebindings) { AtomicSequenceConverter atomicConverter = new AtomicSequenceConverter(getBaseExpression().copy(rebindings), requiredItemType); ExpressionTool.copyLocationInfo(this, atomicConverter); atomicConverter.setConverter(converter); atomicConverter.setRoleDiagnostic(getRoleDiagnostic()); return atomicConverter; }
/** * Copy an expression. This makes a deep copy. * * @return the copy of the original expression * @param rebindings variables that need to be re-bound */ /*@NotNull*/ public Expression copy(RebindingMap rebindings) { AtomicSequenceConverter atomicConverter = new AtomicSequenceConverter(getBaseExpression().copy(rebindings), requiredItemType); ExpressionTool.copyLocationInfo(this, atomicConverter); atomicConverter.setConverter(converter); atomicConverter.setRoleDiagnostic(getRoleDiagnostic()); return atomicConverter; }
/** * Diagnostic print of expression structure. The abstract expression tree * is written to the supplied output destination. */ public void export(ExpressionPresenter destination) throws XPathException { destination.startElement("convert", this); destination.emitAttribute("from", getBaseExpression().getItemType().toExportString()); destination.emitAttribute("to", requiredItemType.toExportString()); if (converter instanceof Converter.PromoterToDouble || converter instanceof Converter.PromoterToFloat) { destination.emitAttribute("flags", "p"); } if (getRoleDiagnostic() != null) { destination.emitAttribute("diag", getRoleDiagnostic().save()); } getBaseExpression().export(destination); destination.endElement(); }
/** * Diagnostic print of expression structure. The abstract expression tree * is written to the supplied output destination. */ public void export(ExpressionPresenter destination) throws XPathException { destination.startElement("convert", this); destination.emitAttribute("from", getBaseExpression().getItemType().toExportString()); destination.emitAttribute("to", requiredItemType.toExportString()); if (converter instanceof Converter.PromoterToDouble || converter instanceof Converter.PromoterToFloat) { destination.emitAttribute("flags", "p"); } if (getRoleDiagnostic() != null) { destination.emitAttribute("diag", getRoleDiagnostic().save()); } getBaseExpression().export(destination); destination.endElement(); }