Examples of XMLMarkupModel


Examples of org.apache.tapestry5.dom.XMLMarkupModel

    }

    @Test
    public void empty_document_with_scripts_at_top() throws Exception
    {
        Document document = new Document(new XMLMarkupModel());

        document.newRootElement("html");

        DocumentLinkerImpl linker = new DocumentLinkerImpl(true, "1.2.3", true);
View Full Code Here

Examples of org.apache.tapestry5.dom.XMLMarkupModel

    }

    @Test
    public void add_script_links_at_top() throws Exception
    {
        Document document = new Document(new XMLMarkupModel());

        document.newRootElement("html").element("body").element("p").text("Ready to be updated with scripts at top.");

        DocumentLinkerImpl linker = new DocumentLinkerImpl(true, "1.2.3", true);
View Full Code Here

Examples of org.apache.tapestry5.dom.XMLMarkupModel

    }

    @Test
    public void add_style_links() throws Exception
    {
        Document document = new Document(new XMLMarkupModel());

        document.newRootElement("html").element("body").element("p").text("Ready to be updated with styles.");

        DocumentLinkerImpl linker = new DocumentLinkerImpl(true, "1.2.3", true);
View Full Code Here

Examples of org.apache.tapestry5.dom.XMLMarkupModel

    }

    @Test
    public void existing_head_used_if_present() throws Exception
    {
        Document document = new Document(new XMLMarkupModel());

        document.newRootElement("html").element("head").comment(" existing head ").getContainer().element("body").text(
                "body content");

        DocumentLinkerImpl linker = new DocumentLinkerImpl(true, "1.2.3", true);
View Full Code Here

Examples of org.apache.tapestry5.dom.XMLMarkupModel

     * Perhaps the linker should create the <body> element in this case? In the meantime,
     */
    @Test
    public void no_body_element() throws Exception
    {
        Document document = new Document(new XMLMarkupModel());

        document.newRootElement("html").element("notbody").element("p").text("Ready to be updated with scripts.");

        DocumentLinkerImpl linker = new DocumentLinkerImpl(true, "1.2.3", true);

View Full Code Here

Examples of org.apache.tapestry5.dom.XMLMarkupModel

     * TAP5-349
     */
    @Test
    public void single_root_element_only()
    {
        MarkupWriter w = new MarkupWriterImpl(new XMLMarkupModel());

        w.element("root1");
        w.end();

        try
View Full Code Here

Examples of org.apache.tapestry5.dom.XMLMarkupModel

    }

    @Test
    public void write_whitespace_before_start_of_root_element_is_retained()
    {
        MarkupWriter w = new MarkupWriterImpl(new XMLMarkupModel());

        w.write("  ");

        w.element("root");
        w.end();
View Full Code Here

Examples of org.apache.tapestry5.dom.XMLMarkupModel

    }

    @Test
    public void write_whitespace_after_end_of_root_element_is_retained_in_preamble()
    {
        MarkupWriter w = new MarkupWriterImpl(new XMLMarkupModel());

        w.element("root");
        w.end();

        w.write("  ");
View Full Code Here

Examples of org.apache.tapestry5.dom.XMLMarkupModel

    }

    @Test
    public void preamble_content() throws Exception
    {
        MarkupWriter w = new MarkupWriterImpl(new XMLMarkupModel());

        w.comment(" preamble start ");
        w.write("preamble text");
        w.cdata("CDATA content");
        w.writeRaw(" ");
View Full Code Here

Examples of org.apache.tapestry5.dom.XMLMarkupModel

    /** TAP5-1145 */
    @Test
    public void document_without_root_element()
    {
        MarkupWriter w = new MarkupWriterImpl(new XMLMarkupModel());

        w.write("preamble text");

        assertEquals(w.getDocument().toString(), "<?xml version=\"1.0\"?>\n" + "preamble text");
    }
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.