Changeset 6667


Ignore:
Timestamp:
07/08/10 13:58:29 (9 years ago)
Author:
melissa
Message:
  • Updated undeclared namespace stripping logic to look for namespaces in the first non-comment tag.
  • Fixed OME-TIFF UUID matching bug.
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/4.2/components/bio-formats/src/loci/formats/in/OMETiffReader.java

    r6666 r6667  
    316316          if (!new Location(dir, filename).exists()) filename = null; 
    317317          if (filename == null) { 
    318             if (uuid.equals(currentUUID)) { 
     318            if (uuid.equals(currentUUID) || currentUUID == null) { 
    319319              // UUID references this file 
    320320              filename = id; 
  • branches/4.2/components/common/src/loci/common/xml/XMLTools.java

    r6663 r6667  
    353353    if (gt > 0) { 
    354354      String firstTag = xml.substring(0, gt + 1).toLowerCase(); 
     355 
     356      // the first tag is a comment; we need to find the first "real" tag 
     357      while (firstTag.endsWith("-->")) { 
     358        gt = xml.indexOf('>', gt + 1); 
     359        firstTag = xml.substring(0, gt + 1).toLowerCase(); 
     360      } 
     361 
    355362      Set namespaces = new HashSet(); 
    356363      Pattern pattern = Pattern.compile(" xmlns:(\\w+)"); 
  • trunk/components/bio-formats/src/loci/formats/in/OMETiffReader.java

    r6666 r6667  
    316316          if (!new Location(dir, filename).exists()) filename = null; 
    317317          if (filename == null) { 
    318             if (uuid.equals(currentUUID)) { 
     318            if (uuid.equals(currentUUID) || currentUUID == null) { 
    319319              // UUID references this file 
    320320              filename = id; 
  • trunk/components/common/src/loci/common/xml/XMLTools.java

    r6621 r6667  
    353353    if (gt > 0) { 
    354354      String firstTag = xml.substring(0, gt + 1).toLowerCase(); 
     355 
     356      // the first tag is a comment; we need to find the first "real" tag 
     357      while (firstTag.endsWith("-->")) { 
     358        gt = xml.indexOf('>', gt + 1); 
     359        firstTag = xml.substring(0, gt + 1).toLowerCase(); 
     360      } 
     361 
    355362      Set namespaces = new HashSet(); 
    356363      Pattern pattern = Pattern.compile(" xmlns:(\\w+)"); 
Note: See TracChangeset for help on using the changeset viewer.