function templateIf(oIfElement, oWithControl) {
				iNestingLevel++;
				return stopAndGo(getIfChildren(oIfElement) || [oIfElement], function (oCandidate) {
					if (oCandidate.localName === "else") {
						return oSyncPromiseResolvedTrue;
					}
					if (oCandidate.localName === "then") {
						oCandidate = oIfElement;
					}
					return performTest(oCandidate, oWithControl);
				}).then(function (oSelectedElement) {
					// the selected element: <if>, <then>, <elseif>, <else>, or none at all
					return (oSelectedElement
						? liftChildNodes(oSelectedElement, oWithControl, oIfElement)
						: oSyncPromiseResolved
					).then(function () {
						oIfElement.parentNode.removeChild(oIfElement);
						debugFinished(oIfElement);
						iNestingLevel -= 1;
					});
				});
			}
function templateIf(oIfElement, oWithControl) {
				iNestingLevel++;
				return stopAndGo(getIfChildren(oIfElement) || [oIfElement], function (oCandidate) {
					if (oCandidate.localName === "else") {
						return oSyncPromiseResolvedTrue;
					}
					if (oCandidate.localName === "then") {
						oCandidate = oIfElement;
					}
					return performTest(oCandidate, oWithControl);
				}).then(function (oSelectedElement) {
					// the selected element: <if>, <then>, <elseif>, <else>, or none at all
					return (oSelectedElement
						? liftChildNodes(oSelectedElement, oWithControl, oIfElement)
						: oSyncPromiseResolved
					).then(function () {
						oIfElement.parentNode.removeChild(oIfElement);
						debugFinished(oIfElement);
						iNestingLevel -= 1;
					});
				});
			}
function templateIf ( oIfElement , oWithControl ) { iNestingLevel ++ ; return stopAndGo ( getIfChildren ( oIfElement ) || [ oIfElement ] , function ( oCandidate ) { if ( oCandidate . localName === "else" ) { return oSyncPromiseResolvedTrue ; } if ( oCandidate . localName === "then" ) { oCandidate = oIfElement ; } return performTest ( oCandidate , oWithControl ) ; } ) . then ( function ( oSelectedElement ) { // the selected element: <if>, <then>, <elseif>, <else>, or none at all return ( oSelectedElement ? liftChildNodes ( oSelectedElement , oWithControl , oIfElement ) : oSyncPromiseResolved ) . then ( function ( ) { oIfElement . parentNode . removeChild ( oIfElement ) ; debugFinished ( oIfElement ) ; iNestingLevel -= 1 ; } ) ; } ) ; }
Processes a <template:if> instruction.

@param {Element} oIfElement
the <template:if> XML DOM element
@param {sap.ui.core.util._with} oWithControl
the "with" control
@returns {sap.ui.base.SyncPromise}
A sync promise which resolves with <code>undefined</code> as soon as the
<template:if> instruction has been fully processed, or is rejected with a
corresponding error if visiting child nodes fails.
Processes a <template : if > instruction .
templateIf - If - If - Else - If - Else - If - Else - If - Else - If - Else - If - Else - If - Else - If - Else - If - Else - If - Else - If - Else If - Else If - Else If - Else If - Else If - Else If - Else If - Else If - Else If - Else If - Else If - Else If - Else If - Else If - Else If -