/** * <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); } }
/** * <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#setIdAttributeNS(String,String,boolean)}. */ public void setIdAttributeNS( String ns, String ln, boolean isId ) throws DOMException { if ( ns != null && ns.length() == 0 ) { ns = null; } AbstractAttr a = (AbstractAttr)getAttributeNodeNS( ns, ln ); if (a == null) { throw createDOMException(DOMException.NOT_FOUND_ERR, "attribute.missing", new Object[] { ns, ln }); } if (a.isReadonly()) { throw createDOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR, "readonly.node", new Object[] { a.getNodeName() }); } updateIdEntry(a, isId); a.isIdAttr = isId; }
/** * <b>DOM</b>: Implements * {@link org.w3c.dom.Element#setIdAttributeNS(String,String,boolean)}. */ public void setIdAttributeNS( String ns, String ln, boolean isId ) throws DOMException { if ( ns != null && ns.length() == 0 ) { ns = null; } AbstractAttr a = (AbstractAttr)getAttributeNodeNS( ns, ln ); if (a == null) { throw createDOMException(DOMException.NOT_FOUND_ERR, "attribute.missing", new Object[] { ns, ln }); } if (a.isReadonly()) { throw createDOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR, "readonly.node", new Object[] { a.getNodeName() }); } updateIdEntry(a, isId); a.isIdAttr = isId; }
/** * <b>DOM</b>: Implements * {@link org.w3c.dom.Element#setIdAttributeNS(String,String,boolean)}. */ public void setIdAttributeNS( String ns, String ln, boolean isId ) throws DOMException { if ( ns != null && ns.length() == 0 ) { ns = null; } AbstractAttr a = (AbstractAttr)getAttributeNodeNS( ns, ln ); if (a == null) { throw createDOMException(DOMException.NOT_FOUND_ERR, "attribute.missing", new Object[] { ns, ln }); } if (a.isReadonly()) { throw createDOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR, "readonly.node", new Object[] { a.getNodeName() }); } updateIdEntry(a, isId); a.isIdAttr = isId; }