@Override
    public void handleAttribute(final char[] buffer, final int nameOffset, final int nameLen,
            final int nameLine, final int nameCol, final int operatorOffset, final int operatorLen,
            final int operatorLine, final int operatorCol, final int valueContentOffset,
            final int valueContentLen, final int valueOuterOffset, final int valueOuterLen,
            final int valueLine, final int valueCol) throws ParseException {

        getNext().handleInnerWhiteSpace(
                SIZE_ONE_WHITE_SPACE, 0, SIZE_ONE_WHITE_SPACE.length,
                this.pendingEventLine, this.pendingEventCol);


        final boolean isMinimizableBooleanAttribute =
                this.minimizeMode.minimizeBooleanAttributes &&
                isBooleanAttribute(buffer, nameOffset, nameLen) &&
                TextUtil.equals(false, buffer, nameOffset, nameLen, buffer, valueContentOffset, valueContentLen);

        if (isMinimizableBooleanAttribute) {
            // If it is a minimizable boolean, no need to go any further
            getNext().handleAttribute(
                    buffer,
                    nameOffset, nameLen, nameLine, nameCol,
                    0, 0, operatorLine, operatorCol,
                    0, 0, 0, 0, operatorLen, operatorCol
            );
            return;
        }


        final boolean canRemoveAttributeQuotes =
                this.minimizeMode.unquoteAttributes &&
                canAttributeValueBeUnquoted(buffer, valueContentOffset, valueContentLen, valueOuterOffset, valueOuterLen);


        if (operatorLen <= 1 && !canRemoveAttributeQuotes) {
            // Operator is already minimal enough, so we don't need to use our attribute-minimizing buffer

            getNext().handleAttribute(buffer, nameOffset, nameLen, nameLine, nameCol, operatorOffset,
                    operatorLen, operatorLine, operatorCol, valueContentOffset, valueContentLen,
                    valueOuterOffset, valueOuterLen, valueLine, valueCol);

        } else {

            final int requiredLen = nameLen + 1 /* new operator len */ + valueOuterLen;
            if (this.internalBuffer.length < requiredLen) {
                this.internalBuffer = new char[requiredLen];
            }

            System.arraycopy(buffer, nameOffset, this.internalBuffer, 0, nameLen);
            System.arraycopy(ATTRIBUTE_OPERATOR, 0, this.internalBuffer, nameLen, ATTRIBUTE_OPERATOR.length);

            if (canRemoveAttributeQuotes) {

                System.arraycopy(buffer, valueContentOffset, this.internalBuffer, nameLen + ATTRIBUTE_OPERATOR.length, valueContentLen);

                getNext().handleAttribute(
                        this.internalBuffer,
                        0, nameLen, nameLine, nameCol,
                        nameLen, ATTRIBUTE_OPERATOR.length, operatorLine, operatorCol,
                        nameLen + ATTRIBUTE_OPERATOR.length, valueContentLen,
                        nameLen + ATTRIBUTE_OPERATOR.length, valueContentLen,
                        valueLine, valueCol);

            } else {

                System.arraycopy(buffer, valueOuterOffset, this.internalBuffer, nameLen + ATTRIBUTE_OPERATOR.length, valueOuterLen);

                getNext().handleAttribute(
                        this.internalBuffer,
                        0, nameLen, nameLine, nameCol,
                        nameLen, ATTRIBUTE_OPERATOR.length, operatorLine, operatorCol,
                        nameLen + ATTRIBUTE_OPERATOR.length + (valueOuterOffset - valueContentOffset), valueContentLen,
                        nameLen + ATTRIBUTE_OPERATOR.length, valueOuterLen,
                        valueLine, valueCol);

            }

        }

    }