JAL-2805 allow for non-xsd validating phyloxml parsing
[jalview.git] / src / jalview / ext / forester / io / ForesterParser.java
index 4cd84b1..469463e 100644 (file)
@@ -41,9 +41,16 @@ public class ForesterParser
   public static ForesterParser createPhyloXmlParser(File file)
           throws PhylogenyParserException, IOException
   {
-    // support non-xsd validating?
+    if (AptxInit.APTX_CONFIG.isValidatePhyloXmlAgainstSchema())
+    {
     return new ForesterParser(
-            PhyloXmlParser.createPhyloXmlParserXsdValidating(), file);
+              PhyloXmlParser.createPhyloXmlParserXsdValidating(), file);
+    }
+    else
+    {
+      return new ForesterParser(PhyloXmlParser.createPhyloXmlParser(),
+              file);
+    }
   }
 
   // ParserBasedPhylogenyFactory.getInstance().create(foresterParser, source)