1 /* Copyright (C) 2004 Finalist IT Group 2 * 3 * This file is part of JAG - the Java J2EE Application Generator 4 * 5 * JAG is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation; either version 2 of the License, or 8 * (at your option) any later version. 9 * JAG is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU General Public License for more details. 13 * You should have received a copy of the GNU General Public License 14 * along with JAG; if not, write to the Free Software 15 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 16 */ 17 18 package com.finalist.tools.ant.taskdefs; 19 20 import org.xml.sax.EntityResolver; 21 import org.xml.sax.InputSource; 22 import com.finalist.ant.tasks.docbook.ParameterValues; 23 24 /*** 25 * <code>DTDResolver.java</code> 26 * 27 * @author rudie 28 * @version $Revision: 1.2 $ 29 */ 30 31 public class DTDResolver implements EntityResolver{ 32 33 public InputSource resolveEntity(String publicId, String systemId) { 34 InputSource returnSource; 35 if( publicId.equalsIgnoreCase("-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN") ) { 36 returnSource = new InputSource( this.getClass().getResourceAsStream("/j2ee_dtd/application_1_3.dtd") ); 37 } else { 38 return null; 39 } 40 return returnSource; 41 } 42 } 43 44 /* 45 * $Log: DTDResolver.java,v $ 46 * Revision 1.2 2004/03/27 22:20:19 ekkelenkamp 47 * removed system out. 48 * 49 * Revision 1.1 2004/03/27 22:04:35 ekkelenkamp 50 * DTD resolver for offline code generation 51 * 52 * 53 */