001    /**
002     * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.util;
016    
017    import com.liferay.portal.kernel.log.Log;
018    import com.liferay.portal.kernel.log.LogFactoryUtil;
019    import com.liferay.portal.kernel.util.Http;
020    import com.liferay.portal.kernel.util.KeyValuePair;
021    
022    import java.io.InputStream;
023    
024    import org.apache.xerces.xni.XNIException;
025    
026    import org.xml.sax.InputSource;
027    
028    /**
029     * @author Brian Wing Shun Chan
030     */
031    public class EntityResolver implements org.xml.sax.EntityResolver {
032    
033            public InputSource resolveEntity(String publicId, String systemId) {
034                    ClassLoader classLoader = getClass().getClassLoader();
035    
036                    if (_log.isDebugEnabled()) {
037                            _log.debug("Resolving entity " + publicId + " " + systemId);
038                    }
039    
040                    if (publicId != null) {
041                            for (int i = 0; i < _PUBLIC_IDS.length; i++) {
042                                    KeyValuePair kvp = _PUBLIC_IDS[i];
043    
044                                    if (publicId.equals(kvp.getKey())) {
045                                            InputStream is = classLoader.getResourceAsStream(
046                                                    _DEFINITIONS_PATH + kvp.getValue());
047    
048                                            if (is == null) {
049                                                    is = classLoader.getResourceAsStream(kvp.getValue());
050                                            }
051    
052                                            if (_log.isDebugEnabled()) {
053                                                    _log.debug("Entity found for public id " + publicId);
054                                            }
055    
056                                            return new InputSource(is);
057                                    }
058                            }
059                    }
060                    else if (systemId != null) {
061                            for (int i = 0; i < _SYSTEM_IDS.length; i++) {
062                                    KeyValuePair kvp = _SYSTEM_IDS[i];
063    
064                                    if (systemId.equals(kvp.getKey())) {
065                                            InputStream is = classLoader.getResourceAsStream(
066                                                    _DEFINITIONS_PATH + kvp.getValue());
067    
068                                            if (is == null) {
069                                                    is = classLoader.getResourceAsStream(kvp.getValue());
070                                            }
071    
072                                            if (_log.isDebugEnabled()) {
073                                                    _log.debug("Entity found for system id " + systemId);
074                                            }
075    
076                                            InputSource inputSource = new InputSource(is);
077    
078                                            inputSource.setSystemId(kvp.getKey());
079    
080                                            return inputSource;
081                                    }
082                            }
083    
084                            if (!systemId.endsWith(".dtd") && !systemId.endsWith(".xsd")) {
085                                    throw new XNIException("Invalid system id " + systemId);
086                            }
087    
088                            if (!systemId.startsWith(Http.HTTP_WITH_SLASH) &&
089                                    !systemId.startsWith(Http.HTTPS_WITH_SLASH)) {
090    
091                                    InputStream inputStream = classLoader.getResourceAsStream(
092                                            systemId);
093    
094                                    if (inputStream != null) {
095                                            InputSource inputSource = new InputSource(inputStream);
096    
097                                            inputSource.setSystemId(systemId);
098    
099                                            return inputSource;
100                                    }
101                                    else {
102                                            throw new XNIException("Invalid system id " + systemId);
103                                    }
104                            }
105                    }
106    
107                    if (_log.isDebugEnabled()) {
108                            _log.debug("No entity found for " + publicId + " " + systemId);
109                    }
110    
111                    return null;
112            }
113    
114            private static final String _DEFINITIONS_PATH =
115                    "com/liferay/portal/definitions/";
116    
117            private static final KeyValuePair[] _PUBLIC_IDS = {
118                    new KeyValuePair(
119                            "datatypes", "datatypes.dtd"
120                    ),
121    
122                    new KeyValuePair(
123                            "-//Sun Microsystems, Inc.//DTD Facelet Taglib 1.0//EN",
124                            "facelet-taglib_1_0.dtd"
125                    ),
126    
127                    new KeyValuePair(
128                            "-//Hibernate/Hibernate Mapping DTD 3.0//EN",
129                            "hibernate-mapping-3.0.dtd"
130                    ),
131    
132                    new KeyValuePair(
133                            "-//Liferay//DTD Display 2.0.0//EN", "liferay-display_2_0_0.dtd"
134                    ),
135    
136                    new KeyValuePair(
137                            "-//Liferay//DTD Display 3.5.0//EN", "liferay-display_3_5_0.dtd"
138                    ),
139    
140                    new KeyValuePair(
141                            "-//Liferay//DTD Display 4.0.0//EN", "liferay-display_4_0_0.dtd"
142                    ),
143    
144                    new KeyValuePair(
145                            "-//Liferay//DTD Display 5.0.0//EN", "liferay-display_5_0_0.dtd"
146                    ),
147    
148                    new KeyValuePair(
149                            "-//Liferay//DTD Display 5.1.0//EN", "liferay-display_5_1_0.dtd"
150                    ),
151    
152                    new KeyValuePair(
153                            "-//Liferay//DTD Display 5.2.0//EN", "liferay-display_5_2_0.dtd"
154                    ),
155    
156                    new KeyValuePair(
157                            "-//Liferay//DTD Display 6.0.0//EN", "liferay-display_6_0_0.dtd"
158                    ),
159    
160                    new KeyValuePair(
161                            "-//Liferay//DTD Display 6.1.0//EN", "liferay-display_6_1_0.dtd"
162                    ),
163    
164                    new KeyValuePair(
165                            "-//Liferay//DTD Display 6.2.0//EN", "liferay-display_6_2_0.dtd"
166                    ),
167    
168                    new KeyValuePair(
169                            "-//Liferay//DTD Friendly URL Routes 6.0.0//EN",
170                            "liferay-friendly-url-routes_6_0_0.dtd"
171                    ),
172    
173                    new KeyValuePair(
174                            "-//Liferay//DTD Friendly URL Routes 6.1.0//EN",
175                            "liferay-friendly-url-routes_6_1_0.dtd"
176                    ),
177    
178                    new KeyValuePair(
179                            "-//Liferay//DTD Friendly URL Routes 6.2.0//EN",
180                            "liferay-friendly-url-routes_6_2_0.dtd"
181                    ),
182    
183                    new KeyValuePair(
184                            "-//Liferay//DTD Hook 5.1.0//EN", "liferay-hook_5_1_0.dtd"
185                    ),
186    
187                    new KeyValuePair(
188                            "-//Liferay//DTD Hook 5.2.0//EN", "liferay-hook_5_2_0.dtd"
189                    ),
190    
191                    new KeyValuePair(
192                            "-//Liferay//DTD Hook 6.0.0//EN", "liferay-hook_6_0_0.dtd"
193                    ),
194    
195                    new KeyValuePair(
196                            "-//Liferay//DTD Hook 6.1.0//EN", "liferay-hook_6_1_0.dtd"
197                    ),
198    
199                    new KeyValuePair(
200                            "-//Liferay//DTD Hook 6.2.0//EN", "liferay-hook_6_2_0.dtd"
201                    ),
202    
203                    new KeyValuePair(
204                            "-//Liferay//DTD Layout Templates 3.6.0//EN",
205                            "liferay-layout-templates_3_6_0.dtd"
206                    ),
207    
208                    new KeyValuePair(
209                            "-//Liferay//DTD Layout Templates 4.0.0//EN",
210                            "liferay-layout-templates_4_0_0.dtd"
211                    ),
212    
213                    new KeyValuePair(
214                            "-//Liferay//DTD Layout Templates 4.3.0//EN",
215                            "liferay-layout-templates_4_3_0.dtd"
216                    ),
217    
218                    new KeyValuePair(
219                            "-//Liferay//DTD Layout Templates 5.0.0//EN",
220                            "liferay-layout-templates_5_0_0.dtd"
221                    ),
222    
223                    new KeyValuePair(
224                            "-//Liferay//DTD Layout Templates 5.1.0//EN",
225                            "liferay-layout-templates_5_1_0.dtd"
226                    ),
227    
228                    new KeyValuePair(
229                            "-//Liferay//DTD Layout Templates 5.2.0//EN",
230                            "liferay-layout-templates_5_2_0.dtd"
231                    ),
232    
233                    new KeyValuePair(
234                            "-//Liferay//DTD Layout Templates 6.0.0//EN",
235                            "liferay-layout-templates_6_0_0.dtd"
236                    ),
237    
238                    new KeyValuePair(
239                            "-//Liferay//DTD Layout Templates 6.1.0//EN",
240                            "liferay-layout-templates_6_1_0.dtd"
241                    ),
242    
243                    new KeyValuePair(
244                            "-//Liferay//DTD Layout Templates 6.2.0//EN",
245                            "liferay-layout-templates_6_2_0.dtd"
246                    ),
247    
248                    new KeyValuePair(
249                            "-//Liferay//DTD Look and Feel 3.5.0//EN",
250                            "liferay-look-and-feel_3_5_0.dtd"
251                    ),
252    
253                    new KeyValuePair(
254                            "-//Liferay//DTD Look and Feel 4.0.0//EN",
255                            "liferay-look-and-feel_4_0_0.dtd"
256                    ),
257    
258                    new KeyValuePair(
259                            "-//Liferay//DTD Look and Feel 4.3.0//EN",
260                            "liferay-look-and-feel_4_3_0.dtd"
261                    ),
262    
263                    new KeyValuePair(
264                            "-//Liferay//DTD Look and Feel 5.0.0//EN",
265                            "liferay-look-and-feel_5_0_0.dtd"
266                    ),
267    
268                    new KeyValuePair(
269                            "-//Liferay//DTD Look and Feel 5.1.0//EN",
270                            "liferay-look-and-feel_5_1_0.dtd"
271                    ),
272    
273                    new KeyValuePair(
274                            "-//Liferay//DTD Look and Feel 5.2.0//EN",
275                            "liferay-look-and-feel_5_2_0.dtd"
276                    ),
277    
278                    new KeyValuePair(
279                            "-//Liferay//DTD Look and Feel 6.0.0//EN",
280                            "liferay-look-and-feel_6_0_0.dtd"
281                    ),
282    
283                    new KeyValuePair(
284                            "-//Liferay//DTD Look and Feel 6.1.0//EN",
285                            "liferay-look-and-feel_6_1_0.dtd"
286                    ),
287    
288                    new KeyValuePair(
289                            "-//Liferay//DTD Look and Feel 6.2.0//EN",
290                            "liferay-look-and-feel_6_2_0.dtd"
291                    ),
292    
293                    new KeyValuePair(
294                            "-//Liferay//DTD Plugin Package 4.3.0//EN",
295                            "liferay-plugin-package_4_3_0.dtd"
296                    ),
297    
298                    new KeyValuePair(
299                            "-//Liferay//DTD Plugin Package 5.0.0//EN",
300                            "liferay-plugin-package_5_0_0.dtd"
301                    ),
302    
303                    new KeyValuePair(
304                            "-//Liferay//DTD Plugin Package 5.1.0//EN",
305                            "liferay-plugin-package_5_1_0.dtd"
306                    ),
307    
308                    new KeyValuePair(
309                            "-//Liferay//DTD Plugin Package 5.2.0//EN",
310                            "liferay-plugin-package_5_2_0.dtd"
311                    ),
312    
313                    new KeyValuePair(
314                            "-//Liferay//DTD Plugin Package 6.0.0//EN",
315                            "liferay-plugin-package_6_0_0.dtd"
316                    ),
317    
318                    new KeyValuePair(
319                            "-//Liferay//DTD Plugin Package 6.1.0//EN",
320                            "liferay-plugin-package_6_1_0.dtd"
321                    ),
322    
323                    new KeyValuePair(
324                            "-//Liferay//DTD Plugin Package 6.2.0//EN",
325                            "liferay-plugin-package_6_2_0.dtd"
326                    ),
327    
328                    new KeyValuePair(
329                            "-//Liferay//DTD Plugin Repository 4.3.0//EN",
330                            "liferay-plugin-repository_4_3_0.dtd"
331                    ),
332    
333                    new KeyValuePair(
334                            "-//Liferay//DTD Plugin Repository 5.0.0//EN",
335                            "liferay-plugin-repository_5_0_0.dtd"
336                    ),
337    
338                    new KeyValuePair(
339                            "-//Liferay//DTD Plugin Repository 5.1.0//EN",
340                            "liferay-plugin-repository_5_1_0.dtd"
341                    ),
342    
343                    new KeyValuePair(
344                            "-//Liferay//DTD Plugin Repository 5.2.0//EN",
345                            "liferay-plugin-repository_5_2_0.dtd"
346                    ),
347    
348                    new KeyValuePair(
349                            "-//Liferay//DTD Plugin Repository 6.0.0//EN",
350                            "liferay-plugin-repository_6_0_0.dtd"
351                    ),
352    
353                    new KeyValuePair(
354                            "-//Liferay//DTD Plugin Repository 6.1.0//EN",
355                            "liferay-plugin-repository_6_1_0.dtd"
356                    ),
357    
358                    new KeyValuePair(
359                            "-//Liferay//DTD Plugin Repository 6.2.0//EN",
360                            "liferay-plugin-repository_6_2_0.dtd"
361                    ),
362    
363                    new KeyValuePair(
364                            "-//Liferay//DTD Portlet Application 3.5.0//EN",
365                            "liferay-portlet-app_3_5_0.dtd"
366                    ),
367    
368                    new KeyValuePair(
369                            "-//Liferay//DTD Portlet Application 4.0.0//EN",
370                            "liferay-portlet-app_4_0_0.dtd"
371                    ),
372    
373                    new KeyValuePair(
374                            "-//Liferay//DTD Portlet Application 4.1.0//EN",
375                            "liferay-portlet-app_4_1_0.dtd"
376                    ),
377    
378                    new KeyValuePair(
379                            "-//Liferay//DTD Portlet Application 4.2.0//EN",
380                            "liferay-portlet-app_4_2_0.dtd"
381                    ),
382    
383                    new KeyValuePair(
384                            "-//Liferay//DTD Portlet Application 4.3.0//EN",
385                            "liferay-portlet-app_4_3_0.dtd"
386                    ),
387    
388                    new KeyValuePair(
389                            "-//Liferay//DTD Portlet Application 4.3.1//EN",
390                            "liferay-portlet-app_4_3_1.dtd"
391                    ),
392    
393                    new KeyValuePair(
394                            "-//Liferay//DTD Portlet Application 4.3.2//EN",
395                            "liferay-portlet-app_4_3_2.dtd"
396                    ),
397    
398                    new KeyValuePair(
399                            "-//Liferay//DTD Portlet Application 4.3.3//EN",
400                            "liferay-portlet-app_4_3_3.dtd"
401                    ),
402    
403                    new KeyValuePair(
404                            "-//Liferay//DTD Portlet Application 4.3.6//EN",
405                            "liferay-portlet-app_4_3_6.dtd"
406                    ),
407    
408                    new KeyValuePair(
409                            "-//Liferay//DTD Portlet Application 4.4.0//EN",
410                            "liferay-portlet-app_4_4_0.dtd"
411                    ),
412    
413                    new KeyValuePair(
414                            "-//Liferay//DTD Portlet Application 5.0.0//EN",
415                            "liferay-portlet-app_5_0_0.dtd"
416                    ),
417    
418                    new KeyValuePair(
419                            "-//Liferay//DTD Portlet Application 5.1.0//EN",
420                            "liferay-portlet-app_5_1_0.dtd"
421                    ),
422    
423                    new KeyValuePair(
424                            "-//Liferay//DTD Portlet Application 5.2.0//EN",
425                            "liferay-portlet-app_5_2_0.dtd"
426                    ),
427    
428                    new KeyValuePair(
429                            "-//Liferay//DTD Portlet Application 6.0.0//EN",
430                            "liferay-portlet-app_6_0_0.dtd"
431                    ),
432    
433                    new KeyValuePair(
434                            "-//Liferay//DTD Portlet Application 6.1.0//EN",
435                            "liferay-portlet-app_6_1_0.dtd"
436                    ),
437    
438                    new KeyValuePair(
439                            "-//Liferay//DTD Portlet Application 6.2.0//EN",
440                            "liferay-portlet-app_6_2_0.dtd"
441                    ),
442    
443                    new KeyValuePair(
444                            "-//Liferay//DTD Resource Action Mapping 6.0.0//EN",
445                            "liferay-resource-action-mapping_6_0_0.dtd"
446                    ),
447    
448                    new KeyValuePair(
449                            "-//Liferay//DTD Resource Action Mapping 6.1.0//EN",
450                            "liferay-resource-action-mapping_6_1_0.dtd"
451                    ),
452    
453                    new KeyValuePair(
454                            "-//Liferay//DTD Resource Action Mapping 6.2.0//EN",
455                            "liferay-resource-action-mapping_6_2_0.dtd"
456                    ),
457    
458                    new KeyValuePair(
459                            "-//Liferay//DTD Service Builder 3.5.0//EN",
460                            "liferay-service-builder_3_5_0.dtd"
461                    ),
462    
463                    new KeyValuePair(
464                            "-//Liferay//DTD Service Builder 3.6.1//EN",
465                            "liferay-service-builder_3_6_1.dtd"
466                    ),
467    
468                    new KeyValuePair(
469                            "-//Liferay//DTD Service Builder 4.0.0//EN",
470                            "liferay-service-builder_4_0_0.dtd"
471                    ),
472    
473                    new KeyValuePair(
474                            "-//Liferay//DTD Service Builder 4.2.0//EN",
475                            "liferay-service-builder_4_2_0.dtd"
476                    ),
477    
478                    new KeyValuePair(
479                            "-//Liferay//DTD Service Builder 4.3.0//EN",
480                            "liferay-service-builder_4_3_0.dtd"
481                    ),
482    
483                    new KeyValuePair(
484                            "-//Liferay//DTD Service Builder 4.3.3//EN",
485                            "liferay-service-builder_4_3_3.dtd"
486                    ),
487    
488                    new KeyValuePair(
489                            "-//Liferay//DTD Service Builder 4.4.0//EN",
490                            "liferay-service-builder_4_4_0.dtd"
491                    ),
492    
493                    new KeyValuePair(
494                            "-//Liferay//DTD Service Builder 5.0.0//EN",
495                            "liferay-service-builder_5_0_0.dtd"
496                    ),
497    
498                    new KeyValuePair(
499                            "-//Liferay//DTD Service Builder 5.1.0//EN",
500                            "liferay-service-builder_5_1_0.dtd"
501                    ),
502    
503                    new KeyValuePair(
504                            "-//Liferay//DTD Service Builder 5.2.0//EN",
505                            "liferay-service-builder_5_2_0.dtd"
506                    ),
507    
508                    new KeyValuePair(
509                            "-//Liferay//DTD Service Builder 6.0.0//EN",
510                            "liferay-service-builder_6_0_0.dtd"
511                    ),
512    
513                    new KeyValuePair(
514                            "-//Liferay//DTD Service Builder 6.1.0//EN",
515                            "liferay-service-builder_6_1_0.dtd"
516                    ),
517    
518                    new KeyValuePair(
519                            "-//Liferay//DTD Service Builder 6.2.0//EN",
520                            "liferay-service-builder_6_2_0.dtd"
521                    ),
522    
523                    new KeyValuePair(
524                            "-//Liferay//DTD Social 6.1.0//EN", "liferay-social_6_1_0.dtd"
525                    ),
526    
527                    new KeyValuePair(
528                            "-//Liferay//DTD Social 6.2.0//EN", "liferay-social_6_2_0.dtd"
529                    ),
530    
531                    new KeyValuePair(
532                            "-//Liferay//DTD Theme Loader 4.3.0//EN",
533                            "liferay-theme-loader_4_3_0.dtd"
534                    ),
535    
536                    new KeyValuePair(
537                            "-//Liferay//DTD Theme Loader 5.0.0//EN",
538                            "liferay-theme-loader_5_0_0.dtd"
539                    ),
540    
541                    new KeyValuePair(
542                            "-//Liferay//DTD Theme Loader 5.1.0//EN",
543                            "liferay-theme-loader_5_1_0.dtd"
544                    ),
545    
546                    new KeyValuePair(
547                            "-//Liferay//DTD Theme Loader 5.2.0//EN",
548                            "liferay-theme-loader_5_2_0.dtd"
549                    ),
550    
551                    new KeyValuePair(
552                            "-//Liferay//DTD Theme Loader 6.0.0//EN",
553                            "liferay-theme-loader_6_0_0.dtd"
554                    ),
555    
556                    new KeyValuePair(
557                            "-//Liferay//DTD Theme Loader 6.1.0//EN",
558                            "liferay-theme-loader_6_1_0.dtd"
559                    ),
560    
561                    new KeyValuePair(
562                            "-//Liferay//DTD Theme Loader 6.2.0//EN",
563                            "liferay-theme-loader_6_2_0.dtd"
564                    ),
565    
566                    new KeyValuePair(
567                            "-//MuleSource //DTD mule-configuration XML V1.0//EN",
568                            "mule-configuration.dtd"
569                    ),
570    
571                    new KeyValuePair(
572                            "-//SPRING//DTD BEAN//EN", "spring-beans.dtd"
573                    ),
574    
575                    new KeyValuePair(
576                            "-//Apache Software Foundation//DTD Struts Configuration 1.2//EN",
577                            "struts-config_1_2.dtd"
578                    ),
579    
580                    new KeyValuePair(
581                            "-//Apache Software Foundation//DTD Tiles Configuration 1.1//EN",
582                            "tiles-config_1_1.dtd"
583                    ),
584    
585                    new KeyValuePair(
586                            "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN",
587                            "web-app_2_3.dtd"
588                    ),
589    
590                    new KeyValuePair(
591                            "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN",
592                            "web-facesconfig_1_0.dtd"
593                    ),
594    
595                    new KeyValuePair(
596                            "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN",
597                            "web-facesconfig_1_1.dtd"
598                    ),
599    
600                    new KeyValuePair(
601                            "-//W3C//DTD XMLSCHEMA 200102//EN", "XMLSchema.dtd"
602                    )
603            };
604    
605            private static final KeyValuePair[] _SYSTEM_IDS = {
606                    new KeyValuePair(
607                            "http://java.sun.com/xml/ns/j2ee/j2ee_1_4.xsd", "j2ee_1_4.xsd"
608                    ),
609    
610                    new KeyValuePair(
611                            "http://www.ibm.com/webservices/xsd/" +
612                                    "j2ee_web_services_client_1_1.xsd",
613                            "j2ee_web_services_client_1_1.xsd"
614                    ),
615    
616                    new KeyValuePair(
617                            "http://java.sun.com/xml/ns/javaee/javaee_5.xsd", "javaee_5.xsd"
618                    ),
619    
620                    new KeyValuePair(
621                            "http://java.sun.com/xml/ns/javaee/javaee_6.xsd", "javaee_6.xsd"
622                    ),
623    
624                    new KeyValuePair(
625                            "http://java.sun.com/xml/ns/javaee/" +
626                                    "javaee_web_services_client_1_2.xsd",
627                            "javaee_web_services_client_1_2.xsd"
628                    ),
629    
630                    new KeyValuePair(
631                            "http://java.sun.com/xml/ns/javaee/" +
632                                    "javaee_web_services_client_1_3.xsd",
633                            "javaee_web_services_client_1_3.xsd"
634                    ),
635    
636                    new KeyValuePair(
637                            "http://java.sun.com/xml/ns/j2ee/jsp_2_0.xsd", "jsp_2_0.xsd"
638                    ),
639    
640                    new KeyValuePair(
641                            "http://java.sun.com/xml/ns/javaee/jsp_2_1.xsd", "jsp_2_1.xsd"
642                    ),
643    
644                    new KeyValuePair(
645                            "http://java.sun.com/xml/ns/javaee/jsp_2_2.xsd", "jsp_2_2.xsd"
646                    ),
647    
648                    new KeyValuePair(
649                            "http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd",
650                            "portlet-app_1_0.xsd"
651                    ),
652    
653                    new KeyValuePair(
654                            "http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd",
655                            "portlet-app_2_0.xsd"
656                    ),
657    
658                    new KeyValuePair(
659                            "http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd", "web-app_2_4.xsd"
660                    ),
661    
662                    new KeyValuePair(
663                            "http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd",
664                            "web-app_2_5.xsd"
665                    ),
666    
667                    new KeyValuePair(
668                            "http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd",
669                            "web-app_3_0.xsd"
670                    ),
671    
672                    new KeyValuePair(
673                            "http://java.sun.com/xml/ns/javaee/web-common_3_0.xsd",
674                            "web-common_3_0.xsd"
675                    ),
676    
677                    new KeyValuePair(
678                            "http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd",
679                            "web-facesconfig_1_2.xsd"
680                    ),
681    
682                    new KeyValuePair(
683                            "http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd",
684                            "web-facesconfig_2_0.xsd"
685                    ),
686    
687                    new KeyValuePair(
688                            "http://java.sun.com/xml/ns/javaee/web-facesconfig_2_1.xsd",
689                            "web-facesconfig_2_1.xsd"
690                    ),
691    
692                    new KeyValuePair(
693                            "http://www.liferay.com/dtd/liferay-workflow-definition_6_0_0.xsd",
694                            "liferay-workflow-definition_6_0_0.xsd"
695                    ),
696    
697                    new KeyValuePair(
698                            "http://www.liferay.com/dtd/liferay-workflow-definition_6_1_0.xsd",
699                            "liferay-workflow-definition_6_1_0.xsd"
700                    ),
701    
702                    new KeyValuePair(
703                            "http://www.w3.org/2001/xml.xsd", "xml.xsd"
704                    )
705            };
706    
707            private static Log _log = LogFactoryUtil.getLog(EntityResolver.class);
708    
709    }