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