Package org.xhtmlrenderer.resource
Class FSEntityResolver
- java.lang.Object
-
- org.xhtmlrenderer.resource.FSEntityResolver
-
- All Implemented Interfaces:
org.xml.sax.EntityResolver
public class FSEntityResolver extends java.lang.Object implements org.xml.sax.EntityResolverA SAX EntityResolver for common entity references and DTDs in X/HTML processing. Maps official entity references to local copies to avoid network lookup. The local copies are stored in the source tree under /entities, and the references here are resolved by a system ClassLoader. As long as the entity files are in the classpath (or bundled in the FS jar), they will be picked up.
The basic form of this class comes from Elliot Rusty Harold, on http://www.cafeconleche.org/books/xmljava/chapters/ch07s02.html
This class is a Singleton; use
instanceto retrieve it.- Author:
- Patrick Wright
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.MapgetEntities()Returns a map of entities parsed by this resolver.static FSEntityResolverinstance()Gets an instance of this class.org.xml.sax.InputSourceresolveEntity(java.lang.String publicID, java.lang.String systemID)Description of the Method
-
-
-
Method Detail
-
resolveEntity
public org.xml.sax.InputSource resolveEntity(java.lang.String publicID, java.lang.String systemID) throws org.xml.sax.SAXExceptionDescription of the Method- Specified by:
resolveEntityin interfaceorg.xml.sax.EntityResolver- Parameters:
publicID- PARAMsystemID- PARAM- Returns:
- Returns
- Throws:
org.xml.sax.SAXException- Throws
-
instance
public static FSEntityResolver instance()
Gets an instance of this class.- Returns:
- An instance of .
-
getEntities
public java.util.Map getEntities()
Returns a map of entities parsed by this resolver.- Returns:
- a map of entities parsed by this resolver.
-
-