001package jmri.util; 002 003/** 004 * Entity Resolver to return a null DTD content, used to bypass verification. 005 * 006 * @author Bob Jacobsen Copyright 2007 007 */ 008import org.slf4j.Logger; 009import org.slf4j.LoggerFactory; 010import org.xml.sax.EntityResolver; 011import org.xml.sax.InputSource; 012 013/** 014 * Return a content-less DTD 015 */ 016public class JmriNullEntityResolver implements EntityResolver { 017 018 @Override 019 public InputSource resolveEntity(String publicId, String systemId) { 020 log.debug("resolves {}", systemId); 021 return new InputSource(new java.io.StringReader("")); 022 } 023 024 private static final Logger log = LoggerFactory.getLogger(JmriNullEntityResolver.class); 025 026}