|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.xml.serializer.SerializerBase
org.apache.xml.serializer.ToStream
org.apache.xml.serializer.ToXMLStream
public class ToXMLStream
This class converts SAX or SAX-like calls to a serialized xml document. The xsl:output method is "xml". This class is used explicitly in code generated by XSLTC, so it is "public", but it should be viewed as internal or package private, this is not an API.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.apache.xml.serializer.ToStream |
|---|
ToStream.BoolStack |
| Field Summary | |
|---|---|
private CharInfo |
m_xmlcharInfo
Map that tells which XML characters should have special treatment, and it provides character to entity name lookup. |
| Fields inherited from class org.apache.xml.serializer.ToStream |
|---|
m_cdataStartCalled, m_charInfo, m_disableOutputEscapingStates, m_encodingInfo, m_escaping, m_inDoctype, m_ispreserve, m_isprevtext, m_isUTF8, m_lineSep, m_lineSepLen, m_lineSepUse, m_outputStream, m_preserves, m_shouldFlush, m_spaceBeforeClose, m_startNewLine |
| Fields inherited from class org.apache.xml.serializer.SerializerBase |
|---|
m_attrBuff, m_attributes, m_CdataElems, m_cdataTagOpen, m_charsBuff, m_docIsEmpty, m_doctypePublic, m_doctypeSystem, m_doIndent, m_elemContext, m_indentAmount, m_inEntityRef, m_inExternalDTD, m_mediatype, m_needToCallStartDocument, m_needToOutputDocTypeDecl, m_prefixMap, m_shouldNotWriteXMLHeader, m_sourceLocator, m_standaloneWasSpecified, m_StringOfCDATASections, m_tracer, m_version, m_writer, PKG_NAME, PKG_PATH |
| Fields inherited from interface org.apache.xml.serializer.ExtendedContentHandler |
|---|
HTML_ATTREMPTY, HTML_ATTRURL, NO_BAD_CHARS |
| Fields inherited from interface org.apache.xml.serializer.SerializerConstants |
|---|
CDATA_CONTINUE, CDATA_DELIMITER_CLOSE, CDATA_DELIMITER_OPEN, DEFAULT_SAX_SERIALIZER, EMPTYSTRING, ENTITY_AMP, ENTITY_CRLF, ENTITY_GT, ENTITY_LT, ENTITY_QUOT, XML_PREFIX, XMLNS_PREFIX, XMLNS_URI, XMLVERSION10, XMLVERSION11 |
| Constructor Summary | |
|---|---|
ToXMLStream()
Default constructor. |
|
| Method Summary | |
|---|---|
void |
addAttribute(java.lang.String uri,
java.lang.String localName,
java.lang.String rawName,
java.lang.String type,
java.lang.String value,
boolean xslAttribute)
Add an attribute to the current element. |
void |
addUniqueAttribute(java.lang.String name,
java.lang.String value,
int flags)
This method is used to add an attribute to the currently open element. |
void |
CopyFrom(ToXMLStream xmlListener)
Copy properties from another SerializerToXML. |
void |
endDocument()
Receive notification of the end of a document. |
void |
endElement(java.lang.String elemName)
Receive notification of the end of an element. |
void |
endPreserving()
Ends a whitespace preserving section. |
void |
entityReference(java.lang.String name)
Receive notivication of a entityReference. |
private java.lang.String |
getXMLVersion()
This method checks for the XML version of output document. |
void |
namespaceAfterStartElement(java.lang.String prefix,
java.lang.String uri)
This method is used to notify the serializer of a namespace mapping (or node) that applies to the current element whose startElement() call has already been seen. |
void |
processingInstruction(java.lang.String target,
java.lang.String data)
Receive notification of a processing instruction. |
protected boolean |
pushNamespace(java.lang.String prefix,
java.lang.String uri)
From XSLTC Declare a prefix to point to a namespace URI. |
boolean |
reset()
Try's to reset the super class and reset this class for re-use, so that you don't need to create a new serializer (mostly for performance reasons). |
private void |
resetToXMLStream()
Reset all of the fields owned by ToStream class |
void |
startDocumentInternal()
Receive notification of the beginning of a document. |
void |
startPreserving()
Starts a whitespace preserving section. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private CharInfo m_xmlcharInfo
| Constructor Detail |
|---|
public ToXMLStream()
| Method Detail |
|---|
public void CopyFrom(ToXMLStream xmlListener)
xmlListener - non-null reference to a SerializerToXML object.
public void startDocumentInternal()
throws org.xml.sax.SAXException
startDocumentInternal in class SerializerBaseorg.xml.sax.SAXException - Any SAX exception, possibly
wrapping another exception.
org.xml.sax.SAXException
public void endDocument()
throws org.xml.sax.SAXException
org.xml.sax.SAXException - Any SAX exception, possibly
wrapping another exception.
org.xml.sax.SAXException
public void startPreserving()
throws org.xml.sax.SAXException
The contents of the whitespace preserving section will be delivered through the regular characters event.
org.xml.sax.SAXException
public void endPreserving()
throws org.xml.sax.SAXException
org.xml.sax.SAXExceptionstartPreserving()
public void processingInstruction(java.lang.String target,
java.lang.String data)
throws org.xml.sax.SAXException
target - The processing instruction target.data - The processing instruction data, or null if
none was supplied.
org.xml.sax.SAXException - Any SAX exception, possibly
wrapping another exception.
org.xml.sax.SAXException
public void entityReference(java.lang.String name)
throws org.xml.sax.SAXException
entityReference in interface ExtendedContentHandlerentityReference in class SerializerBasename - The name of the entity.
org.xml.sax.SAXException
public void addUniqueAttribute(java.lang.String name,
java.lang.String value,
int flags)
throws org.xml.sax.SAXException
name - the qualified name of the attributevalue - the value of the attribute which can contain only
ASCII printable characters characters in the range 32 to 127 inclusive.flags - the bit values of this integer give optimization information.
org.xml.sax.SAXException
public void addAttribute(java.lang.String uri,
java.lang.String localName,
java.lang.String rawName,
java.lang.String type,
java.lang.String value,
boolean xslAttribute)
throws org.xml.sax.SAXException
addAttribute in interface ExtendedContentHandleraddAttribute in class SerializerBaseuri - the URI associated with the element namelocalName - local part of the attribute namerawName - prefix:localNametype - value - the value of the attributexslAttribute - true if this attribute is from an xsl:attribute,
false if declared within the elements opening tag.
org.xml.sax.SAXExceptionExtendedContentHandler.addAttribute(String, String, String, String, String)
public void endElement(java.lang.String elemName)
throws org.xml.sax.SAXException
ToStream
endElement in interface ExtendedContentHandlerendElement in class ToStreamelemName - The element type name
org.xml.sax.SAXExceptionExtendedContentHandler.endElement(String)
public void namespaceAfterStartElement(java.lang.String prefix,
java.lang.String uri)
throws org.xml.sax.SAXException
namespaceAfterStartElement in interface ExtendedContentHandlernamespaceAfterStartElement in class SerializerBaseprefix - the URI of the namespaceuri - the prefix associated with the given URI.
org.xml.sax.SAXExceptionExtendedContentHandler.namespaceAfterStartElement(String, String)
protected boolean pushNamespace(java.lang.String prefix,
java.lang.String uri)
public boolean reset()
reset in interface Serializerreset in class ToStreamprivate void resetToXMLStream()
private java.lang.String getXMLVersion()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||