You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by zo...@apache.org on 2003/10/21 16:47:42 UTC

cvs commit: xml-xalan/test/java/src/org/apache/qetest/trax/dom DOMSourceAPITest.java

zongaro     2003/10/21 07:47:42

  Modified:    test/java/src/org/apache/qetest/trax/dom
                        DOMSourceAPITest.java
  Log:
  Patch from Christine Li (jycli@ca.ibm.com) for Bugzilla bug report 22167.
  
  When the zero-argument constructor of DOMSource, StreamSource or SAXSource is
  invoked, and no setter method is called to specify an actual source, the
  source should be treated as if it contained only a root node.  This implies that
  a DOMSource containing just a Document node should be legitimate for
  transformation.
  
  Revision  Changes    Path
  1.13      +6 -7      xml-xalan/test/java/src/org/apache/qetest/trax/dom/DOMSourceAPITest.java
  
  Index: DOMSourceAPITest.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/test/java/src/org/apache/qetest/trax/dom/DOMSourceAPITest.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- DOMSourceAPITest.java	31 Jan 2003 15:47:18 -0000	1.12
  +++ DOMSourceAPITest.java	21 Oct 2003 14:47:42 -0000	1.13
  @@ -310,16 +310,15 @@
               reporter.logTraceMsg("@todo validate the dom in memory as well");
   
               // A blank DOM as source doc of the transform - should 
  -            //  throw exception (new functionality Dec-00)
  +            // create an empty source Document using 
  +            // DocumentBuilder.newDocument(). 
               DOMSource blankSource = new DOMSource();
               Node emptyNode = docBuilder.newDocument();
               DOMResult emptyNodeDOM = new DOMResult(emptyNode);
               reporter.logTraceMsg("About to transform(blankSource, emptyNodeDOM)");
  -            transformerXSL.transform(blankSource, emptyNodeDOM); // SPR SCUU4R5KLL throws TransformerException
  -            // Note: functionality (and hopefully Javadoc too) have 
  -            //  been updated to make it illegal to use a DOMSource 
  -            //  with a null node as the input document -sc 18-Dec-00
  -            reporter.checkFail("transform(blankDOM, result) should throw exception", "SCUU4R5KLL");
  +            transformerXSL.transform(blankSource, emptyNodeDOM); 
  +
  +            reporter.check(emptyNodeDOM.getNode().toString(),"[#document: null]","transform(blankDOM, result) should create an empty document");
           }
           catch (Throwable t)
           {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org