42 |
import javax.xml.XMLConstants; |
import javax.xml.XMLConstants; |
43 |
|
|
44 |
import org.w3c.dom.Attr; |
import org.w3c.dom.Attr; |
45 |
|
import org.w3c.dom.DOMException; |
46 |
import org.w3c.dom.Element; |
import org.w3c.dom.Element; |
47 |
import org.w3c.dom.NamedNodeMap; |
import org.w3c.dom.NamedNodeMap; |
48 |
import org.w3c.dom.Node; |
import org.w3c.dom.Node; |
263 |
if (("xmlns".equals (aname) || aname.startsWith ("xmlns:")) |
if (("xmlns".equals (aname) || aname.startsWith ("xmlns:")) |
264 |
&& !XMLConstants.XMLNS_ATTRIBUTE_NS_URI.equals (uri)) |
&& !XMLConstants.XMLNS_ATTRIBUTE_NS_URI.equals (uri)) |
265 |
{ |
{ |
266 |
throw new DomEx(DomEx.NAMESPACE_ERR, |
throw new DomDOMException(DOMException.NAMESPACE_ERR, |
267 |
"setting xmlns attribute to illegal value", this, 0); |
"setting xmlns attribute to illegal value", this, 0); |
268 |
} |
} |
269 |
|
|
319 |
{ |
{ |
320 |
attributes.removeNamedItem(name); |
attributes.removeNamedItem(name); |
321 |
} |
} |
322 |
catch (DomEx e) |
catch (DomDOMException e) |
323 |
{ |
{ |
324 |
if (e.code != DomEx.NOT_FOUND_ERR) |
if (e.code != DOMException.NOT_FOUND_ERR) |
325 |
{ |
{ |
326 |
throw e; |
throw e; |
327 |
} |
} |
341 |
{ |
{ |
342 |
if (attributes == null) |
if (attributes == null) |
343 |
{ |
{ |
344 |
throw new DomEx(DomEx.NOT_FOUND_ERR, null, node, 0); |
throw new DomDOMException(DOMException.NOT_FOUND_ERR, null, node, 0); |
345 |
} |
} |
346 |
return (Attr) attributes.removeNamedItem(node.getNodeName()); |
return (Attr) attributes.removeNamedItem(node.getNodeName()); |
347 |
} |
} |
359 |
{ |
{ |
360 |
if (attributes == null) |
if (attributes == null) |
361 |
{ |
{ |
362 |
throw new DomEx(DomEx.NOT_FOUND_ERR, localPart, null, 0); |
throw new DomDOMException(DOMException.NOT_FOUND_ERR, localPart, null, 0); |
363 |
} |
} |
364 |
attributes.removeNamedItemNS (namespace, localPart); |
attributes.removeNamedItemNS (namespace, localPart); |
365 |
} |
} |
488 |
{ |
{ |
489 |
if (readonly) |
if (readonly) |
490 |
{ |
{ |
491 |
throw new DomEx(DomEx.NO_MODIFICATION_ALLOWED_ERR); |
throw new DomDOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR); |
492 |
} |
} |
493 |
if (attr == null || attr.getOwnerElement() != this) |
if (attr == null || attr.getOwnerElement() != this) |
494 |
{ |
{ |
495 |
throw new DomEx(DomEx.NOT_FOUND_ERR); |
throw new DomDOMException(DOMException.NOT_FOUND_ERR); |
496 |
} |
} |
497 |
if (isId) |
if (isId) |
498 |
{ |
{ |