You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by sb...@apache.org on 2001/01/11 19:37:40 UTC

cvs commit: xml-xalan/java/src/org/apache/xpath/compiler Compiler.java

sboag       01/01/11 10:37:39

  Modified:    java/src/org/apache/xpath/compiler Compiler.java
  Log:
  In getWhatToShow, in OpCodes.NODETYPE_TEXT, construct
  NodeFilter.SHOW_TEXT | NodeFilter.SHOW_CDATA_SECTION instead
  of just NodeFilter.SHOW_TEXT.
  Addresses bug submitted by Thomas Foerster <y0...@tu-bs.de>,
  01/10/2001 05:59 AM, "Different behavior between Xalan-C++ and Xalan-J?".
  The bug was not the disable-escaping
  mechanism itself, but the fact that the text() pattern was not matching
  CDATA section nodes!
  
  Two fixes have been made:
  1) the pattern itself has been fixed so that they will work correctly with
  input DOMs, and 2) the StreeDOMBuilder has been modified so that
  CDATASections aren't created at all... only text nodes.  Since CData
  sections are not part of the XPath data model, and append operations in the
  StreeDOMBuilder could screw things up anyway, Stree should not be creating
  CData section nodes.
  
  Revision  Changes    Path
  1.19      +1 -1      xml-xalan/java/src/org/apache/xpath/compiler/Compiler.java
  
  Index: Compiler.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/compiler/Compiler.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- Compiler.java	2001/01/07 06:24:40	1.18
  +++ Compiler.java	2001/01/11 18:37:36	1.19
  @@ -750,7 +750,7 @@
         return NodeFilter.SHOW_COMMENT;
       case OpCodes.NODETYPE_TEXT :
   //      return NodeFilter.SHOW_TEXT | NodeFilter.SHOW_COMMENT;
  -      return NodeFilter.SHOW_TEXT;
  +      return NodeFilter.SHOW_TEXT | NodeFilter.SHOW_CDATA_SECTION ;
       case OpCodes.NODETYPE_PI :
         return NodeFilter.SHOW_PROCESSING_INSTRUCTION;
       case OpCodes.NODETYPE_NODE :