/[classpath]/classpath/gnu/xml/dom/DomElement.java
ViewVC logotype

Diff of /classpath/gnu/xml/dom/DomElement.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by mark, Thu Dec 23 22:38:43 2004 UTC revision 1.2 by dog, Thu Feb 10 17:21:25 2005 UTC
# Line 42  import java.util.Set; Line 42  import java.util.Set;
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;
# Line 262  public class DomElement Line 263  public class DomElement
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    
# Line 318  public class DomElement Line 319  public class DomElement
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            }            }
# Line 340  public class DomElement Line 341  public class DomElement
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    }    }
# Line 358  public class DomElement Line 359  public class DomElement
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    }    }
# Line 487  public class DomElement Line 488  public class DomElement
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        {        {

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26