|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.infoengine.xml.XMLtemplate2HTML
Event handler class for converting I*E 2.x XML templates into I*E 2.x HTML templates.
This handler will convert the XML webject tags into appropriate HTML-based equivalents, allowing the SA I*E 2.x server to remain ignorant of XML.
EntityResolver
,
DTDHandler
,
DocumentHandler
,
ErrorHandler
Field Summary | |
(package private) boolean |
DEBUG
|
(package private) static int |
DEFAULT_BUFFER_SIZE
|
(package private) boolean |
DTD_DEBUG
|
(package private) int |
foundErrorLevel
|
(package private) int |
myState
|
(package private) static int |
NONWEBJECT
|
(package private) static int |
PARAMETER
|
(package private) StringBuffer |
returnData
|
(package private) static int |
WEBJECT
|
Fields inherited from interface com.infoengine.xml.I_handleXML |
PARSE_CRITICAL_ERROR, PARSE_OK, PARSE_RECOVERABLE_ERROR, PARSE_WARNING |
Constructor Summary | |
XMLtemplate2HTML()
|
Method Summary | |
void |
characters(char[] ch,
int start,
int length)
This method is called for data imbedded between tags; we'll use it for catching some of the template parameters. |
private static void |
display(char[] ch,
int start,
int length)
Display text, escaping some characters. |
void |
endDocument()
This method will be called when the SAX parser has completed it's parsing of the passed XML document. |
void |
endElement(String name)
This method will be called for the end of each XML element encountered; for XML->HTML Template conversion, this is used to handle the tagging. |
void |
error(SAXParseException exception)
Report all recoverable errors, and try to continue parsing. |
void |
fatalError(SAXParseException exception)
Report all fatal errors, and try to continue parsing. |
int |
getErrorLevel()
|
String |
getOutput()
|
void |
ignorableWhitespace(char[] ch,
int start,
int length)
Not used by I*E. |
void |
notationDecl(String name,
String publicId,
String systemId)
Display notation declarations as they are reported. |
void |
processingInstruction(String target,
String data)
Print a message for a processing instruction. |
void |
setDocumentLocator(Locator locator)
Print a message when the parser provides a locator. |
void |
startDocument()
This method will be called when the SAX parser has begun parsing the document; this would be good time to open an output stream and other setup tasks. |
void |
startElement(String name,
AttributeList attributes)
This method is called for the start of each XML element encountered; we need to check said element against a list of possible conversion choices, and then write to the output stream said conversion. |
void |
unparsedEntityDecl(String name,
String publicId,
String systemId,
String notationName)
Display unparsed entity declarations as they are reported. |
void |
warning(SAXParseException exception)
Report all warnings, and continue parsing. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
boolean DTD_DEBUG
boolean DEBUG
static final int DEFAULT_BUFFER_SIZE
static final int NONWEBJECT
static final int WEBJECT
static final int PARAMETER
int myState
StringBuffer returnData
int foundErrorLevel
Constructor Detail |
public XMLtemplate2HTML()
Method Detail |
public String getOutput()
getOutput
in interface I_handleXML
public int getErrorLevel()
getErrorLevel
in interface I_handleXML
public void notationDecl(String name, String publicId, String systemId)
notationDecl
in interface DTDHandler
DTDHandler.notationDecl(java.lang.String, java.lang.String, java.lang.String)
public void unparsedEntityDecl(String name, String publicId, String systemId, String notationName)
unparsedEntityDecl
in interface DTDHandler
DTDHandler.unparsedEntityDecl(java.lang.String, java.lang.String, java.lang.String, java.lang.String)
public void setDocumentLocator(Locator locator)
Not all SAX parsers will provide a locator object.
setDocumentLocator
in interface DocumentHandler
DocumentHandler.setDocumentLocator(org.xml.sax.Locator)
public void startDocument()
startDocument
in interface DocumentHandler
DocumentHandler.startDocument()
public void endDocument()
endDocument
in interface DocumentHandler
DocumentHandler.endDocument()
public void startElement(String name, AttributeList attributes)
This method is called for the start of each XML element encountered; we need to check said element against a list of possible conversion choices, and then write to the output stream said conversion. A rather pedestrian bit of String processing code. *shrug* It's a living...
startElement
in interface DocumentHandler
DocumentHandler.startElement(java.lang.String, org.xml.sax.AttributeList)
public void endElement(String name)
This method will be called for the end of each XML element encountered; for XML->HTML Template conversion, this is used to handle the tagging.
endElement
in interface DocumentHandler
DocumentHandler.endElement(java.lang.String)
public void characters(char[] ch, int start, int length)
This method is called for data imbedded between tags; we'll use it for catching some of the template parameters.
characters
in interface DocumentHandler
DocumentHandler.characters(char[], int, int)
public void ignorableWhitespace(char[] ch, int start, int length)
Not used by I*E.
ignorableWhitespace
in interface DocumentHandler
DocumentHandler.ignorableWhitespace(char[], int, int)
public void processingInstruction(String target, String data)
processingInstruction
in interface DocumentHandler
DocumentHandler.processingInstruction(java.lang.String, java.lang.String)
public void warning(SAXParseException exception)
warning
in interface ErrorHandler
ErrorHandler.warning(org.xml.sax.SAXParseException)
public void error(SAXParseException exception)
error
in interface ErrorHandler
ErrorHandler.error(org.xml.sax.SAXParseException)
public void fatalError(SAXParseException exception)
Note: results are no longer reliable once a fatal error has been reported.
fatalError
in interface ErrorHandler
ErrorHandler.fatalError(org.xml.sax.SAXParseException)
private static void display(char[] ch, int start, int length)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |