Package org.joox

Examples of org.joox.Match.find()


        StreamSource xsl = new StreamSource(isXSL);
        TransformerFactory factory = TransformerFactory.newInstance();
        Transformer transformer = factory.newTransformer(xsl);

        Match manual = $(isXML);
        for (Match section : manual.find("section").each()) {
            Match sections = section.add(section.parents("section")).reverse();

            String path = StringUtils.join(sections.ids(), "/");
            String relativePath = StringUtils.join(Collections.nCopies(sections.size(), ".."), "/") + "/";
            File dir = new File(path);
View Full Code Here


            bookReader = new StringReader(docBookChapterContent);
            Match chapterDocument = $(new InputSource(bookReader));
            bookReader.close();

            rootDocument.append(chapterDocument.find("chapter"));

            // changes formalpara to figure bug fix
            rootDocument.find("imageobject").parents("formalpara").each((context) -> {
                $(context).rename("figure");
            });
View Full Code Here

            StringReader bookReader = new StringReader(docbook);
            Match rootDocument = $(new InputSource(bookReader));
            bookReader.close();

            // changes formalpara to figure bug fix
            rootDocument.find("imageobject").parents("formalpara").each((context) -> {
                $(context).rename("figure");
            });

            // makes figure centering
            rootDocument.find("figure").find("imagedata").attr("align", "center");
View Full Code Here

            rootDocument.find("imageobject").parents("formalpara").each((context) -> {
                $(context).rename("figure");
            });

            // makes figure centering
            rootDocument.find("figure").find("imagedata").attr("align", "center");

            // remove callout's duplicated refs and pick last
            rootDocument.find("callout").forEach(elem -> {
                String arearefs = $(elem).attr("arearefs");
                String[] cos = arearefs.split(" ");
View Full Code Here

            // makes figure centering
            rootDocument.find("figure").find("imagedata").attr("align", "center");

            // remove callout's duplicated refs and pick last
            rootDocument.find("callout").forEach(elem -> {
                String arearefs = $(elem).attr("arearefs");
                String[] cos = arearefs.split(" ");
                if (cos.length > 1)
                    $(elem).attr("arearefs", cos[cos.length - 1]);
            });
View Full Code Here

            transformer.transform(xmlSource, new StreamResult());

            Path containerXml = epubTemp.resolve("META-INF/container.xml");

            Match root = $(containerXml.toFile());
            root
                .find("rootfile")
                .attr("full-path", "OEBPS/package.opf");

            StringBuilder builder = new StringBuilder();
            builder.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.