Changeset 3472


Ignore:
Timestamp:
12/12/07 13:34:45 (12 years ago)
Author:
curtis
Message:

Be more forgiving with schemaLocation attribute namespace (or lack thereof),
since validation raises an error for invalid schemaLocation attributes anyway.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/loci/formats/XMLTools.java

    r3147 r3472  
    209209        String name = attributes.getQName(i); 
    210210        if (name.equals("xmlns")) xmlns = attributes.getValue(i); 
    211         else if (name.equals("xsi:schemaLocation")) { 
     211        int colon = name.lastIndexOf(":"); 
     212        if (colon >= 0) name = name.substring(colon + 1); // strip namespace 
     213        else if (name.equals("schemaLocation")) { 
    212214          xsiSchemaLocation = attributes.getValue(i); 
    213215        } 
Note: See TracChangeset for help on using the changeset viewer.