docs: private static boolean hasExpression(final Template template, final String expression, final TemplateElement templateElement) {
          final String canonicalForm = templateElement.getCanonicalForm();
  
          if (canonicalForm.startsWith(expression)) {
              LOGGER.log(Level.TRACE, "Template has expression[nodeName={0}, expression={1}]",
                      new Object[]{templateElement.getNodeName(), expression});
  
              return true;
          }
  
          final Enumeration<TemplateElement> children = templateElement.children();
          while (children.hasMoreElements()) {
              final TemplateElement nextElement = children.nextElement();
  
              if (hasExpression(template, expression, nextElement)) {
                  return true;
              }
          }
  
          return false;
      }