/** * <b>DOM</b>: Implements * {@link org.w3c.dom.Element#setIdAttributeNode(Attr,boolean)}. */ public void setIdAttributeNode( Attr attr, boolean isId ) throws DOMException { AbstractAttr a = (AbstractAttr)attr; 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#setIdAttributeNode(Attr,boolean)}. */ public void setIdAttributeNode( Attr attr, boolean isId ) throws DOMException { AbstractAttr a = (AbstractAttr)attr; 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#setIdAttributeNode(Attr,boolean)}. */ public void setIdAttributeNode( Attr attr, boolean isId ) throws DOMException { AbstractAttr a = (AbstractAttr)attr; 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#setIdAttribute(String,boolean)}. */ public void setIdAttribute(String name, boolean isId) throws DOMException { AbstractAttr a = (AbstractAttr) getAttributeNode(name); if (a == null) { throw createDOMException(DOMException.NOT_FOUND_ERR, "attribute.missing", new Object[] { name }); } if (a.isReadonly()) { throw createDOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR, "readonly.node", new Object[] { name }); } 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#setIdAttribute(String,boolean)}. */ public void setIdAttribute(String name, boolean isId) throws DOMException { AbstractAttr a = (AbstractAttr) getAttributeNode(name); if (a == null) { throw createDOMException(DOMException.NOT_FOUND_ERR, "attribute.missing", new Object[] { name }); } if (a.isReadonly()) { throw createDOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR, "readonly.node", new Object[] { name }); } 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#setIdAttribute(String,boolean)}. */ public void setIdAttribute(String name, boolean isId) throws DOMException { AbstractAttr a = (AbstractAttr) getAttributeNode(name); if (a == null) { throw createDOMException(DOMException.NOT_FOUND_ERR, "attribute.missing", new Object[] { name }); } if (a.isReadonly()) { throw createDOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR, "readonly.node", new Object[] { name }); } updateIdEntry(a, isId); a.isIdAttr = isId; }
/** * <b>DOM</b>: Implements {@link org.w3c.dom.Node#setNodeValue(String)}. */ public void setNodeValue(String nodeValue) throws DOMException { if (isReadonly()) { throw createDOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR, "readonly.node", new Object[] { new Integer(getNodeType()), getNodeName() }); } String s = getNodeValue(); // Remove all the children Node n; while ((n = getFirstChild()) != null) { removeChild(n); } String val = (nodeValue == null) ? "" : nodeValue; // Create and append a new child. n = getOwnerDocument().createTextNode(val); appendChild(n); if (ownerElement != null) { ownerElement.fireDOMAttrModifiedEvent(nodeName, this, s, val, MutationEvent.MODIFICATION); } }
/** * <b>DOM</b>: Implements {@link org.w3c.dom.Node#setNodeValue(String)}. */ public void setNodeValue(String nodeValue) throws DOMException { if (isReadonly()) { throw createDOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR, "readonly.node", new Object[] {(int) getNodeType(), getNodeName() }); } String s = getNodeValue(); // Remove all the children Node n; while ((n = getFirstChild()) != null) { removeChild(n); } String val = (nodeValue == null) ? "" : nodeValue; // Create and append a new child. n = getOwnerDocument().createTextNode(val); appendChild(n); if (ownerElement != null) { ownerElement.fireDOMAttrModifiedEvent(nodeName, this, s, val, MutationEvent.MODIFICATION); } }
/** * <b>DOM</b>: Implements {@link org.w3c.dom.Node#setNodeValue(String)}. */ public void setNodeValue(String nodeValue) throws DOMException { if (isReadonly()) { throw createDOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR, "readonly.node", new Object[] {(int) getNodeType(), getNodeName() }); } String s = getNodeValue(); // Remove all the children Node n; while ((n = getFirstChild()) != null) { removeChild(n); } String val = (nodeValue == null) ? "" : nodeValue; // Create and append a new child. n = getOwnerDocument().createTextNode(val); appendChild(n); if (ownerElement != null) { ownerElement.fireDOMAttrModifiedEvent(nodeName, this, s, val, MutationEvent.MODIFICATION); } }