volosied commented on code in PR #805:
URL: https://github.com/apache/myfaces/pull/805#discussion_r1857700906


##########
impl/src/main/java/org/apache/myfaces/config/ConfigFilesXmlValidationUtils.java:
##########
@@ -530,44 +584,61 @@ public static void validateFaceletTagLibFile(URL xmlFile, 
ExternalContext extern
         }
     }
 
-    private static Source getFaceletSchemaFileAsSource(ExternalContext 
externalContext)
+    private static Source getFaceletSchemaFileAsSource(ExternalContext 
externalContext, Double version)
     {
-        InputStream stream = 
ClassUtils.getResourceAsStream(FACES_TAGLIB_SCHEMA_PATH);
+        String tagLibraryPath = "";
 
-        if (stream == null)
+        if(version == 4.1)
+        {
+            tagLibraryPath = FACES_TAGLIB_SCHEMA_PATH_41;
+        } 
+        else if(version == 4.0)
         {
-           stream = 
externalContext.getResourceAsStream(FACES_TAGLIB_SCHEMA_PATH);
+            tagLibraryPath = FACES_TAGLIB_SCHEMA_PATH_40;
         }
-
-        if (stream == null)
+        else if(version == 3.0)
         {
-            return null;
+            tagLibraryPath = FACES_TAGLIB_SCHEMA_PATH_30;
+        }
+        else if(version == 2.3)
+        {
+            tagLibraryPath = FACES_TAGLIB_SCHEMA_PATH_23;
+        }
+        else if(version == 2.2)
+        {
+            tagLibraryPath = FACES_TAGLIB_SCHEMA_PATH_22;
+        }
+        else
+        {
+            tagLibraryPath = FACES_TAGLIB_SCHEMA_PATH_20;
         }
 
-        return new StreamSource(stream);
-    }
+        InputStream stream = ClassUtils.getResourceAsStream(tagLibraryPath);
 
-    public static final String getFaceletTagLibVersion(URL url)
-    {
-        if (isTaglibDocument20OrLater(url))
+        if (stream == null)
         {
-            return "2.0";
+           stream = externalContext.getResourceAsStream(tagLibraryPath);
         }
-        else
+
+        if (stream == null)
         {
-            return "1.0";
+            return null;
         }
+
+        System.out.println("USING: "  + tagLibraryPath);

Review Comment:
   Remove



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to