Package com.volantis.mcs.dom

Examples of com.volantis.mcs.dom.DOMFactory.createElement()


     * Verify that a non null element with a null id and align attribute can
     * be removed.
     */
    public void testIsElementEligibleForRemovalElement() {
        DOMFactory factory = DOMFactory.getDefaultInstance();
        Element div = factory.createElement("div");

        HTML_iModeDivRemover divRemover = new HTML_iModeDivRemover();
        assertEquals(true, divRemover.isDivEligibleForRemoval(div));
    }
}
View Full Code Here


            DOMFactory factory = sibling.getDOMFactory();
            if (sibling instanceof Element) {
                Element element;
                Element prototype = (Element)sibling;

                element = factory.createElement();

                element.copy(prototype);

                result = element;
            } else if (sibling instanceof Text) {
View Full Code Here

        // now inside a supported list: ul, ol, nl, etc
        final Styles styles = element.getStyles();
        if (styles != null) {
            DOMFactory domFactory = element.getDOMFactory();
            Element div = domFactory.createElement(DIV);
            div.setStyles(styles);

            // Clear the display property as this is not a list-item
            // any more.
            styles.getPropertyValues()
View Full Code Here

        // now inside a supported list: ul, ol, nl, etc
        final Styles styles = element.getStyles();
        if (styles != null) {
            DOMFactory domFactory = element.getDOMFactory();
            Element tr = domFactory.createElement(TR);
            tr.setStyles(styles);

            // Clear the display property as this is not a list-item
            // any more.
            styles.getPropertyValues()
View Full Code Here

        // Make sure that the content properties do not have a
        // display: list-item
        contentStyles.getPropertyValues().setComputedValue(
                StylePropertyDetails.DISPLAY, DisplayKeywords.INLINE);
        Element contents = domFactory.createElement(SPAN);
        contents.setStyles(contentStyles);

        // Add the list item children to the contents element.
        element.addChildrenToTail(contents);
View Full Code Here

                        for (int i = newRows.size();
                             i < requiredRows;
                             i++) {
                            // Allocate a new row element
                            currentRow = factory.createElement();

                            // Duplicate the original row and insert
                            // the new row after the previous row (and
                            // into the newRows array).
                            currentRow.copy(outerRow);
View Full Code Here

     *
     * @return a newly allocated DOM element
     */
    private Element allocateElement() {
        DOMFactory factory = protocol.getDOMFactory();
        return factory.createElement();
    }

    /**
     * Used by normalization to promote a table up out of a containing element
     * that it is allowed to be promoted out of. This is a template method to
View Full Code Here

    private static final String FORM_SPECIFIER = "s0";

    public void testGetDepthInValidStructure() throws IOException, SAXException {
        DOMFactory factory = DOMFactory.getDefaultInstance();

        Element element = factory.createElement();
        element.setName("0");
        Element[] elements = createElementHierarchy(factory, element, 20, 13,
                20, "A");
        Element mainTrunkBottom = elements[0];
        Element branchBottom = elements[1];
View Full Code Here

                "testInsertXFormEmulationElement.xml"));

        // Create test objects.
        DOMFactory domFactory = DOMFactory.getDefaultInstance();
        Element emulatedXFormElement =
                domFactory.createElement("EMULATED_XFORM_ELEMENT");
        Element vFormElement = domFactory.createElement("VFORM_ELEMENT");
        XFFormAttributes attributes = new XFFormAttributes();
        Element firstControl = selectNamedElement(dom, "FIRST_CONTROL");
        Element lastControl = selectNamedElement(dom, "SECOND_CONTROL");
        Element div = selectNamedElement(dom, "div");
View Full Code Here

        // Create test objects.
        DOMFactory domFactory = DOMFactory.getDefaultInstance();
        Element emulatedXFormElement =
                domFactory.createElement("EMULATED_XFORM_ELEMENT");
        Element vFormElement = domFactory.createElement("VFORM_ELEMENT");
        XFFormAttributes attributes = new XFFormAttributes();
        Element firstControl = selectNamedElement(dom, "FIRST_CONTROL");
        Element lastControl = selectNamedElement(dom, "SECOND_CONTROL");
        Element div = selectNamedElement(dom, "div");
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.