From dae807ace15f5a4d7ada11c9862c13aea4302cad Mon Sep 17 00:00:00 2001 From: markt Date: Thu, 31 Dec 2009 11:05:45 +0000 Subject: [PATCH] Add the Java EE 6 schemas to support validation git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@894813 13f79535-47bb-0310-9956-ffa450edef68 --- java/org/apache/catalina/startup/Constants.java | 36 +++++++++++++++++++++- .../apache/catalina/startup/DigesterFactory.java | 27 ++++++++++++++++ 2 files changed, 62 insertions(+), 1 deletion(-) diff --git a/java/org/apache/catalina/startup/Constants.java b/java/org/apache/catalina/startup/Constants.java index a00eb993c..134b3c0d1 100644 --- a/java/org/apache/catalina/startup/Constants.java +++ b/java/org/apache/catalina/startup/Constants.java @@ -49,6 +49,11 @@ public final class Constants { public static final String JavaeeSchemaResourcePath_5 = "/javax/servlet/resources/javaee_5.xsd"; + public static final String JavaeeSchemaPublicId_6 = + "javaee_6.xsd"; + public static final String JavaeeSchemaResourcePath_6 = + "/javax/servlet/resources/javaee_6.xsd"; + // W3C public static final String W3cSchemaPublicId_10 = @@ -77,7 +82,12 @@ public final class Constants { "jsp_2_1.xsd"; public static final String JspSchemaResourcePath_21 = "/javax/servlet/jsp/resources/jsp_2_1.xsd"; - + + public static final String JspSchemaPublicId_22 = + "jsp_2_2.xsd"; + public static final String JspSchemaResourcePath_22 = + "/javax/servlet/jsp/resources/jsp_2_2.xsd"; + // TLD public static final String TldDtdPublicId_11 = @@ -122,6 +132,20 @@ public final class Constants { public static final String WebSchemaResourcePath_25 = "/javax/servlet/resources/web-app_2_5.xsd"; + public static final String WebSchemaPublicId_30 = + "web-app_3_0.xsd"; + public static final String WebSchemaResourcePath_30 = + "/javax/servlet/resources/web-app_3_0.xsd"; + + public static final String WebCommonSchemaPublicId_30 = + "web-common_3_0.xsd"; + public static final String WebCommonSchemaResourcePath_30 = + "/javax/servlet/resources/web-common_3_0.xsd"; + + public static final String WebFragmentSchemaPublicId_30 = + "web-fragment_3_0.xsd"; + public static final String WebFragmentSchemaResourcePath_30 = + "/javax/servlet/resources/web-fragment_3_0.xsd"; // Web service public static final String J2eeWebServiceSchemaPublicId_11 = @@ -144,4 +168,14 @@ public final class Constants { public static final String JavaeeWebServiceClientSchemaResourcePath_12 = "/javax/servlet/resources/javaee_web_services_client_1_2.xsd"; + public static final String JavaeeWebServiceSchemaPublicId_13 = + "javaee_web_services_1_3.xsd"; + public static final String JavaeeWebServiceSchemaResourcePath_13 = + "/javax/servlet/resources/javaee_web_services_1_3.xsd"; + + public static final String JavaeeWebServiceClientSchemaPublicId_13 = + "javaee_web_services_client_1_3.xsd"; + public static final String JavaeeWebServiceClientSchemaResourcePath_13 = + "/javax/servlet/resources/javaee_web_services_client_1_3.xsd"; + } diff --git a/java/org/apache/catalina/startup/DigesterFactory.java b/java/org/apache/catalina/startup/DigesterFactory.java index 939feab89..c8ae58623 100644 --- a/java/org/apache/catalina/startup/DigesterFactory.java +++ b/java/org/apache/catalina/startup/DigesterFactory.java @@ -95,6 +95,10 @@ public class DigesterFactory { Constants.JavaeeSchemaPublicId_5, schemaResolver); + register(Constants.JavaeeSchemaResourcePath_6, + Constants.JavaeeSchemaPublicId_6, + schemaResolver); + // W3C register(Constants.W3cSchemaResourcePath_10, Constants.W3cSchemaPublicId_10, @@ -117,6 +121,10 @@ public class DigesterFactory { Constants.JspSchemaPublicId_21, schemaResolver); + register(Constants.JspSchemaResourcePath_22, + Constants.JspSchemaPublicId_22, + schemaResolver); + // TLD register(Constants.TldDtdResourcePath_11, Constants.TldDtdPublicId_11, @@ -151,6 +159,18 @@ public class DigesterFactory { Constants.WebSchemaPublicId_25, schemaResolver); + register(Constants.WebSchemaResourcePath_30, + Constants.WebSchemaPublicId_30, + schemaResolver); + + register(Constants.WebCommonSchemaResourcePath_30, + Constants.WebCommonSchemaPublicId_30, + schemaResolver); + + register(Constants.WebFragmentSchemaResourcePath_30, + Constants.WebFragmentSchemaPublicId_30, + schemaResolver); + // Web Service register(Constants.J2eeWebServiceSchemaResourcePath_11, Constants.J2eeWebServiceSchemaPublicId_11, @@ -168,6 +188,13 @@ public class DigesterFactory { Constants.JavaeeWebServiceClientSchemaPublicId_12, schemaResolver); + register(Constants.JavaeeWebServiceSchemaResourcePath_13, + Constants.JavaeeWebServiceSchemaPublicId_13, + schemaResolver); + + register(Constants.JavaeeWebServiceClientSchemaResourcePath_13, + Constants.JavaeeWebServiceClientSchemaPublicId_13, + schemaResolver); } -- 2.11.0