snippetSelector = SelectorUtil.not(snippetSelector, ExtNodeConstants.SNIPPET_NODE_TAG_SELECTOR);
List<Element> embedSnippets = new ArrayList<>(elem.select(snippetSelector));
// Element
// Node parent;
SnippetNode fakedSnippetNode;
String render;
for (Element element : embedSnippets) {
render = element.attr(ExtNodeConstants.SNIPPET_NODE_ATTR_RENDER_WITH_NS);
fakedSnippetNode = new SnippetNode(render);
fakedSnippetNode.attr(ExtNodeConstants.SNIPPET_NODE_ATTR_TYPE, ExtNodeConstants.SNIPPET_NODE_ATTR_TYPE_FAKE);
// move the original node under the faked node
element.after(fakedSnippetNode);
element.remove();
fakedSnippetNode.appendChild(element);
element.removeAttr(ExtNodeConstants.SNIPPET_NODE_ATTR_RENDER_WITH_NS);
// set parallel type
if (element.hasAttr(ExtNodeConstants.SNIPPET_NODE_ATTR_PARALLEL_WITH_NS)) {
fakedSnippetNode.attr(ExtNodeConstants.SNIPPET_NODE_ATTR_PARALLEL, "");
element.removeAttr(ExtNodeConstants.SNIPPET_NODE_ATTR_PARALLEL_WITH_NS);
}
}
/*