tmiller     01/05/23 08:23:06

  Modified:    java/src/org/apache/xalan/xsltc/compiler Text.java
  Log:
  bug fix 1403, output escaping fixed
  
  Revision  Changes    Path
  1.3       +13 -10    
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/Text.java
  
  Index: Text.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/Text.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Text.java 2001/05/02 10:25:07     1.2
  +++ Text.java 2001/05/23 15:22:59     1.3
  @@ -1,5 +1,5 @@
   /*
  - * @(#)$Id: Text.java,v 1.2 2001/05/02 10:25:07 morten Exp $
  + * @(#)$Id: Text.java,v 1.3 2001/05/23 15:22:59 tmiller Exp $
    *
    * The Apache Software License, Version 1.1
    *
  @@ -116,10 +116,14 @@
            // Turn off character escaping if so is wanted.
            final int esc = cpg.addInterfaceMethodref(OUTPUT_HANDLER,
                                                      "setEscaping", "(Z)Z");
  -         // Turn off character escaping if so is wanted.
  -         if (!_escaping) {
  +         // set escaping value in output handler 
  +         if (_escaping) {
  +             il.append(methodGen.loadHandler());
  +             il.append(new PUSH(cpg,true));
  +             il.append(new INVOKEINTERFACE(esc, 2));
  +         } else {
                il.append(methodGen.loadHandler());
  -             il.append(new PUSH(cpg,false));
  +             il.append(new PUSH(cpg, false));
                il.append(new INVOKEINTERFACE(esc, 2));
            }
   
  @@ -131,12 +135,11 @@
                                                         CHARACTERSW_SIG)));
   
            // Restore character escaping setting to whatever it was.
  -         if (!_escaping) {
  -             il.append(methodGen.loadHandler());
  -             il.append(SWAP);
  -             il.append(new INVOKEINTERFACE(esc, 2));
  -             il.append(POP);
  -         }
  +         // Note: setEscaping(bool) returns the original (old) value
  +         il.append(methodGen.loadHandler());
  +         il.append(SWAP);
  +         il.append(new INVOKEINTERFACE(esc, 2));
  +         il.append(POP);
        }
   
       }
  
  
  

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

Reply via email to