Package com.openhtmltopdf.resource
Class FSCatalog.CatalogContentHandler
- java.lang.Object
-
- org.xml.sax.helpers.DefaultHandler
-
- com.openhtmltopdf.resource.FSCatalog.CatalogContentHandler
-
- All Implemented Interfaces:
org.xml.sax.ContentHandler
,org.xml.sax.DTDHandler
,org.xml.sax.EntityResolver
,org.xml.sax.ErrorHandler
- Enclosing class:
- FSCatalog
private static class FSCatalog.CatalogContentHandler extends org.xml.sax.helpers.DefaultHandler
A SAX ContentHandler that reads an XML catalog file and builds a Map of public IDs to local URIs. Currently only handles theelement and attributes. To use, just call XMLReader.setContentHandler() with an instance of the class, parse, then call getEntityMap().
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<java.lang.String,java.lang.String>
entityMap
-
Constructor Summary
Constructors Constructor Description CatalogContentHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Map<java.lang.String,java.lang.String>
getEntityMap()
Returns a Map of public Ids to local URIsvoid
startElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes atts)
Receive notification of the beginning of an element; here used to pick up the mappings for public IDs to local URIs in the catalog.-
Methods inherited from class org.xml.sax.helpers.DefaultHandler
characters, endDocument, endElement, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
-
-
-
-
Method Detail
-
getEntityMap
public java.util.Map<java.lang.String,java.lang.String> getEntityMap()
Returns a Map of public Ids to local URIs
-
startElement
public void startElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes atts)
Receive notification of the beginning of an element; here used to pick up the mappings for public IDs to local URIs in the catalog.- Specified by:
startElement
in interfaceorg.xml.sax.ContentHandler
- Overrides:
startElement
in classorg.xml.sax.helpers.DefaultHandler
-
-