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

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

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

revision 1.2 by dog, Fri Jan 28 20:33:16 2005 UTC revision 1.3 by dog, Thu Feb 10 17:21:25 2005 UTC
# Line 308  public abstract class DomNode Line 308  public abstract class DomNode
308    {    {
309      if (readonly && !owner.building)      if (readonly && !owner.building)
310        {        {
311          throw new DomEx(DomEx.NO_MODIFICATION_ALLOWED_ERR,          throw new DomDOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR,
312                          null, this, 0);                                    null, this, 0);
313        }        }
314      for (DomNode ctx = this; ctx != null; ctx = ctx.parent)      for (DomNode ctx = this; ctx != null; ctx = ctx.parent)
315        {        {
316          if (child == ctx)          if (child == ctx)
317            {            {
318              throw new DomEx(DomEx.HIERARCHY_REQUEST_ERR,              throw new DomDOMException(DOMException.HIERARCHY_REQUEST_ERR,
319                              "can't make ancestor into a child", this, 0);                                        "can't make ancestor into a child",
320                                          this, 0);
321            }            }
322        }        }
323    
# Line 330  public abstract class DomNode Line 331  public abstract class DomNode
331          // new in DOM L2, this case -- patch it up later, in reparent()          // new in DOM L2, this case -- patch it up later, in reparent()
332          if (!(childNodeType == DOCUMENT_TYPE_NODE && childOwner == null))          if (!(childNodeType == DOCUMENT_TYPE_NODE && childOwner == null))
333            {            {
334              throw new DomEx(DomEx.WRONG_DOCUMENT_ERR,              throw new DomDOMException(DOMException.WRONG_DOCUMENT_ERR,
335                              null, child, 0);                                        null, child, 0);
336            }            }
337        }        }
338    
# Line 376  public abstract class DomNode Line 377  public abstract class DomNode
377        }        }
378      if (owner.checkingWellformedness)      if (owner.checkingWellformedness)
379        {        {
380          throw new DomEx(DomEx.HIERARCHY_REQUEST_ERR,          throw new DomDOMException(DOMException.HIERARCHY_REQUEST_ERR,
381                          "can't append " + nodeTypeToString(childNodeType) +                                    "can't append " +
382                          " to node of type " + nodeTypeToString(nodeType),                                    nodeTypeToString(childNodeType) +
383                          this, 0);                                    " to node of type " +
384                                      nodeTypeToString(nodeType),
385                                      this, 0);
386        }        }
387    }    }
388        
# Line 578  public abstract class DomNode Line 581  public abstract class DomNode
581        }        }
582      catch (ClassCastException e)      catch (ClassCastException e)
583        {        {
584          throw new DomEx(DomEx.WRONG_DOCUMENT_ERR,          throw new DomDOMException(DOMException.WRONG_DOCUMENT_ERR,
585                          null, newChild, 0);                                    null, newChild, 0);
586      }      }
587    }    }
588    
# Line 630  public abstract class DomNode Line 633  public abstract class DomNode
633              checkMisc(child);              checkMisc(child);
634              if (ref == null || ref.parent != this)              if (ref == null || ref.parent != this)
635                {                {
636                  throw new DomEx(DomEx.NOT_FOUND_ERR, null, ref, 0);                  throw new DomDOMException(DOMException.NOT_FOUND_ERR,
637                                              null, ref, 0);
638                }                }
639              if (ref == child)              if (ref == child)
640                {                {
641                  throw new DomEx(DomEx.HIERARCHY_REQUEST_ERR,                  throw new DomDOMException(DOMException.HIERARCHY_REQUEST_ERR,
642                                  "can't insert node before itself", ref, 0);                                            "can't insert node before itself",
643                                              ref, 0);
644                }                }
645                    
646              if (child.parent != null)              if (child.parent != null)
# Line 672  public abstract class DomNode Line 677  public abstract class DomNode
677        }        }
678      catch (ClassCastException e)      catch (ClassCastException e)
679        {        {
680          throw new DomEx(DomEx.WRONG_DOCUMENT_ERR,          throw new DomDOMException(DOMException.WRONG_DOCUMENT_ERR,
681                          null, newChild, 0);                                    null, newChild, 0);
682        }        }
683    }    }
684    
# Line 721  public abstract class DomNode Line 726  public abstract class DomNode
726                }                }
727              if (ref == null || ref.parent != this)              if (ref == null || ref.parent != this)
728                {                {
729                  throw new DomEx(DomEx.NOT_FOUND_ERR, null, ref, 0);                  throw new DomDOMException(DOMException.NOT_FOUND_ERR,
730                                              null, ref, 0);
731                }                }
732                            
733              if (reportMutations)              if (reportMutations)
# Line 784  public abstract class DomNode Line 790  public abstract class DomNode
790              checkMisc(child);              checkMisc(child);
791              if (ref == null || ref.parent != this)              if (ref == null || ref.parent != this)
792                {                {
793                  throw new DomEx(DomEx.NOT_FOUND_ERR, null, ref, 0);                  throw new DomDOMException(DOMException.NOT_FOUND_ERR,
794                                              null, ref, 0);
795                }                }
796                    
797              if (reportMutations)              if (reportMutations)
# Line 837  public abstract class DomNode Line 844  public abstract class DomNode
844        }        }
845      catch (ClassCastException e)      catch (ClassCastException e)
846        {        {
847          throw new DomEx(DomEx.WRONG_DOCUMENT_ERR,          throw new DomDOMException(DOMException.WRONG_DOCUMENT_ERR,
848                          null, newChild, 0);                                    null, newChild, 0);
849        }        }
850    }    }
851    
# Line 860  public abstract class DomNode Line 867  public abstract class DomNode
867    
868          if (ref == null || ref.parent != this)          if (ref == null || ref.parent != this)
869            {            {
870              throw new DomEx(DomEx.NOT_FOUND_ERR, null, ref, 0);              throw new DomDOMException(DOMException.NOT_FOUND_ERR,
871                                          null, ref, 0);
872            }            }
873          if (readonly && !owner.building)          if (readonly && !owner.building)
874            {            {
875              throw new DomEx(DomEx.NO_MODIFICATION_ALLOWED_ERR,              throw new DomDOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR,
876                              null, this, 0);                                        null, this, 0);
877            }            }
878                    
879          for (DomNode child = first; child != null; child = child.next)          for (DomNode child = first; child != null; child = child.next)
# Line 909  public abstract class DomNode Line 917  public abstract class DomNode
917                  return ref;                  return ref;
918                }                }
919            }            }
920          throw new DomEx(DomEx.NOT_FOUND_ERR,          throw new DomDOMException(DOMException.NOT_FOUND_ERR,
921                          "that's no child of mine", refChild, 0);                                    "that's no child of mine", refChild, 0);
922        }        }
923      catch (ClassCastException e)      catch (ClassCastException e)
924        {        {
925          throw new DomEx(DomEx.WRONG_DOCUMENT_ERR,          throw new DomDOMException(DOMException.WRONG_DOCUMENT_ERR,
926                          null, refChild, 0);                                    null, refChild, 0);
927        }        }
928    }    }
929    
# Line 1446  public abstract class DomNode Line 1454  public abstract class DomNode
1454    
1455      // mouse events      // mouse events
1456            
1457      throw new DomEx(DomEx.NOT_SUPPORTED_ERR,      throw new DomDOMException(DOMException.NOT_SUPPORTED_ERR,
1458                      eventType, null, 0);                                eventType, null, 0);
1459    }    }
1460    
1461    /**    /**

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

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