|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.xalan.serialize.SerializerToXML | +--org.apache.xalan.serialize.SerializerToHTML
SerializerToHTML formats SAX-style events into XML.
Fields inherited from class org.apache.xalan.serialize.SerializerToXML |
m_indentAmount,
m_shouldNotWriteXMLHeader,
m_spaceBeforeClose,
m_version |
Constructor Summary | |
SerializerToHTML()
Default constructor. |
Method Summary | |
void |
cdata(char[] ch,
int start,
int length)
Receive notification of cdata. |
void |
characters(char[] chars,
int start,
int length)
Receive notification of character data. |
void |
endElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String name)
Receive notification of the end of an element. |
void |
entityReference(java.lang.String name)
Receive notivication of a entityReference. |
boolean |
getSpecialEscapeURLs()
Tells if the formatter should use special URL escaping. |
void |
processingInstruction(java.lang.String target,
java.lang.String data)
Receive notification of a processing instruction. |
void |
setOutputFormat(java.util.Properties format)
Specifies an output format for this serializer. |
void |
setSpecialEscapeURLs(boolean bool)
Tells if the formatter should use special URL escaping. |
void |
startDocument()
Receive notification of the beginning of a document. |
void |
startElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String name,
Attributes atts)
Receive notification of the beginning of an element. |
void |
writeAttrString(java.lang.String string,
java.lang.String encoding)
Writes the specified string after substituting specials, and UTF-16 surrogates for character references &#xnn . |
void |
writeAttrURI(java.lang.String string,
boolean doURLEscaping)
Write the specified string after substituting non ASCII characters, with %HH , where HH is the hex of the byte value. |
Methods inherited from class org.apache.xalan.serialize.SerializerToXML |
asContentHandler,
asDOMSerializer,
charactersRaw,
comment,
CopyFrom,
endCDATA,
endDocument,
endDTD,
endEntity,
endNonEscaping,
endPrefixMapping,
endPreserving,
flush,
flushWriter,
getOutputFormat,
getOutputStream,
getWriter,
ignorableWhitespace,
indent,
init,
init,
printSpace,
reset,
serialize,
setDocumentLocator,
setOutputStream,
setWriter,
skippedEntity,
startCDATA,
startDTD,
startEntity,
startNonEscaping,
startPrefixMapping,
startPreserving |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public SerializerToHTML()
Method Detail |
public void setSpecialEscapeURLs(boolean bool)
bool
- True if URLs should be specially escaped with the %xx form.public void setOutputFormat(java.util.Properties format)
format
- The output format to usepublic boolean getSpecialEscapeURLs()
public void startDocument() throws SAXException
public void startElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String name, Attributes atts) throws SAXException
namespaceURI
- localName
- name
- The element type name.atts
- The attributes attached to the element, if any.endElement(java.lang.String, java.lang.String, java.lang.String)
,
AttributeList
public void endElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String name) throws SAXException
namespaceURI
- localName
- name
- The element type namepublic void writeAttrURI(java.lang.String string, boolean doURLEscaping) throws SAXException
%HH
, where HH is the hex of the byte value.string
- String to convert to XML format.doURLEscaping
- True if we should try to encode as
per http://www.ietf.org/rfc/rfc2396.txt.public void writeAttrString(java.lang.String string, java.lang.String encoding) throws SAXException
&#xnn
.string
- String to convert to XML format.encoding
- CURRENTLY NOT IMPLEMENTED.public void characters(char[] chars, int start, int length) throws SAXException
The Parser will call this method to report each chunk of character data. SAX parsers may return all contiguous character data in a single chunk, or they may split it into several chunks; however, all of the characters in any single event must come from the same external entity, so that the Locator provides useful information.
The application must not attempt to read from the array outside of the specified range.
Note that some parsers will report whitespace using the ignorableWhitespace() method rather than this one (validating parsers must do so).
chars
- The characters from the XML document.start
- The start position in the array.length
- The number of characters to read from the array.SerializerToXML.ignorableWhitespace(char[], int, int)
,
Locator
public void cdata(char[] ch, int start, int length) throws SAXException
The Parser will call this method to report each chunk of character data. SAX parsers may return all contiguous character data in a single chunk, or they may split it into several chunks; however, all of the characters in any single event must come from the same external entity, so that the Locator provides useful information.
The application must not attempt to read from the array outside of the specified range.
Note that some parsers will report whitespace using the ignorableWhitespace() method rather than this one (validating parsers must do so).
ch
- The characters from the XML document.start
- The start position in the array.length
- The number of characters to read from the array.SerializerToXML.ignorableWhitespace(char[], int, int)
,
Locator
public void processingInstruction(java.lang.String target, java.lang.String data) throws SAXException
target
- The processing instruction target.data
- The processing instruction data, or null if
none was supplied.public void entityReference(java.lang.String name) throws SAXException
name
- non-null reference to entity name string.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |