Package com.volantis.mcs.dom

Examples of com.volantis.mcs.dom.Document


            SAXException {

        // Create a document where e1 parent of e2 parent of e3 and where e2
        // has no styles set.
        DOMFactory factory = DOMFactory.getDefaultInstance();
        Document document = factory.createDocument();
        Element root = factory.createElement("root");
        document.addNode(root);
        Element e1 = factory.createElement("e1");
        e1.setStyles(StylesBuilder.getCompleteStyles("line-height: normal"));
        root.addTail(e1);
        Element e2 = factory.createElement("e2");
        e1.addTail(e2);
View Full Code Here


            String expectedStyledElements,
            List indexedProperties,
            final String deviceCSS) {

        StyledDOMTester styledDOMTester = new StyledDOMTester();
        Document actualXml = styledDOMTester.parseFull(inputXml);

        checkNormalization(actualXml, expectedStyledElements, indexedProperties, deviceCSS);

    }
View Full Code Here

    protected void checkThemeGeneration(DOMThemeGenerator generator,
            String testName, String inputXml, String expectedXml,
            String expectedTheme)
            throws IOException, SAXException, ParserConfigurationException {

        Document actualXml = StyledDOMTester.createStyledDom(inputXml);

        OutputStyledElementsFactory factory = new OutputStyledElementsFactory();

        OutputStyledElementList outputElementList =
                factory.createOutputStyledElements(actualXml);
View Full Code Here

        p.setName(WMLConstants.BLOCH_ELEMENT);
        int[] columns = {1, 1};
        Element table = createTable(2, columns);
        p.addTail(table);

        Document doc = domFactory.createDocument();
        doc.addNode(p);       
        transformer.transformElement(p);
        String expected =
                "<BLOCK>r0, c0</BLOCK>" +
                "<BLOCK>r1, c0</BLOCK>";
        assertEquals(expected, DOMUtilities.toString(doc));
View Full Code Here

        Element tr [] = new Element[1];
        tr[0] = createRow(td);
        Element table = createTable(tr);
        card.addTail(table);

        Document doc = domFactory.createDocument();
        doc.addNode(wml);

        transformer.transformElement(wml);

        String expected =
                "<wml>" +
View Full Code Here

        td[0].addTail(createTable(3, cols));
        tr[1] = createRow(td);
        Element table = createTable(tr);
        card.addTail(table);

        Document doc = domFactory.createDocument();
        doc.addNode(wml);
        transformer.transformElement(wml);

        String expected =
                "<wml>" +
                "<card>" +
View Full Code Here

        td[0].addTail(createTable(2, cols));
        tr[1] = createRow(td);
        Element table = createTable(tr);
        card.addTail(table);

        Document doc = domFactory.createDocument();
        doc.addNode(wml);
        transformer.transformElement(wml);

        String expected =
                "<wml>" +
                "<card>" +
View Full Code Here

        td[0].addTail(createTable(2, cols));
        tr[1] = createRow(td);
        Element table = createTable(tr);
        card.addTail(table);

        Document doc = domFactory.createDocument();
        doc.addNode(wml);
        transformer.transformElement(wml);

        String expected =
                "<wml>" +
                "<card>" +
View Full Code Here

        td[0].addTail(createTable(2, cols));
        tr[1] = createRow(td);
        Element table = createTable(tr);
        card.addTail(table);

        Document doc = domFactory.createDocument();
        doc.addNode(wml);
        transformer.transformElement(wml);

        String expected =
                "<wml>" +
                "<card>" +
View Full Code Here

        Element table = createTable(2, columns);
        p.addTail(table);

        // the expected table should contain the column attribute
        table.setAttribute("columns", "2");
        Document doc = domFactory.createDocument();
        doc.addNode(p);
        String expected = DOMUtilities.toString(doc);

        // the table to fix should not...
        table.removeAttribute("columns");
View Full Code Here

TOP

Related Classes of com.volantis.mcs.dom.Document

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.