Ignore:
Timestamp:
10/07/10 17:30:37 (9 years ago)
Author:
curtis
Message:

Merge latest LOCI Common trunk to Maven branch.

Location:
branches/maven/projects/loci-common/src/main/java/loci/common
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/maven/projects/loci-common/src/main/java/loci/common

  • branches/maven/projects/loci-common/src/main/java/loci/common/xml

    • Property svn:mergeinfo deleted
  • branches/maven/projects/loci-common/src/main/java/loci/common/xml/MetadataHandler.java

    r6495 r7045  
    3333 * 
    3434 * <dl><dt><b>Source code:</b></dt> 
    35  * <dd><a href="https://skyking.microscopy.wisc.edu/trac/java/browser/trunk/components/common/src/loci/common/xml/MetadataHandler.java">Trac</a>, 
    36  * <a href="https://skyking.microscopy.wisc.edu/svn/java/trunk/components/common/src/loci/common/xml/MetadataHandler.java">SVN</a></dd></dl> 
     35 * <dd><a href="http://dev.loci.wisc.edu/trac/java/browser/trunk/components/common/src/loci/common/xml/MetadataHandler.java">Trac</a>, 
     36 * <a href="http://dev.loci.wisc.edu/svn/java/trunk/components/common/src/loci/common/xml/MetadataHandler.java">SVN</a></dd></dl> 
    3737 * 
    3838 * @author Curtis Rueden ctrueden at wisc.edu 
  • branches/maven/projects/loci-common/src/main/java/loci/common/xml/ValidationErrorHandler.java

    r6717 r7045  
    3131 * 
    3232 * <dl><dt><b>Source code:</b></dt> 
    33  * <dd><a href="https://skyking.microscopy.wisc.edu/trac/java/browser/trunk/components/common/src/loci/common/xml/ValidationErrorHandler.java">Trac</a>, 
    34  * <a href="https://skyking.microscopy.wisc.edu/svn/java/trunk/components/common/src/loci/common/xml/ValidationErrorHandler.java">SVN</a></dd></dl> 
     33 * <dd><a href="http://dev.loci.wisc.edu/trac/java/browser/trunk/components/common/src/loci/common/xml/ValidationErrorHandler.java">Trac</a>, 
     34 * <a href="http://dev.loci.wisc.edu/svn/java/trunk/components/common/src/loci/common/xml/ValidationErrorHandler.java">SVN</a></dd></dl> 
    3535 * 
    3636 * @author Curtis Rueden ctrueden at wisc.edu 
  • branches/maven/projects/loci-common/src/main/java/loci/common/xml/ValidationSAXHandler.java

    r6495 r7045  
    3434 * 
    3535 * <dl><dt><b>Source code:</b></dt> 
    36  * <dd><a href="https://skyking.microscopy.wisc.edu/trac/java/browser/trunk/components/common/src/loci/common/xml/ValidationSAXHandler.java">Trac</a>, 
    37  * <a href="https://skyking.microscopy.wisc.edu/svn/java/trunk/components/common/src/loci/common/xml/ValidationSAXHandler.java">SVN</a></dd></dl> 
     36 * <dd><a href="http://dev.loci.wisc.edu/trac/java/browser/trunk/components/common/src/loci/common/xml/ValidationSAXHandler.java">Trac</a>, 
     37 * <a href="http://dev.loci.wisc.edu/svn/java/trunk/components/common/src/loci/common/xml/ValidationSAXHandler.java">SVN</a></dd></dl> 
    3838 * 
    3939 * @author Curtis Rueden ctrueden at wisc.edu 
  • branches/maven/projects/loci-common/src/main/java/loci/common/xml/XMLTools.java

    r6990 r7045  
    7474 * 
    7575 * <dl><dt><b>Source code:</b></dt> 
    76  * <dd><a href="https://skyking.microscopy.wisc.edu/trac/java/browser/trunk/components/common/src/loci/common/xml/XMLTools.java">Trac</a>, 
    77  * <a href="https://skyking.microscopy.wisc.edu/svn/java/trunk/components/common/src/loci/common/xml/XMLTools.java">SVN</a></dd></dl> 
     76 * <dd><a href="http://dev.loci.wisc.edu/trac/java/browser/trunk/components/common/src/loci/common/xml/XMLTools.java">Trac</a>, 
     77 * <a href="http://dev.loci.wisc.edu/svn/java/trunk/components/common/src/loci/common/xml/XMLTools.java">SVN</a></dd></dl> 
    7878 * 
    7979 * @author Curtis Rueden ctrueden at wisc.edu 
     
    150150  /** Remove invalid characters from an XML string. */ 
    151151  public static String sanitizeXML(String s) { 
     152    final char[] c = s.toCharArray(); 
    152153    for (int i=0; i<s.length(); i++) { 
    153       char c = s.charAt(i); 
    154       if (Character.isISOControl(c) || !Character.isDefined(c) || c > '~') { 
    155         s = s.replace(c, ' '); 
    156       } 
    157     } 
    158     return s; 
     154      if (Character.isISOControl(c[i]) || 
     155        !Character.isDefined(c[i]) || c[i] > '~') 
     156      { 
     157        c[i] = ' '; 
     158      } 
     159      // eliminate invalid &# sequences 
     160      if (i > 0 && c[i - 1] == '&' && c[i] == '#') c[i - 1] = ' '; 
     161    } 
     162    return new String(c); 
    159163  } 
    160164 
Note: See TracChangeset for help on using the changeset viewer.