Package org.apache.tapestry5.dom

Examples of org.apache.tapestry5.dom.XMLMarkupModel


    }

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

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

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


    }

    @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);
View Full Code Here

    }

    @Test
    public void duplicate_scripts_ignored_first_media_wins() 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);
View Full Code Here

    }

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

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

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

     * 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);

View Full Code Here

    }

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

        w.write("  ");

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

    }

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

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

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

    }

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

        Element root = w.elementNS("fredns", "root");

        assertSame(root.defineNamespace("fredns", "fred"), root);
View Full Code Here

    }

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

        w.element("root");
        w.write("Normal Text ");
        w.cdata("< & >");
        w.write("More Normal Text");
View Full Code Here

    }

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

        MarkupWriterListener l = new MarkupWriterListener()
        {
            public void elementDidStart(Element element)
            {
View Full Code Here

TOP

Related Classes of org.apache.tapestry5.dom.XMLMarkupModel

Copyright © 2018 www.massapicom. 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.