function createCallbackInterface(oWithControl) {
				/**
				 * Callback interface for visitor functions which provides access to private
				 * {@link sap.ui.core.util.XMLPreprocessor} functionality using a map of currently
				 * known variables. Initially, these are the variables known to the XML
				 * pre-processor when it reaches the visitor's matching element (see
				 * {@link sap.ui.core.util.XMLPreprocessor.plugIn}). They can be overridden or
				 * replaced via {@link sap.ui.core.util.XMLPreprocessor.ICallback.with}.
				 *
				 * @interface
				 * @name sap.ui.core.util.XMLPreprocessor.ICallback
				 * @private
				 * @see sap.ui.core.util.XMLPreprocessor.plugIn
				 */
				return /** @lends sap.ui.core.util.XMLPreprocessor.ICallback */ {
					/**
					 * Visits the given elements one-by-one, calls the given callback for each of
					 * them and stops and waits for each thenable returned by the callback before
					 * going on to the next element. If a thenable resolves with a truthy value,
					 * iteration stops and the corresponding element becomes the result of the
					 * returned thenable.
					 *
					 * <b>Note:</b> If the visitor function is used for synchronous XML Templating,
					 * the callback must return a sync promise; in other cases, any thenable is OK.
					 *
					 * @param {any[]} aElements
					 *   Whatever elements we want to visit
					 * @param {function} fnCallback
					 *   A function to be called with a single element and its index and the array
					 *   (like {@link Array#find} does it), returning a thenable, preferrably a
					 *   {@link sap.ui.base.SyncPromise}
					 * @returns {sap.ui.base.SyncPromise}
					 *   A sync promise which resolves with the first element where the callback's
					 *   thenable resolved with a truthy value, or resolves with
					 *   <code>undefined</code> as soon as the last callback's thenable has
					 *   resolved, or is rejected with a corresponding error if any callback returns
					 *   a rejected thenable or throws an error
					 */
					find : function (aElements, fnCallback) {
						try {
							return SyncPromise.resolve(stopAndGo(aElements, fnCallback));
						} catch (e) {
							return SyncPromise.reject(e);
						}
					},

					/**
					 * Returns the model's context which corresponds to the given simple binding
					 * path. Uses the map of currently known variables.
					 *
					 * @param {string} [sPath=""]
					 *   A simple binding path which may include a model name ("a variable"), for
					 *   example "var>some/relative/path", but not a binding ("{...}")
					 * @returns {sap.ui.model.Context}
					 *   The corresponding context which holds the model and the resolved, absolute
					 *   path
					 * @throws {Error}
					 *   If a binding is given, if the path refers to an unknown model, or if the
					 *   path cannot be resolved (typically because a relative path was given for a
					 *   model without a binding context)
					 */
					getContext : function (sPath = "") {
						var oBindingInfo,
							oModel,
							sResolvedPath;

						if (sPath[0] === "{") {
							throw new Error("Must be a simple path, not a binding: " + sPath);
						}
						oBindingInfo = BindingParser.simpleParser("{" + sPath + "}");
						oModel = oWithControl.getModel(oBindingInfo.model);
						if (!oModel) {
							throw new Error("Unknown model '" + oBindingInfo.model + "': " + sPath);
						}
						sResolvedPath = oModel.resolve(oBindingInfo.path,
							oWithControl.getBindingContext(oBindingInfo.model));
						if (!sResolvedPath) {
							throw new Error("Cannot resolve path: " + sPath);
						}
						return oModel.createBindingContext(sResolvedPath);
					},

					/**
					 * Interprets the given XML DOM attribute value as a binding and returns the
					 * resulting value. Takes care of unescaping and thus also of constant
					 * expressions; warnings are logged for (formatter) functions which are not
					 * found. Uses the map of currently known variables.
					 *
					 * @param {string} sValue
					 *   An XML DOM attribute value
					 * @param {Element} [oElement]
					 *   The XML DOM element the attribute value belongs to (needed only for
					 *   warnings which are logged to the console)
					 * @returns {sap.ui.base.SyncPromise|null}
					 *   A thenable which resolves with the resulting value, or is rejected with a
					 *   corresponding error (for example, an error thrown by a formatter) or
					 *   <code>null</code> in case the binding is not ready (because it refers to a
					 *   model which is not available) (since 1.57.0)
					 *
					 * @function
					 * @public
					 * @since 1.39.0
					 */
					getResult : function (sValue, oElement) {
						return getResolvedBinding(sValue, oElement, oWithControl, true);
					},

					/**
					 * Returns the settings object for XML template processing.
					 *
					 * @returns {object}
					 *   settings for the XML preprocessor; might contain the properties
					 *   "bindingContexts" and "models" and maybe others
					 *
					 * @function
					 * @public
					 * @since 1.41.0
					 */
					getSettings : function () {
						return mSettings;
					},

					/**
					 * Returns the view info object for XML template processing.
					 *
					 * @returns {object}
					 *   info object of the XML preprocessor's calling instance; might contain the
					 *   string properties "caller", "componentId", "name" and maybe others
					 *
					 * @function
					 * @public
					 * @since 1.41.0
					 */
					getViewInfo : function () {
						return deepExtend({}, oViewInfo);
					},

					/**
					 * Inserts the fragment with the given name in place of the given element. Loads
					 * the fragment, takes care of caching (for the current pre-processor run) and
					 * visits the fragment's content once it has been imported into the element's
					 * owner document and put into place.
					 *
					 * @param {string} sFragmentName
					 *   The fragment's resolved name
					 * @param {Element} oElement
					 *   The XML DOM element to be replaced
					 * @returns {sap.ui.base.SyncPromise}
					 *   A thenable which resolves with <code>undefined</code> as soon as the
					 *   fragment has been inserted, or is rejected with a corresponding error if
					 *   loading or visiting fails (since 1.57.0)
					 * @throws {Error}
					 *   If a cycle is detected (same <code>sFragmentName</code> and
					 *   {@link sap.ui.core.util.XMLPreprocessor.ICallback})
					 *
					 * @function
					 * @public
					 * @see #with
					 * @since 1.39.0
					 */
					insertFragment : function (sFragmentName, oElement) {
						return insertFragment(sFragmentName, oElement, oWithControl);
					},

					/**
					 * Visit the given attribute of the given element. If the attribute value
					 * represents a binding expression that can be resolved, it is replaced with
					 * the resulting value.
					 *
					 * @param {Element} oElement
					 *   The XML DOM element
					 * @param {Attr} oAttribute
					 *   One of the element's attribute nodes
					 * @returns {sap.ui.base.SyncPromise}
					 *   A thenable which resolves with <code>undefined</code> as soon as the
					 *   attribute's value has been replaced, or is rejected with a corresponding
					 *   error if getting the binding's value fails (since 1.57.0)
					 *
					 * @function
					 * @public
					 * @see sap.ui.core.util.XMLPreprocessor.ICallback.visitAttributes
					 * @since 1.51.0
					 */
					visitAttribute : function (oElement, oAttribute) {
						return visitAttribute(oElement, oAttribute, oWithControl);
					},

					/**
					 * Visits all attributes of the given element. If an attribute value represents
					 * a binding expression that can be resolved, it is replaced with the resulting
					 * value.
					 *
					 * @param {Element} oElement
					 *   The XML DOM element
					 * @returns {sap.ui.base.SyncPromise}
					 *   A thenable which resolves with <code>undefined</code> as soon as all
					 *   attributes' values have been replaced, or is rejected with a corresponding
					 *   error if getting some binding's value fails (since 1.57.0)
					 *
					 * @function
					 * @public
					 * @see sap.ui.core.util.XMLPreprocessor.ICallback.getResult
					 * @since 1.39.0
					 */
					visitAttributes : function (oElement) {
						return visitAttributes(oElement, oWithControl);
					},

					/**
					 * Visits all child nodes of the given node via {@link
					 * sap.ui.core.util.XMLPreprocessor.ICallback.visitNode visitNode}.
					 *
					 * @param {Node} oNode
					 *   The XML DOM node
					 * @returns {sap.ui.base.SyncPromise}
					 *   A thenable which resolves with <code>undefined</code> as soon as visiting
					 *   is done, or is rejected with a corresponding error if visiting fails
					 *   (since 1.57.0)
					 *
					 * @function
					 * @public
					 * @since 1.39.0
					 */
					visitChildNodes : function (oNode) {
						return visitChildNodes(oNode, oWithControl);
					},

					/**
					 * Visits the given node and either processes a template instruction, calls
					 * a visitor, or simply calls both {@link
					 * sap.ui.core.util.XMLPreprocessor.ICallback.visitAttributes visitAttributes}
					 * and {@link sap.ui.core.util.XMLPreprocessor.ICallback.visitChildNodes
					 * visitChildNodes}.
					 *
					 * @param {Node} oNode
					 *   The XML DOM node
					 * @returns {sap.ui.base.SyncPromise}
					 *   A thenable which resolves with <code>undefined</code> as soon as visiting
					 *   is done, or is rejected with a corresponding error if visiting fails
					 *   (since 1.57.0)
					 *
					 * @function
					 * @public
					 * @since 1.39.0
					 */
					visitNode : function (oNode) {
						try {
							return visitNode(oNode, oWithControl);
						} catch (e) {
							return SyncPromise.reject(e);
						}
					},

					/**
					 * Returns a callback interface instance for the given map of variables which
					 * override currently known variables of the same name in <code>this</code>
					 * parent interface or replace them altogether. Each variable name becomes a
					 * named model with a corresponding object binding and can be used inside the
					 * XML template in the usual way, that is, with a binding expression like
					 * <code>"{var>some/relative/path}"</code> (see example).
					 *
					 * <b>Example:</b> Suppose the XML pre-processor knows a variable named "old"
					 * and a visitor defines a new variable relative to it as follows.
					 * Then {@link sap.ui.core.util.XMLPreprocessor.ICallback.getResult getResult}
					 * for a binding which refers to the new variable using a relative path
					 * ("{new>relative}") has the same result as for a binding to the old variable
					 * with a compound path ("{old>prefix/relative}").
					 *
					 * <pre>
					 * oInterface.with({"new" : oInterface.getContext("old>prefix")})
					 *     .getResult("{new>relative}")
					 *     === oInterface.getResult("{old>prefix/relative}"); // true
					 * </pre>
					 *
					 * BEWARE: Previous callback interface instances derived from the same parent
					 * (<code>this</code>) become invalid (that is, they forget about inherited
					 * variables) once a new instance is derived.
					 *
					 * @param {object} [mVariables={}]
					 *   Map from variable name (string) to value ({@link sap.ui.model.Context})
					 * @param {boolean} [bReplace]
					 *   Whether only the given variables are known in the new callback interface
					 *   instance, no inherited ones
					 * @returns {sap.ui.core.util.XMLPreprocessor.ICallback}
					 *   A callback interface instance
					 *
					 * @function
					 * @public
					 * @see sap.ui.core.util.XMLPreprocessor.ICallback.getResult
					 * @since 1.39.0
					 */
					with : function (mVariables, bReplace) {
						var oContext,
							bHasVariables = false,
							sName,
							oNewWithControl = new With();

						if (!bReplace) {
							oWithControl.setChild(oNewWithControl);
						}

						for (sName in mVariables) {
							oContext = mVariables[sName];
							bHasVariables = true;
							oNewWithControl.setModel(oContext.getModel(), sName);
							oNewWithControl.bindObject({
								model : sName,
								path : oContext.getPath()
							});
						}

						return bHasVariables || bReplace
							? createCallbackInterface(oNewWithControl)
							: this;
					}
				};
			}
Returns a callback interface for visitor functions which provides access to private
{@link sap.ui.core.util.XMLPreprocessor} functionality using the given "with"
control.

@param {sap.ui.core.util._with} oWithControl
  The "with" control
@returns {sap.ui.core.util.XMLPreprocessor.ICallback}
 A callback interface