Do you mean to insert another template file into that 'result' div you created? If so, then yes, you can use Thymeleaf's template resolution mechanism to get that template file, then insert it into your result div like so:
Template otherTemplate = arguments.getTemplateRepository().getTemplate(
new TemplateProcessingParameters(arguments.getConfiguration(), templateName,
Emanuel's solution is correct. You can look at the code of the "StandardSubstituteByAttrProcessor" class in order to see how this standard tag works for a more complete reference.
Just for documentation purposes, if what you wanted to include was the result of executing a different template engine (not Thymeleaf), you could insert into your template's DOM a node of the "Macro" class (org.thymeleaf.dom.Macro) with the textual content of executing your "other" template engine (as a String).
Macros are nodes that contain HTML and are not executed nor escaped at all by thymeleaf. They simply add a fragment of markup to a point in your DOM.
defined in a html file, so I actually like to replace it, not add it to the result.
This is a very simple example, most components are a bit more complex. They can be combinations of other components, etc.
The idea is to have the components as simple as possible, reusable and easily adapted.
To replace instead of just include, then you can add the following line after the example I gave above:
Given that 'element' is your custom <foo:switch/> element, then what that line will do is get the parent of foo:switch, pull foo:switch out of the DOM, and bring foo:switch's children (which is the content of the template we just added) up in place of it.