@Test public void replaceNonTranslatableNodeWhenEverythingIsTranslatableXML() { String htmlToProcess = "The <literal>@watch</literal> annotation is not working with accumulate in rules. [<link xlink:href=\"https: TranslatableNodeList node = ArticleUtil.replaceNonTranslatableNodeXML(1, htmlToProcess); assertThat(node.getPlaceholderIdMap()).isEmpty(); String actualHtml = node.getHtml(); assertThat(actualHtml).isEqualTo(htmlToProcess); }
public static TranslatableNodeList replaceNonTranslatableNodeXML(int prefix, String xml) { Element document = wrapXML(xml); Map<String, Node> placeholderIdMap = createPlaceholdersXML(prefix, document); return new TranslatableNodeList(unwrapAsNodes(document), placeholderIdMap); }
ArticleUtil { public static TranslatableNodeList replaceNonTranslatableNodeXML(int prefix, String xml) { Element document = wrapXML(xml); Map<String, Node> placeholderIdMap = createPlaceholdersXML(prefix, document); return new TranslatableNodeList(unwrapAsNodes(document), placeholderIdMap); } }
ArticleUtil { public static TranslatableNodeList replaceNonTranslatableNodeXML(int prefix, String xml) { Element document = wrapXML(xml); Map<String, Node> placeholderIdMap = createPlaceholdersXML(prefix, document); return new TranslatableNodeList(unwrapAsNodes(document), placeholderIdMap); } @SuppressWarnings("unused") private  ArticleUtil(); }
ArticleUtil { public static TranslatableNodeList replaceNonTranslatableNodeXML(int prefix, String xml) { Element document = wrapXML(xml); Map<String, Node> placeholderIdMap = createPlaceholdersXML(prefix, document); return new TranslatableNodeList(unwrapAsNodes(document), placeholderIdMap); } @SuppressWarnings("unused") private  ArticleUtil(); static TranslatableNodeList replaceNonTranslatableNodeHTML(int prefix,
            String html); static TranslatableNodeList replaceNonTranslatableNodeXML(int prefix,
            String xml); static String generatePlaceholderId(int prefix, int index); static Element generatePlaceholderNode(@NotNull String id); static Document wrapHTML(String html); static Document wrapXML(String html); static List<Node> unwrapAsNodes(@NotNull Element element); static List<Node> unwrapAsElements(@NotNull Element element); static @Nullable Node asElement(String html, Function<String, Element> toElement); static String replacePlaceholderWithNode(
            Map<String, Node> nodeIdMap, String xml, Function<String, Element> toElement); }
ArticleUtil { public static TranslatableNodeList replaceNonTranslatableNodeXML(int prefix, String xml) { Element document = wrapXML(xml); Map<String, Node> placeholderIdMap = createPlaceholdersXML(prefix, document); return new TranslatableNodeList(unwrapAsNodes(document), placeholderIdMap); } @SuppressWarnings("unused") private  ArticleUtil(); static TranslatableNodeList replaceNonTranslatableNodeHTML(int prefix,
            String html); static TranslatableNodeList replaceNonTranslatableNodeXML(int prefix,
            String xml); static String generatePlaceholderId(int prefix, int index); static Element generatePlaceholderNode(@NotNull String id); static Document wrapHTML(String html); static Document wrapXML(String html); static List<Node> unwrapAsNodes(@NotNull Element element); static List<Node> unwrapAsElements(@NotNull Element element); static @Nullable Node asElement(String html, Function<String, Element> toElement); static String replacePlaceholderWithNode(
            Map<String, Node> nodeIdMap, String xml, Function<String, Element> toElement);  }