private void emitStart()

in src/main/java/org/apache/sling/scripting/sightly/impl/plugin/AttributePlugin.java [167:189]


        private void emitStart(PushStream stream) {
            stream.write(new VariableBinding.Start(attrValue, node));
            stream.write(new VariableBinding.Start(escapedAttrValue, contentNode));
            stream.write(new VariableBinding.Start(
                    shouldDisplayAttribute,
                    new BinaryOperation(
                            BinaryOperator.AND,
                            new BinaryOperation(
                                    BinaryOperator.AND,
                                    new BinaryOperation(
                                            BinaryOperator.NEQ, NullLiteral.INSTANCE, new Identifier(escapedAttrValue)),
                                    new BinaryOperation(
                                            BinaryOperator.NEQ,
                                            StringConstant.EMPTY,
                                            new Identifier(escapedAttrValue))),
                            new BinaryOperation(
                                    BinaryOperator.AND,
                                    new BinaryOperation(
                                            BinaryOperator.NEQ, StringConstant.EMPTY, new Identifier(attrValue)),
                                    new BinaryOperation(
                                            BinaryOperator.NEQ, BooleanConstant.FALSE, new Identifier(attrValue))))));
            stream.write(new Conditional.Start(shouldDisplayAttribute, true));
        }