/** * Promote this expression if possible */ public Expression promote(PromotionOffer offer) throws XPathException { Expression exp = offer.accept(this); if (exp != null) { return exp; } else { sequence = doPromotion(sequence, offer); if (offer.action == PromotionOffer.INLINE_VARIABLE_REFERENCES || offer.action == PromotionOffer.UNORDERED || offer.action == PromotionOffer.REPLACE_CURRENT) { action = doPromotion(action, offer); } else if (offer.action == PromotionOffer.RANGE_INDEPENDENT || offer.action == PromotionOffer.FOCUS_INDEPENDENT) { // Pass the offer to the action expression only if the action isn't dependent on the // variable bound by this assignation Binding[] savedBindingList = offer.bindingList; offer.bindingList = extendBindingList(offer.bindingList); action = doPromotion(action, offer); offer.bindingList = savedBindingList; } return this; } }
/** * Promote this expression if possible */ public Expression promote(PromotionOffer offer) throws XPathException { Expression exp = offer.accept(this); if (exp != null) { return exp; } else { sequence = doPromotion(sequence, offer); if (offer.action == PromotionOffer.INLINE_VARIABLE_REFERENCES || offer.action == PromotionOffer.UNORDERED || offer.action == PromotionOffer.REPLACE_CURRENT) { action = doPromotion(action, offer); } else if (offer.action == PromotionOffer.RANGE_INDEPENDENT || offer.action == PromotionOffer.FOCUS_INDEPENDENT) { // Pass the offer to the action expression only if the action isn't dependent on the // variable bound by this assignation Binding[] savedBindingList = offer.bindingList; offer.bindingList = extendBindingList(offer.bindingList); action = doPromotion(action, offer); offer.bindingList = savedBindingList; } return this; } }
/** * Promote this expression if possible */ public Expression promote(PromotionOffer offer) throws XPathException { Expression exp = offer.accept(this); if (exp != null) { return exp; } else { sequence = doPromotion(sequence, offer); if (offer.action == PromotionOffer.INLINE_VARIABLE_REFERENCES || offer.action == PromotionOffer.UNORDERED || offer.action == PromotionOffer.REPLACE_CURRENT) { action = doPromotion(action, offer); } else if (offer.action == PromotionOffer.RANGE_INDEPENDENT || offer.action == PromotionOffer.FOCUS_INDEPENDENT) { // Pass the offer to the action expression only if the action isn't dependent on the // variable bound by this assignation Binding[] savedBindingList = offer.bindingList; offer.bindingList = extendBindingList(offer.bindingList); action = doPromotion(action, offer); offer.bindingList = savedBindingList; } return this; } }