nddelima    2004/08/10 12:35:13

  Modified:    java/src/org/apache/xerces/dom RangeImpl.java
  Log:
  cloneContents and extractContents should raise the DOMException 
HIERARCHY_REQUEST_ERR when a DocumentType node
  is cloned/extracted into the new DocumentFragment instead of the RangeException 
INVALID_NODE_TYPE_ERR.
  
  Revision  Changes    Path
  1.34      +5 -5      xml-xerces/java/src/org/apache/xerces/dom/RangeImpl.java
  
  Index: RangeImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/dom/RangeImpl.java,v
  retrieving revision 1.33
  retrieving revision 1.34
  diff -u -r1.33 -r1.34
  --- RangeImpl.java    5 Aug 2004 15:56:54 -0000       1.33
  +++ RangeImpl.java    10 Aug 2004 19:35:13 -0000      1.34
  @@ -1725,7 +1725,7 @@
        *         If the traversal operation is
        *         <code>DELETE_CONTENTS</code> the return value is null.
        */
  -    private Node traverseFullySelected( Node n, int how )
  +    private Node traverseFullySelected( Node n, int how ) 
       {
           switch( how )
           {
  @@ -1735,9 +1735,9 @@
               if ( n.getNodeType()==Node.DOCUMENT_TYPE_NODE )
               {
                   // TBD: This should be a HIERARCHY_REQUEST_ERR
  -                throw new RangeExceptionImpl(
  -             RangeException.INVALID_NODE_TYPE_ERR, 
  -                DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, 
"INVALID_NODE_TYPE_ERR", null));
  +                throw new DOMException(
  +                        DOMException.HIERARCHY_REQUEST_ERR, 
  +                DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, 
"HIERARCHY_REQUEST_ERR", null));
               }
               return n;
           case DELETE_CONTENTS:
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to