@Override
    public void invoke(@NotNull Project project, Editor editor, PsiFile file) throws IncorrectOperationException {
        final int offset = editor.getCaretModel().getOffset();
        final PsiElement element = file.findElementAt(offset);
      final XmlTag tag = PsiTreeUtil.getParentOfType(element, XmlTag.class, false);
        assert tag != null;

        final StringBuilder sb = new StringBuilder();
        final PsiElement[] children = tag.getChildren();
        for (PsiElement child : children) {
            if (child instanceof XmlText text) {
              if (text.getText().trim().length() > 0) {
                    sb.append(text.getText().replaceAll("\"", "&quot;"));
                }
            } else if (child instanceof XmlTag t) {
              if (XsltSupport.isXsltTag(t)) {
                    if ("text".equals(t.getLocalName())) {
                        sb.append(t.getValue().getText().replaceAll("\"", "&quot;"));
                    } else if ("value-of".equals(t.getLocalName())) {
                        sb.append("{").append(t.getAttributeValue("select")).append("}");
                    } else {
                        assert false;
                    }
                }
            }
        }

        final XmlTag p = findParent(tag);
        if (p != null) {
            final String value = tag.getAttributeValue("name");
            p.setAttribute(value, sb.toString());

            // TODO: deal with namespace prefix mapping

            tag.delete();
        }
    }
@Override
    public void invoke(@NotNull Project project, Editor editor, PsiFile file)