Package mf.org.w3c.dom

Examples of mf.org.w3c.dom.Node


    }
   
   
    public void setSectionRowIndex( int sectionRowIndex )
    {
        Node    parent;
       
        parent = getParentNode();
        if ( parent instanceof HTMLTableSectionElement ) {
            ( (HTMLTableSectionElementImpl) parent ).insertRowX( sectionRowIndex, this );
        }
View Full Code Here


            fNamespaceSize = 0;
        }
       
        private void fillNamespaceContext() {
            if (fRoot != null) {
                Node currentNode = fRoot.getParentNode();
                while (currentNode != null) {
                    if (Node.ELEMENT_NODE == currentNode.getNodeType()) {
                        NamedNodeMap attributes = currentNode.getAttributes();
                        final int attrCount = attributes.getLength();
                        for (int i = 0; i < attrCount; ++i) {
                            Attr attr = (Attr) attributes.item(i);
                            String value = attr.getValue();
                            if (value == null) {
                                value = XMLSymbols.EMPTY_STRING;
                            }
                            fillQName(fAttributeQName, attr);
                            // REVISIT: Should we be looking at non-namespace attributes
                            // for additional mappings? Should we detect illegal namespace
                            // declarations and exclude them from the context? -- mrglavas
                            if (fAttributeQName.uri == NamespaceContext.XMLNS_URI) {
                                // process namespace attribute
                                if (fAttributeQName.prefix == XMLSymbols.PREFIX_XMLNS) {
                                    declarePrefix0(fAttributeQName.localpart, value.length() != 0 ? fSymbolTable.addSymbol(value) : null);
                                }
                                else {
                                    declarePrefix0(XMLSymbols.EMPTY_STRING, value.length() != 0 ? fSymbolTable.addSymbol(value) : null);
                                }
                            }
                        }
                       
                    }
                    currentNode = currentNode.getParentNode();
                }
            }
        }
View Full Code Here

    }
   
   
    public void setCells( HTMLCollection cells )
    {
        Node    child;
        int        i;
       
        child = getFirstChild();
        while ( child != null ) {
            removeChild( child );
            child = child.getNextSibling();
        }
        i = 0;
        child = cells.item( i );
        while ( child != null ) {
            appendChild ( child );
View Full Code Here

    }

 
    public HTMLElement insertCell( int index )
    {
        Node        child;
        HTMLElement    newCell;
       
        newCell = new HTMLTableCellElementImpl( (HTMLDocumentImpl) getOwnerDocument(), "TD" );
        child = getFirstChild();
        while ( child != null ) {
            if ( child instanceof HTMLTableCellElement ) {
                if ( index == 0 ) {
                    insertBefore( newCell, child );
                    return newCell;
                }
                --index;
            }
            child = child.getNextSibling();
        }
        appendChild( newCell );
        return newCell;
    }
View Full Code Here

    }
   
   
    public void deleteCell( int index )
    {
        Node    child;
       
        child = getFirstChild();
        while ( child != null ) {
            if ( child instanceof HTMLTableCellElement ) {
                if ( index == 0 ) {
                    removeChild ( child );
                    return;
                }
                --index;
            }
            child = child.getNextSibling();
        }
    }
View Full Code Here

    }
   
   
    int insertRowX( int index, HTMLTableRowElementImpl newRow )
    {
        Node    child;
       
        child = getFirstChild();
        while ( child != null )
        {
            if ( child instanceof HTMLTableRowElement )
            {
                if ( index == 0 )
                {
                    insertBefore( newRow, child );
                    return -1;
                }
                --index;
            }
            child = child.getNextSibling();
        }
        return index;
    }
View Full Code Here

    }

   
    int deleteRowX( int index )
    {
        Node    child;
       
        child = getFirstChild();
        while ( child != null )
        {
            if ( child instanceof HTMLTableRowElement )
            {
                if ( index == 0 )
                {
                    removeChild ( child );
                    return -1;
                }
                --index;
            }
            child = child.getNextSibling();
        }
        return index;
    }
View Full Code Here

    public void setDOMResult(DOMResult result) {
        fIgnoreChars = false;
        if (result != null) {
          //MF - Renamed - Resourced
            final Node target = (Node) result.getNode();
            fDocument = (target.getNodeType() == Node.DOCUMENT_NODE) ? (Document) target : target.getOwnerDocument();
            fDocumentImpl = (fDocument instanceof CoreDocumentImpl) ? (CoreDocumentImpl) fDocument : null;
            fStorePSVI = (fDocument instanceof PSVIDocumentImpl);
            return;
        }
        fDocument = null;
View Full Code Here

        characters(text, augs);
    }

    public void endElement(QName element, Augmentations augs)
            throws XNIException {
        final Node currentElement = fDOMValidatorHelper.getCurrentElement();
        // Write type information to this element
        if (augs != null && fDocumentImpl != null) {
            ElementPSVI elementPSVI = (ElementPSVI)augs.getItem(Constants.ELEMENT_PSVI);
            if (elementPSVI != null) {
                if (fStorePSVI) {
View Full Code Here

    private static final long serialVersionUID = -2406518157464313922L;

    public int getCellIndex()
    {
        Node    parent;
        Node    child;
        int        index;
       
        parent = getParentNode();
        index = 0;
        if ( parent instanceof HTMLTableRowElement )
        {
            child = parent.getFirstChild();
            while ( child != null )
            {
                if ( child instanceof HTMLTableCellElement )
                {
                    if ( child == this )
                        return index;
                    ++ index;
                }
                child = child.getNextSibling();
            }
        }
        return -1;
    }
View Full Code Here

TOP

Related Classes of mf.org.w3c.dom.Node

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.