Modifier and Type | Field and Description |
---|---|
protected char[] | m_attrBuff
A utility buffer for converting Strings passed to attribute methods to character arrays. |
protected AttributesImplSerializer | m_attributes
All the attributes of the current element, collected from startPrefixMapping() calls, or addAddtribute() calls, or from the SAX attributes in a startElement() call. |
protected HashMap | |
protected boolean | m_cdataTagOpen
True if a trailing "]]>" still needs to be written to be written out. |
protected char[] | m_charsBuff
A utility buffer for converting Strings passed to character() methods to character arrays. |
pack-priv boolean | |
protected String | m_doctypePublic
The public ID for the doc type. |
protected String | m_doctypeSystem
The System ID for the doc type. |
protected boolean | m_doIndent
Flag to tell if indenting (pretty-printing) is on. |
protected ElemContext | m_elemContext
A reference to "stack frame" corresponding to the current element. |
protected ErrorListener | |
protected int | m_indentAmount
Amount to indent. |
protected int | m_inEntityRef
Tells if we're in an EntityRef event, true if it's greater than 0. |
protected boolean | m_inExternalDTD
This flag is set while receiving events from the external DTD |
protected boolean | m_isStandalone
Determine if the output is a standalone. |
private Locator | |
protected String | m_mediatype
The mediatype. |
protected boolean | |
protected boolean | m_needToCallStartDocument
true if we still need to call startDocumentInternal() |
pack-priv boolean | m_needToOutputDocTypeDecl
Flag to tell that we need to add the doctype decl, which we can't do until the first element is encountered. |
private HashMap | m_OutputProps
A mapping of keys to explicitly set values, for example if and <xsl:output/> has an "encoding" attribute, this map will have what that attribute maps to. |
private HashMap | m_OutputPropsDefault
A mapping of keys to default values, for example if the default value of the encoding is "UTF-8" then this map will have that "encoding" maps to "UTF-8". |
protected NamespaceMappings | m_prefixMap
Namespace support, that keeps track of currently defined prefix/uri mappings. |
protected boolean | m_shouldNotWriteXMLHeader
Tells if we should write the XML declaration. |
protected SourceLocator | |
private String | m_standalone
The standalone value for the doctype. |
protected boolean | m_standaloneWasSpecified
True if standalone was specified. |
protected String | m_StringOfCDATASections
The CDATA section names stored in a whitespace separateed list with each element being a word of the form "{uri}localName" This list comes from the cdata-section-elements attribute. |
protected SerializerTrace | m_tracer
Handle for firing generate events. |
private Transformer | m_transformer
The transformer that was around when this output handler was created (if any). |
protected String | m_version
Tells the XML version, for writing out to the XML decl. |
protected Writer | m_writer
The writer to send output to. |
Access | Constructor and Description |
---|---|
public |
Modifier and Type | Method and Description |
---|---|
public void | addAttribute(String
the URI of the attribute uri, String the local name of the attribute localName, String the qualified name of the attribute rawName, String the type of the attribute (probably CDATA) type, String the value of the attribute value, boolean true if this attribute is coming from an xsl:attriute element XSLAttribute)Implements com. Adds the given attribute to the set of collected attributes , but only if there is a currently open element. |
public void | addAttribute(String
the attribute's qualified name name, final String the value of the attribute value)Implements com. Adds the given attribute to the set of collected attributes, but only if there is a currently open element. |
public void | addAttribute(String
the namespace URI of the attribute name uri, String the local name of the attribute (without prefix) localName, String the qualified name of the attribute rawName, String the attribute type typically character data (CDATA) type, String the value of the attribute value)Implements com. This method adds an attribute the the current element, but should not be used for an xsl:attribute child. |
public boolean | Returns: true if the attribute was added, false if an existing value was replaced.the URI of the attribute uri, String the local name of the attribute localName, String the qualified name of the attribute rawName, String the type of the attribute (probably CDATA) type, String the value of the attribute value, boolean true if this attribute is coming from an xsl:attribute element XSLAttribute)Adds the given attribute to the set of attributes, even if there is no currently open element. |
public void | addAttributes(Attributes
List of attributes to add to this list atts)Implements com. Add the given attributes to the currently collected ones. |
private void | |
public void | addXSLAttribute(String
the attribute's qualified name (prefix:localName) name, final String the value of the attribute value, final String the URI that the prefix of the name points to uri)Implements com. Adds the given xsl:attribute to the set of collected attributes, but only if there is a currently open element. |
public ContentHandler | Returns: AContentHandler interface into this serializer,
or null if the serializer is not SAX 2 capableImplements com. Return a |
public Object | Returns: ADOM3Serializer interface into this serializer, or null
if the serializer is not DOM capableImplements com. Return a |
public DOMSerializer | Returns: ADOMSerializer interface into this serializer, or null
if the serializer is not DOM capableImplements com. Return a |
public void | characters(Node
the Node to serialize node)Implements com. This method gets the nodes value as a String and uses that String as if it were an input character notification. |
public void | close()
Implements com. Flush and close the underlying java.io.Writer. |
public void | comment(String
the comment, but unlike the SAX comment() method this
method takes a String rather than a character array. data)Implements com. Receive notification of a comment. |
public boolean | |
public void | endEntity(String
The name of the entity that is ending. name)Implements org. Report the end of an entity. |
public void | entityReference(String
Name of entity name)Implements com. Entity reference event. |
public void | error(SAXParseException
The error information encapsulated in a
SAX parse exception. exc)Implements org. Receive notification of a recoverable error. |
public void | fatalError(SAXParseException
The error information encapsulated in a
exc)SAXParseException .Implements org. Receive notification of a non-recoverable, fatal error. |
protected void | fireCDATAEvent(char[]
content of CDATA chars, int starting index of characters to output start, int number of characters to output length)Report the CDATA trace event |
protected void | fireCharEvent(char[]
content of characters chars, int starting index of characters to output start, int number of characters to output length)Report the characters trace event |
protected void | fireCommentEvent(char[]
content of comment chars, int starting index of comment to output start, int number of characters to output length)Report the comment trace event |
protected void | |
protected void | |
public void | |
protected void | fireEntityReference(String
Name of entity reference name)To fire off the entity reference trace event |
protected void | |
protected void | |
protected void | fireStartElem(String
the qualified name of the element elemName)Report the start element trace event. |
protected void | |
private void | flushMyWriter()
This method is only used internally when flushing the writer from the various fire...() trace events. |
public String | Returns: the public identifier to be used in the DOCTYPE declaration in the output document.Implements com. Returns the previously set value of the value to be used as the public identifier in the document type declaration (DTD). |
public String | Returns: the system identifier to be used in the DOCTYPE declaration in the output document.Implements com. Returns the previously set value of the value to be used as the system identifier in the document type declaration (DTD). |
private String | Returns: The URI of the element, never null, but possibly "".Before this call m_elementContext.m_elementURI is null, which means it is not yet known. |
public String | Returns: the character encoding to be used in the output document.Implements com. Returns the character encoding to be used in the output document. |
pack-priv static char | getFirstCharLocName(String
Either a local name, or a local name
preceeded by a uri enclosed in curly braces. name)Get the first char of the local name |
public boolean | Returns: true if the output document should be indented to visually indicate its structure.Implements com.
|
public int | Returns: the number of spaces to indent for each indentation level.Implements com.
|
protected static String | Returns: the name, but excluding any prefix and colon.the qualified name qname)Returns the local name of a qualified name. |
public String | Returns: the mediatype the media-type or MIME type associated with the output document.Implements com. Gets the mediatype the media-type or MIME type associated with the output document. |
public NamespaceMappings | Returns: the current namespace mappings (prefix/uri)Implements com. Some users of the serializer may need the current namespace mappings |
public String | Returns: returns the namespace URI associated with the qualified name.a qualified name qname, boolean true if the qualified name is the name of
an element. isElement)Implements com. Returns the URI of an element or attribute. |
public String | Returns: the namespace URI currently associated with the prefix, null if the prefix is undefined.the prefix whose URI is searched for prefix)Implements com. Returns the URI of prefix (if any) |
public boolean | Returns: true if the XML declaration is to be omitted from the output document.Implements com.
|
pack-priv Set | |
public String | getOutputProperty(String
The name of the property, which is just the local name
if it is in no namespace, but is the URI in curly braces followed by
the local name if it is in a namespace, for example:
name)
Implements com. Get the value of an output property, the explicit value, if any, otherwise the default value, if any, otherwise null. |
public String | getOutputPropertyDefault(String
The name of the property. name)Implements com. Get the default value of an xsl:output property, which would be null only if no default value exists for the property. |
public String | |
pack-priv Set | |
public String | Returns: a prefix pointing to the given URI (if any).the uri of the namespace in question namespaceURI)Implements com. Returns the prefix currently pointing to the given URI (if any). |
protected static final String | Returns: returns the prefix of the qualified name, or null if there is no prefix.a qualified name qname)Returns the local name of a qualified name. |
private String | |
public String | Returns: a value of "yes" if thestandalone delaration is to
be included in the output document.Implements com. Gets the XSL standalone attribute |
public Transformer | Returns: returns the transformer associated with this serializer.Implements com. Gets the transformer associated with this serializer |
public String | Returns: the version of the output format.Implements com. Gets the version of the output format. |
protected void | |
pack-priv void | |
pack-priv final boolean | inTemporaryOutputState()
Returns true if the serializer is used for temporary output rather than final output. |
protected boolean | |
protected boolean | Returns: True if current node is in entity reference.This method checks if current node is in entity reference. |
public void | namespaceAfterStartElement(String
the URI of the namespace uri, String the prefix associated with the given URI. prefix)Implements com. This method is used when a prefix/uri namespace mapping is indicated after the element was started with a startElement() and before and endElement(). |
public void | notationDecl(String
The notation name. arg0, String The notation's public identifier, or null if
none was given. arg1, String The notation's system identifier, or null if
none was given. arg2)Implements org. Receive notification of a notation declaration event. |
protected String | |
public boolean | reset()
Implements com. This method resets the serializer. |
private void | |
public void | setDoctype(String
the system identifier to be used in the DOCTYPE
declaration in the output document. doctypeSystem, String the public identifier to be used in the DOCTYPE
declaration in the output document. doctypePublic)Implements com. Set the value coming from the xsl:output doctype-public and doctype-system stylesheet properties |
public void | setDoctypePublic(String
the public identifier to be used in the DOCTYPE
declaration in the output document. doctypePublic)Implements com. Set the value coming from the xsl:output doctype-public stylesheet attribute. |
public void | setDoctypeSystem(String
the system identifier to be used in the DOCTYPE
declaration in the output document. doctypeSystem)Implements com. Set the value coming from the xsl:output doctype-system stylesheet attribute. |
protected void | |
public void | setDocumentLocator(Locator
An object that can return the location of any SAX document
event.
Receive an object for locating the origin of SAX document events.
locator)SAX parsers are strongly encouraged (though not absolutely required) to supply a locator: if it does so, it must supply the locator to the application by invoking this method before invoking any of the other methods in the DocumentHandler interface. The locator allows the application to determine the end position of any document-related event, even if the parser is not reporting an error. Typically, the application will use this information for reporting its own errors (such as character content that does not match an application's business rules). The information returned by the locator is probably not sufficient for use with a search engine. Note that the locator will return correct information only during the invocation of the events in this interface. The application should not attempt to use it at any other time. Implements org. Receive an object for locating the origin of SAX document events. |
public void | setDTDEntityExpansion(boolean
true if DTD entities are to be expanded,
false if they are to be left as DTD entity references. expand)Implements com. If set to false the serializer does not expand DTD entities, but leaves them as is, the default value is true. |
public void | setEncoding(String
the character encoding encoding)Implements com. Sets the character encoding coming from the xsl:output encoding stylesheet attribute. |
public void | setIndent(boolean
true if the output document should be indented to
visually indicate its structure. doIndent)Implements com. Sets the value coming from the xsl:output indent stylesheet attribute. |
public void | setIndentAmount(int
The m_indentAmount to set m_indentAmount)Implements com. Sets the indentation amount. |
public void | setIsStandalone(boolean
the value of the property isStandalone)Implements com. Sets the implementation specific property "isStandalone". |
public void | setMediaType(String
the non-null media-type or MIME type associated with the
output document. mediaType)Implements com. Sets the value coming from the xsl:output media-type stylesheet attribute. |
public void | setNamespaceMappings(NamespaceMappings
NamespaceMappings mappings)Implements com. Used only by TransformerSnapshotImpl to restore the serialization to a previous state. |
public void | setOmitXMLDeclaration(boolean
true if the XML declaration is to be omitted from the output
document. b)Implements com. Sets the value coming from the xsl:output omit-xml-declaration stylesheet attribute |
public void | setOutputProperty(String
The name of the property, which is just the local name
if it is in no namespace, but is the URI in curly braces followed by
the local name if it is in a namespace, for example:
name, String
The non-default value of the parameter val)Implements com. Set the value for the output property, typically from an xsl:output element, but this does not change what the default value is. |
public void | setOutputPropertyDefault(String
The name of the property, which is just the local name
if it is in no namespace, but is the URI in curly braces followed by
the local name if it is in a namespace, for example:
name, String
The default value of the parameter val)Implements com. Set the default value for an output property, but this does not impact any explicitly set value. |
pack-priv void | |
public void | setSourceLocator(SourceLocator
the source locator locator)Implements com. This method is used to set the source locator, which might be used to generated an error message. |
public void | setStandalone(String
a value of "yes" indicates that the
standalone)standalone delaration is to be included in the output
document. This method remembers if the value was explicitly set using
this method, verses if the value is the default value.Implements com. Sets the value coming from the xsl:output standalone stylesheet attribute. |
protected void | setStandaloneInternal(String
"yes" | "no" standalone)Sets the XSL standalone attribute, but does not remember if this is a default or explicite setting. |
public void | setTransformer(Transformer
the transformer associated with this serializer. t)Implements com. Sets the transformer associated with this serializer |
public void | setVersion(String
the version of the output format. version)Implements com. Sets the value coming from the xsl:output version attribute. |
public void | startDocument()
Implements org. Receive notification of the beginning of a document. |
protected void | startDocumentInternal()
This method handles what needs to be done at a startDocument() call, whether from an external caller, or internally called in the serializer. |
private static final boolean | Returns: true if strings are equal.String reference, which may be null. p, String String reference, which may be null. t)Tell if two strings are equal, without worry if the first string is null. |
public void | unparsedEntityDecl(String
The unparsed entity's name. arg0, String The entity's public identifier, or null if none
was given. arg1, String The entity's system identifier. arg2, String The name of the associated notation. arg3)Implements org. Receive notification of an unparsed entity declaration event. |
public void | warning(SAXParseException
The warning information encapsulated in a
SAX parse exception. exc)Implements org. Receive notification of a warning. |