Package com.volantis.mcs.dom

Examples of com.volantis.mcs.dom.Attribute


     *
     * @param element the element to be checked for attributes
     * @throws Exception if an error occurs
     */
    protected void assertNoAttributes(Element element) throws Exception {
        Attribute attributes = element.getAttributes();

        if (attributes != null) {
            String unexpectedAttributes = attributes.getName();

            while ((attributes = attributes.getNext()) != null) {
                unexpectedAttributes += ", " + attributes.getName();
            }

            Assert.fail("the following attributes were not expected: " +
                    unexpectedAttributes);
        }
View Full Code Here


     *
     * @param element the element to be checked for attributes
     * @throws Exception if an error occurs
     */
    protected void assertNoAttributes(Element element) throws Exception {
        Attribute attributes = element.getAttributes();

        if (attributes != null) {
            String unexpectedAttributes = attributes.getName();

            while ((attributes = attributes.getNext()) != null) {
                unexpectedAttributes += ", " + attributes.getName();
            }

            Assert.fail("the following attributes were not expected: " +
                        unexpectedAttributes);
        }
View Full Code Here

            }

            if (validAttributes == null) {
                element.clearAttributes();
            } else {
                Attribute attribute;
                Attribute nextAttribute;
                String attrName;

                for (attribute = element.getAttributes();
                     attribute != null;
                     attribute = nextAttribute) {
View Full Code Here

        if (packageResources != null) {
            Set assetURLattributes =
                    assetURLLocations.getElementAttributes(element.getName());

            if (assetURLattributes != null) {
                Attribute elementAttribute = element.getAttributes();

                while (elementAttribute != null) {
                    if (assetURLattributes.contains(
                            elementAttribute.getName())) {
                        packageResources.addEncodedURLCandidate(
                                elementAttribute.getValue());
                    }
                    elementAttribute = elementAttribute.getNext();
                }
            }
        }
    }
View Full Code Here

                    if (childNode instanceof Element) {
                        Element childElement = (Element) childNode;
                        if (elementName.equals(childElement.getName())) {
                            // Check to see if all the child attributes are
                            // present and the same in the parent.
                            Attribute attribute = childElement.getAttributes();
                            while (attribute != null && allChildrenRedundant) {
                                String value = element.getAttributeValue(
                                        attribute.getName());
                                if (!attribute.getValue().equals(value)) {
                                    // child's attributes are different
                                    allChildrenRedundant = false;
                                }
                                attribute = attribute.getNext();
                            }
                        } else {
                            // element names are different
                            allChildrenRedundant = false;
                        }
View Full Code Here

         *
         * @param element the element of interest
         */
        private void preserveOnlyAlignAttribute(Element element) {
            if (element.hasAttributes()) {
                Attribute attribute = element.getAttributes();
                while (null != attribute) {
                    final String attrName = attribute.getName();
                    if (!"align".equals(attrName)) {
                        element.removeAttribute(attrName);
                    }
                    attribute = attribute.getNext();
                }
            }
        }
View Full Code Here

TOP

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

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.