/** * <b>DOM</b>: Implements {@link * org.w3c.dom.Element#setAttribute(String,String)}. */ public void setAttribute(String name, String value) throws DOMException { if (attributes == null) { attributes = createAttributes(); } Attr attr = getAttributeNode(name); if (attr == null) { attr = getOwnerDocument().createAttribute(name); attr.setValue(value); attributes.setNamedItem(attr); } else { attr.setValue(value); } }
/** * <b>DOM</b>: Implements {@link * org.w3c.dom.Element#setAttribute(String,String)}. */ public void setAttribute(String name, String value) throws DOMException { if (attributes == null) { attributes = createAttributes(); } Attr attr = getAttributeNode(name); if (attr == null) { attr = getOwnerDocument().createAttribute(name); attr.setValue(value); attributes.setNamedItem(attr); } else { attr.setValue(value); } }
/** * <b>DOM</b>: Implements {@link * org.w3c.dom.Element#setAttribute(String,String)}. */ public void setAttribute(String name, String value) throws DOMException { if (attributes == null) { attributes = createAttributes(); } Attr attr = getAttributeNode(name); if (attr == null) { attr = getOwnerDocument().createAttribute(name); attr.setValue(value); attributes.setNamedItem(attr); } else { attr.setValue(value); } }
/** * Checks the validity of a node to add. */ protected void checkNode( Node arg ) { if ( isReadonly() ) { throw createDOMException ( DOMException.NO_MODIFICATION_ALLOWED_ERR, "readonly.node.map", new Object[]{} ); } if ( getOwnerDocument() != arg.getOwnerDocument() ) { throw createDOMException( DOMException.WRONG_DOCUMENT_ERR, "node.from.wrong.document", new Object[]{new Integer( arg.getNodeType() ), arg.getNodeName()} ); } if ( arg.getNodeType() == ATTRIBUTE_NODE && ( (Attr)arg ).getOwnerElement() != null ) { throw createDOMException( DOMException.WRONG_DOCUMENT_ERR, "inuse.attribute", new Object[]{arg.getNodeName()} ); } }
/** * <b>DOM</b>: Implements {@link * org.w3c.dom.Element#setAttributeNS(String,String,String)}. */ public void setAttributeNS(String namespaceURI, String qualifiedName, String value) throws DOMException { if (attributes == null) { attributes = createAttributes(); } if (namespaceURI != null && namespaceURI.length() == 0) { namespaceURI = null; } Attr attr = getAttributeNodeNS(namespaceURI, qualifiedName); if (attr == null) { attr = getOwnerDocument().createAttributeNS(namespaceURI, qualifiedName); attr.setValue(value); attributes.setNamedItemNS(attr); } else { attr.setValue(value); } }
/** * <b>DOM</b>: Implements {@link * org.w3c.dom.Element#setAttributeNS(String,String,String)}. */ public void setAttributeNS(String namespaceURI, String qualifiedName, String value) throws DOMException { if (attributes == null) { attributes = createAttributes(); } if (namespaceURI != null && namespaceURI.length() == 0) { namespaceURI = null; } Attr attr = getAttributeNodeNS(namespaceURI, qualifiedName); if (attr == null) { attr = getOwnerDocument().createAttributeNS(namespaceURI, qualifiedName); attr.setValue(value); attributes.setNamedItemNS(attr); } else { attr.setValue(value); } }
/** * Checks the validity of a node to add. */ protected void checkNode( Node arg ) { if ( isReadonly() ) { throw createDOMException ( DOMException.NO_MODIFICATION_ALLOWED_ERR, "readonly.node.map", new Object[]{} ); } if ( getOwnerDocument() != arg.getOwnerDocument() ) { throw createDOMException( DOMException.WRONG_DOCUMENT_ERR, "node.from.wrong.document", new Object[]{(int) arg.getNodeType(), arg.getNodeName()} ); } if ( arg.getNodeType() == ATTRIBUTE_NODE && ( (Attr)arg ).getOwnerElement() != null ) { throw createDOMException( DOMException.WRONG_DOCUMENT_ERR, "inuse.attribute", new Object[]{arg.getNodeName()} ); } }
/** * <b>DOM</b>: Implements {@link * org.w3c.dom.Element#setAttributeNS(String,String,String)}. */ public void setAttributeNS(String namespaceURI, String qualifiedName, String value) throws DOMException { if (attributes == null) { attributes = createAttributes(); } if (namespaceURI != null && namespaceURI.length() == 0) { namespaceURI = null; } Attr attr = getAttributeNodeNS(namespaceURI, qualifiedName); if (attr == null) { attr = getOwnerDocument().createAttributeNS(namespaceURI, qualifiedName); attr.setValue(value); attributes.setNamedItemNS(attr); } else { attr.setValue(value); } }
/** * Checks the validity of a node to add. */ protected void checkNode( Node arg ) { if ( isReadonly() ) { throw createDOMException ( DOMException.NO_MODIFICATION_ALLOWED_ERR, "readonly.node.map", new Object[]{} ); } if ( getOwnerDocument() != arg.getOwnerDocument() ) { throw createDOMException( DOMException.WRONG_DOCUMENT_ERR, "node.from.wrong.document", new Object[]{(int) arg.getNodeType(), arg.getNodeName()} ); } if ( arg.getNodeType() == ATTRIBUTE_NODE && ( (Attr)arg ).getOwnerElement() != null ) { throw createDOMException( DOMException.WRONG_DOCUMENT_ERR, "inuse.attribute", new Object[]{arg.getNodeName()} ); } }
= (AbstractDocument) handlerElement.getOwnerDocument(); int line = dl.getLineNumber(handlerElement); final String desc = Messages.formatMessage
= (AbstractDocument) handlerElement.getOwnerDocument(); int line = dl.getLineNumber(handlerElement); final String desc = Messages.formatMessage
= (AbstractDocument) handlerElement.getOwnerDocument(); int line = dl.getLineNumber(handlerElement); final String desc = Messages.formatMessage