Package org.xhtmlrenderer.resource
Class FSCatalog.CatalogContentHandler
java.lang.Object
org.xml.sax.helpers.DefaultHandler
org.xhtmlrenderer.resource.FSCatalog.CatalogContentHandler
- All Implemented Interfaces:
ContentHandler
,DTDHandler
,EntityResolver
,ErrorHandler
- Enclosing class:
FSCatalog
A SAX ContentHandler that reads an XML catalog file and builds a Map of
public IDs to local URIs. Currently only handles the element and attributes.
To use, just call XMLReader.setContentHandler() with an instance of the class,
parse, then call getEntityMap().
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns a Map of public Ids to local URIsvoid
startElement
(String namespaceURI, String localName, String qName, Attributes attributes) 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
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.xml.sax.ContentHandler
declaration
-
Field Details
-
entityMap
-
-
Constructor Details
-
CatalogContentHandler
private CatalogContentHandler()
-
-
Method Details
-
getEntityMap
Returns a Map of public Ids to local URIs -
startElement
public void startElement(String namespaceURI, String localName, String qName, Attributes attributes) 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 interfaceContentHandler
- Overrides:
startElement
in classDefaultHandler
-