Class XMLHandler
java.lang.Object
org.xml.sax.helpers.DefaultHandler
org.xml.sax.ext.DefaultHandler2
com.adobe.epubcheck.xml.handlers.LocationHandler
com.adobe.epubcheck.xml.handlers.BaseURLHandler
com.adobe.epubcheck.xml.handlers.XMLHandler
- All Implemented Interfaces:
ContentHandler, DTDHandler, EntityResolver, ErrorHandler, DeclHandler, EntityResolver2, LexicalHandler
- Direct Known Subclasses:
DTBookHandler, NCXHandler, OCFContainerFileHandler, OCFEncryptionFileHandler, OPFHandler, OPSHandler, OverlayHandler, SearchKeyMapHandler
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final ValidationContextprivate XMLElementprivate Locator2protected final Stringprotected final Report -
Constructor Summary
ConstructorsConstructorDescriptionXMLHandler(ValidationContext context) XMLHandler(ValidationContext context, io.mola.galimatias.URL baseURL) -
Method Summary
Modifier and TypeMethodDescriptionprivate voidprotected final XMLElementReturn the currently parsed element, ornullif the parser is not yet parsing an element.protected voidfinal voidendElement(String uri, String localName, String qName) protected final voidregisterReference(io.mola.galimatias.URL url, Reference.Type type) Convenience method to register a reference to theReferenceRegistry.protected final voidregisterReference(io.mola.galimatias.URL url, Reference.Type type, boolean hasIntrinsicFallback) Convenience method to register a reference to theReferenceRegistry.final voidsetDocumentLocator(Locator locator) protected voidfinal voidstartElement(String uri, String localName, String qName, Attributes attribs) Methods inherited from class BaseURLHandler
baseURL, checkURLMethods inherited from class LocationHandler
location, locationMethods inherited from class DefaultHandler2
attributeDecl, comment, elementDecl, endCDATA, endDTD, endEntity, externalEntityDecl, getExternalSubset, internalEntityDecl, resolveEntity, resolveEntity, startCDATA, startDTD, startEntityMethods inherited from class DefaultHandler
characters, endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warningMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ContentHandler
declaration
-
Field Details
-
currentElement
-
locator
-
context
-
report
-
path
-
-
Constructor Details
-
XMLHandler
-
XMLHandler
-
-
Method Details
-
setDocumentLocator
- Specified by:
setDocumentLocatorin interfaceContentHandler- Overrides:
setDocumentLocatorin classLocationHandler
-
startElement
- Specified by:
startElementin interfaceContentHandler- Overrides:
startElementin classBaseURLHandler
-
startElement
protected void startElement() -
endElement
- Specified by:
endElementin interfaceContentHandler- Overrides:
endElementin classDefaultHandler
-
endElement
protected void endElement() -
currentElement
Return the currently parsed element, ornullif the parser is not yet parsing an element.- Returns:
- the currently parsed element, or
null.
-
checkXMLVersion
private void checkXMLVersion() -
registerReference
Convenience method to register a reference to theReferenceRegistry.Does nothing if the context has no registry (single-file validaiton) or if the URL is
null; else callsReferenceRegistry.registerReference(URL, Reference.Type, EPUBLocation)- Parameters:
url- the URL of to registertype- the type of the reference
-
registerReference
protected final void registerReference(io.mola.galimatias.URL url, Reference.Type type, boolean hasIntrinsicFallback) Convenience method to register a reference to theReferenceRegistry.Does nothing if the context has no registry (single-file validaiton) or if the URL is
null; else callsReferenceRegistry.registerReference(URL, Reference.Type, EPUBLocation, boolean)- Parameters:
url- the URL of to registertype- the type of the referencehasIntrinsicFallback- if the reference has an intrinsic fallback
-