You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by ne...@apache.org on 2003/01/03 17:14:03 UTC

cvs commit: xml-xerces/java/src/org/apache/xml/serialize BaseMarkupSerializer.java

neilg       2003/01/03 08:14:03

  Modified:    java/src/org/apache/xml/serialize BaseMarkupSerializer.java
  Log:
  reworking encoding support, as well as fixing bug #15313
  
  Revision  Changes    Path
  1.43      +9 -9      xml-xerces/java/src/org/apache/xml/serialize/BaseMarkupSerializer.java
  
  Index: BaseMarkupSerializer.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xml/serialize/BaseMarkupSerializer.java,v
  retrieving revision 1.42
  retrieving revision 1.43
  diff -u -r1.42 -r1.43
  --- BaseMarkupSerializer.java	23 Aug 2002 20:14:40 -0000	1.42
  +++ BaseMarkupSerializer.java	3 Jan 2003 16:14:03 -0000	1.43
  @@ -284,7 +284,7 @@
       private OutputStream    _output;
   
       /** Current node that is being processed  */
  -    private Node fCurrentNode = null;
  +    protected Node fCurrentNode = null;
   
       
   
  @@ -548,7 +548,7 @@
               saveIndent = _printer.getNextIndent();
               _printer.setNextIndent( 0 );
               char ch;
  -            for ( int index = 0 ; index < length ; ++index ) {
  +            for ( int index = start ; index < length ; ++index ) {
                   ch = chars[index];
                   if ( ch == ']' && index + 2 < length &&
                        chars[ index + 1 ] == ']' && chars[ index + 2 ] == '>' ) {
  @@ -566,7 +566,7 @@
                       }
                       continue;
                   } else {
  -                    if ( ( ch >= ' ' && _encodingInfo.isPrintable(ch) && ch != 0xF7 ) ||
  +                    if ( ( ch >= ' ' && _encodingInfo.isPrintable((char)ch) && ch != 0xF7 ) ||
                           ch == '\n' || ch == '\r' || ch == '\t' ) {
                           _printer.printText((char)ch);
                       } else {
  @@ -1470,7 +1470,7 @@
       // Text pretty printing and formatting methods //
       //---------------------------------------------//
   
  -    protected final void printCDATAText( String text ) throws IOException {
  +    protected void printCDATAText( String text ) throws IOException {
           int length = text.length();
           char ch;
   
  @@ -1515,7 +1515,7 @@
                   }
                   continue;
               } else {
  -                if ( ( ch >= ' ' && _encodingInfo.isPrintable(ch) && ch != 0xF7 ) ||
  +                if ( ( ch >= ' ' && _encodingInfo.isPrintable((char)ch) && ch != 0xF7 ) ||
                        ch == '\n' || ch == '\r' || ch == '\t' ) {
                       _printer.printText((char)ch);
                   } else {
  @@ -1530,7 +1530,7 @@
       }
   
   
  -    protected final void surrogates(int high, int low) throws IOException{
  +    protected void surrogates(int high, int low) throws IOException{
           if (XMLChar.isHighSurrogate(high)) {
               if (!XMLChar.isLowSurrogate(low)) {
                   //Invalid XML
  @@ -1690,7 +1690,7 @@
               _printer.printText( '&' );
               _printer.printText( charRef );
               _printer.printText( ';' );
  -        } else if ( ( ch >= ' ' && _encodingInfo.isPrintable(ch) && ch != 0xF7 ) ||
  +        } else if ( ( ch >= ' ' && _encodingInfo.isPrintable((char)ch) && ch != 0xF7 ) ||
                       ch == '\n' || ch == '\r' || ch == '\t' ) {
               // Non printables are below ASCII space but not tab or line
               // terminator, ASCII delete, or above a certain Unicode threshold.
  @@ -1875,7 +1875,7 @@
           
       }
   
  -    private boolean getFeature(String feature){
  +    protected boolean getFeature(String feature){
           return ((Boolean)fFeatures.get(feature)).booleanValue();
       }
   
  
  
  

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