// Avoid doing this when streaming because xsl:value-of select="@*,node()" is not currently streamable
if (operator == Token.UNION && operand0 instanceof AxisExpression && operand1 instanceof AxisExpression) {
AxisExpression a0 = (AxisExpression)operand0;
AxisExpression a1 = (AxisExpression)operand1;
if (a0.getAxis() == Axis.ATTRIBUTE && a1.getAxis() == Axis.CHILD) {
Block b = new Block();
b.setChildren(new Expression[]{operand0, operand1});
return b;
} else if (a1.getAxis() == Axis.ATTRIBUTE && a0.getAxis() == Axis.CHILD) {
Block b = new Block();
b.setChildren(new Expression[]{operand1, operand0});
return b;
}
}
return this;