public abstract class XModeHandler extends HandlerBase
| Constructor and Description |
|---|
XModeHandler(String modeName) |
| Modifier and Type | Method and Description |
|---|---|
void |
attribute(String aname,
String value,
boolean isSpecified)
Handle an attribute assignment.
|
void |
charData(char[] c,
int off,
int len)
Handle character data.
|
void |
doctypeDecl(String name,
String publicId,
String systemId)
Handle a document type declaration.
|
void |
endDocument()
Handle the end of the document.
|
void |
endElement(String name)
Handle the end of an element.
|
protected abstract void |
error(String msg,
Object subst)
Reports an error.
|
Hashtable |
getModeProperties() |
TokenMarker |
getTokenMarker() |
protected abstract TokenMarker |
getTokenMarker(String mode)
Returns the token marker for the given mode.
|
Object |
resolveEntity(String publicId,
String systemId)
Resolve an external entity.
|
void |
startDocument()
Handle the start of the document.
|
void |
startElement(String tag)
Handle the start of an element.
|
endExternalEntity, error, ignorableWhitespace, processingInstruction, startExternalEntitypublic XModeHandler(String modeName)
public Object resolveEntity(String publicId, String systemId)
HandlerBaseThe default implementation simply returns the supplied system identifier.
resolveEntity in interface XmlHandlerresolveEntity in class HandlerBasepublicId - The public identifier, or null if none was supplied.systemId - The system identifier.com.microstar.xml.XmlHandler#resolveEntitypublic void attribute(String aname, String value, boolean isSpecified)
HandlerBaseThe default implementation does nothing.
attribute in interface XmlHandlerattribute in class HandlerBasevalue - The value of the attribute, or null if the attribute
is #IMPLIED.isSpecified - True if the value was specified, false if it
was defaulted from the DTD.com.microstar.xml.XmlHandler#attributepublic void doctypeDecl(String name, String publicId, String systemId) throws Exception
HandlerBaseThe default implementation does nothing.
doctypeDecl in interface XmlHandlerdoctypeDecl in class HandlerBasename - The document type name.publicId - The public identifier, or null if unspecified.systemId - The system identifier, or null if unspecified.Exception - The handler may throw any exception.com.microstar.xml.XmlHandler#doctypeDeclpublic void charData(char[] c,
int off,
int len)
HandlerBaseThe default implementation does nothing.
charData in interface XmlHandlercharData in class HandlerBasec - The character data.off - The starting position in the array.len - The number of characters available.com.microstar.xml.XmlHandler#charDatapublic void startElement(String tag)
HandlerBaseThe default implementation does nothing.
startElement in interface XmlHandlerstartElement in class HandlerBasetag - The element type name.com.microstar.xml.XmlHandler#startElementpublic void endElement(String name)
HandlerBaseThe default implementation does nothing.
endElement in interface XmlHandlerendElement in class HandlerBasename - The element type name.com.microstar.xml.XmlHandler#endElementpublic void startDocument()
HandlerBaseThe default implementation does nothing.
startDocument in interface XmlHandlerstartDocument in class HandlerBasecom.microstar.xml.XmlHandler#startDocumentpublic void endDocument()
HandlerBaseThe default implementation does nothing.
endDocument in interface XmlHandlerendDocument in class HandlerBasecom.microstar.xml.XmlHandler#endDocumentpublic TokenMarker getTokenMarker()
public Hashtable getModeProperties()
protected abstract void error(String msg, Object subst)
msg - The error typesubst - A String or a Throwable
containing specific informationprotected abstract TokenMarker getTokenMarker(String mode)
mode - The mode nameCopyright © 2017 etc.to. All rights reserved.