public final class ToUnknownStream extends SerializerBase
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CDATA_CONTINUE
To insert ]]> in a CDATA section by ending the last CDATA section with
]] and starting the next CDATA section with >
|
static java.lang.String |
CDATA_DELIMITER_CLOSE
The constant "]]>"
|
static java.lang.String |
CDATA_DELIMITER_OPEN |
static java.lang.String |
DEFAULT_SAX_SERIALIZER |
static java.lang.String |
ENTITY_AMP |
static java.lang.String |
ENTITY_CRLF |
static java.lang.String |
ENTITY_GT |
static java.lang.String |
ENTITY_LT |
static java.lang.String |
ENTITY_QUOT |
static java.lang.String |
XML_PREFIX |
static java.lang.String |
XMLNS_PREFIX |
static java.lang.String |
XMLNS_URI |
static java.lang.String |
XMLVERSION10 |
static java.lang.String |
XMLVERSION11
Define the XML version.
|
PKG_NAME, PKG_PATHHTML_ATTREMPTY, HTML_ATTRURL, NO_BAD_CHARS| Constructor and Description |
|---|
ToUnknownStream()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addAttribute(java.lang.String rawName,
java.lang.String value)
Adds an attribute to the currenly open tag
|
void |
addAttribute(java.lang.String uri,
java.lang.String localName,
java.lang.String rawName,
java.lang.String type,
java.lang.String value,
boolean XSLAttribute)
Adds an attribute to the currenly open tag
|
void |
addAttributes(Attributes atts)
Add the given attributes to the currently collected ones.
|
void |
addUniqueAttribute(java.lang.String rawName,
java.lang.String value,
int flags)
Adds a unique attribute to the currenly open tag
|
ContentHandler |
asContentHandler()
Return a
ContentHandler interface into this serializer. |
java.lang.Object |
asDOM3Serializer()
Return a
DOM3Serializer interface into this serializer. |
DOMSerializer |
asDOMSerializer()
Return a
DOMSerializer interface into this serializer. |
void |
attributeDecl(java.lang.String arg0,
java.lang.String arg1,
java.lang.String arg2,
java.lang.String arg3,
java.lang.String arg4)
Pass the call on to the underlying handler
|
void |
characters(char[] characters,
int offset,
int length)
Pass the call on to the underlying handler
|
void |
characters(java.lang.String chars)
Converts the String to a character array and calls the SAX method
characters(char[],int,int);
|
void |
close()
Flush and close the underlying java.io.Writer.
|
void |
comment(char[] ch,
int start,
int length)
Pass the call on to the underlying handler
|
void |
comment(java.lang.String comment)
Pass the call on to the underlying handler
|
void |
elementDecl(java.lang.String arg0,
java.lang.String arg1)
Pass the call on to the underlying handler
|
void |
endCDATA()
Pass the call on to the underlying handler
|
void |
endDocument()
Pass the call on to the underlying handler
|
void |
endDTD()
Pass the call on to the underlying handler
|
void |
endElement(java.lang.String elementName)
Pass the call on to the underlying handler
|
void |
endElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String qName)
Pass the call on to the underlying handler
|
void |
endEntity(java.lang.String name)
Pass the call on to the underlying handler
|
void |
endPrefixMapping(java.lang.String prefix)
Pass the call on to the underlying handler
|
void |
entityReference(java.lang.String entityName)
Entity reference event.
|
void |
externalEntityDecl(java.lang.String name,
java.lang.String publicId,
java.lang.String systemId)
Pass the call on to the underlying handler
|
void |
flushPending()
A SerializationHandler accepts SAX-like events, so
it can accumulate attributes or namespace nodes after
a startElement().
|
java.lang.String |
getDoctypePublic()
Pass the call on to the underlying handler
|
java.lang.String |
getDoctypeSystem()
Pass the call on to the underlying handler
|
java.lang.String |
getEncoding()
Pass the call on to the underlying handler
|
boolean |
getIndent()
Pass the call on to the underlying handler
|
int |
getIndentAmount()
Pass the call on to the underlying handler
|
java.lang.String |
getMediaType()
Pass the call on to the underlying handler
|
NamespaceMappings |
getNamespaceMappings()
Get the current namespace mappings.
|
java.lang.String |
getNamespaceURI(java.lang.String qname,
boolean isElement)
Returns the URI of an element or attribute.
|
java.lang.String |
getNamespaceURIFromPrefix(java.lang.String prefix)
Returns the URI of prefix (if any)
|
boolean |
getOmitXMLDeclaration()
Pass the call on to the underlying handler
|
java.util.Properties |
getOutputFormat()
Returns the output format properties for this serializer.
|
java.io.OutputStream |
getOutputStream()
Get the output stream where the events will be serialized to.
|
java.lang.String |
getPrefix(java.lang.String namespaceURI)
Returns the prefix currently pointing to the given URI (if any).
|
java.lang.String |
getStandalone()
Pass the call on to the underlying handler
|
Transformer |
getTransformer()
Gets the transformer associated with this serializer
|
java.lang.String |
getVersion()
Pass the call on to the underlying handler
|
java.io.Writer |
getWriter()
Get the character stream where the events will be serialized to.
|
void |
ignorableWhitespace(char[] ch,
int start,
int length)
Pass the call on to the underlying handler
|
void |
internalEntityDecl(java.lang.String arg0,
java.lang.String arg1)
Pass the call on to the underlying handler
|
void |
namespaceAfterStartElement(java.lang.String prefix,
java.lang.String uri)
This method is used when a prefix/uri namespace mapping
is indicated after the element was started with a
startElement() and before and endElement().
|
void |
processingInstruction(java.lang.String target,
java.lang.String data)
Pass the call on to the underlying handler
|
boolean |
reset()
passes the call on to the underlying HTML or XML handler
|
void |
serialize(Node node)
Converts the DOM node to output
|
void |
setCdataSectionElements(java.util.Vector URI_and_localNames)
Sets the value coming from the xsl:output cdata-section-elements
stylesheet property.
|
void |
setContentHandler(ContentHandler ch)
Set the SAX Content handler that the serializer sends its output to.
|
void |
setDoctype(java.lang.String system,
java.lang.String pub)
Set the value coming from the xsl:output doctype-public and doctype-system stylesheet properties
|
void |
setDoctypePublic(java.lang.String doctype)
Set the doctype in the underlying XML handler.
|
void |
setDoctypeSystem(java.lang.String doctype)
Set the doctype in the underlying XML handler.
|
void |
setDocumentLocator(Locator locator)
Pass the call on to the underlying handler
|
void |
setEncoding(java.lang.String encoding)
Pass the call on to the underlying handler
|
boolean |
setEscaping(boolean escape)
Turns special character escaping on/off.
|
void |
setIndent(boolean indent)
Pass the call on to the underlying handler
|
void |
setIndentAmount(int value)
Pass the call on to the underlying handler
|
void |
setMediaType(java.lang.String mediaType)
Sets the value coming from the xsl:output media-type stylesheet attribute.
|
void |
setOmitXMLDeclaration(boolean b)
Pass the call on to the underlying handler
|
void |
setOutputFormat(java.util.Properties format)
Set the properties of the handler
|
void |
setOutputStream(java.io.OutputStream output)
Sets the output stream to write to
|
void |
setSourceLocator(SourceLocator locator)
This method is used to set the source locator, which might be used to
generated an error message.
|
void |
setStandalone(java.lang.String standalone)
Pass the call on to the underlying handler
|
void |
setTransformer(Transformer t)
Sets the transformer associated with this serializer
|
void |
setVersion(java.lang.String version)
This method cannot be cached because default is different in
HTML and XML (we need more than a boolean).
|
void |
setWriter(java.io.Writer writer)
Sets the writer to write to
|
void |
skippedEntity(java.lang.String name)
Pass the call on to the underlying handler
|
void |
startCDATA()
Pass the call on to the underlying handler
|
void |
startDocument()
Receive notification of the beginning of a document.
|
void |
startDTD(java.lang.String name,
java.lang.String publicId,
java.lang.String systemId)
Pass the call on to the underlying handler
|
void |
startElement(java.lang.String qName)
This method is used to notify of the start of an element
|
void |
startElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String qName)
This method is used to notify that an element is starting.
|
void |
startElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String elementName,
Attributes atts)
Receive notification of the beginning of an element.
|
void |
startEntity(java.lang.String name)
Pass the call on to the underlying handler
|
void |
startPrefixMapping(java.lang.String prefix,
java.lang.String uri)
Begin the scope of a prefix-URI Namespace mapping.
|
boolean |
startPrefixMapping(java.lang.String prefix,
java.lang.String uri,
boolean shouldFlush)
This method is used to notify that a prefix maping is to start, which can
be for the current element, or for the one to come.
|
addAttribute, addAttributeAlways, addXSLAttribute, characters, documentIsEmpty, error, fatalError, fireEndEntity, getOutputProperty, getOutputPropertyDefault, getOutputPropertyNonDefault, notationDecl, setDTDEntityExpansion, setNamespaceMappings, setOutputProperty, setOutputPropertyDefault, unparsedEntityDecl, warningpublic static final java.lang.String CDATA_CONTINUE
public static final java.lang.String CDATA_DELIMITER_CLOSE
public static final java.lang.String CDATA_DELIMITER_OPEN
public static final java.lang.String ENTITY_AMP
public static final java.lang.String ENTITY_CRLF
public static final java.lang.String ENTITY_GT
public static final java.lang.String ENTITY_LT
public static final java.lang.String ENTITY_QUOT
public static final java.lang.String XML_PREFIX
public static final java.lang.String XMLNS_PREFIX
public static final java.lang.String XMLNS_URI
public static final java.lang.String DEFAULT_SAX_SERIALIZER
public static final java.lang.String XMLVERSION11
public static final java.lang.String XMLVERSION10
public ToUnknownStream()
public ContentHandler asContentHandler() throws java.io.IOException
SerializerBaseContentHandler interface into this serializer.
If the serializer does not support the ContentHandler
interface, it should return null.asContentHandler in interface SerializerasContentHandler in class SerializerBasejava.io.IOException - An I/O exception occuredSerializer.asContentHandler()public void close()
SerializerBaseclose in interface SerializationHandlerclose in class SerializerBaseSerializationHandler.close()public java.util.Properties getOutputFormat()
SerializerSerializer.getOutputFormat()public java.io.OutputStream getOutputStream()
SerializerSerializer.getOutputStream()public java.io.Writer getWriter()
SerializerSerializer.getWriter()public boolean reset()
reset in interface Serializerreset in class SerializerBaseSerializer.reset()public void serialize(Node node) throws java.io.IOException
node - the DOM node to transform to outputjava.io.IOException - if an I/O exception occured while serializingDOMSerializer.serialize(Node)public boolean setEscaping(boolean escape)
throws SAXException
SerializationHandlerescape - true if escaping is to be set on.SAXExceptionSerializationHandler.setEscaping(boolean)public void setOutputFormat(java.util.Properties format)
format - the output properties to setSerializer.setOutputFormat(Properties)public void setOutputStream(java.io.OutputStream output)
output - the OutputStream to write toSerializer.setOutputStream(OutputStream)public void setWriter(java.io.Writer writer)
writer - the writer to write toSerializer.setWriter(Writer)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 SAXException
addAttribute in interface ExtendedContentHandleraddAttribute in class SerializerBaseuri - the URI of a namespacelocalName - the attribute name, without prefixrawName - the attribute name, with prefix (if any)type - the type of the attribute, typically "CDATA"value - the value of the parameterXSLAttribute - true if this attribute is coming from an xsl:attribute elementSAXExceptionExtendedContentHandler.addAttribute(String, String, String, String, String)public void addAttribute(java.lang.String rawName,
java.lang.String value)
addAttribute in interface ExtendedContentHandleraddAttribute in class SerializerBaserawName - the attribute name, with prefix (if any)value - the value of the parameterExtendedContentHandler.addAttribute(String, String)public void addUniqueAttribute(java.lang.String rawName,
java.lang.String value,
int flags)
throws SAXException
rawName - the fully qualified attribute name.value - the attribute valueflags - a bitwise flagSAXExceptionpublic void characters(java.lang.String chars)
throws SAXException
chars - the character dataSAXExceptionExtendedContentHandler.characters(String)public void endElement(java.lang.String elementName)
throws SAXException
elementName - the fully qualified element name.SAXExceptionExtendedContentHandler.endElement(String)public void startPrefixMapping(java.lang.String prefix,
java.lang.String uri)
throws SAXException
ContentHandlerThe information from this event is not necessary for
normal Namespace processing: the SAX XML reader will
automatically replace prefixes for element and attribute
names when the http://xml.org/sax/features/namespaces
feature is true (the default).
There are cases, however, when applications need to use prefixes in character data or in attribute values, where they cannot safely be expanded automatically; the start/endPrefixMapping event supplies the information to the application to expand prefixes in those contexts itself, if necessary.
Note that start/endPrefixMapping events are not
guaranteed to be properly nested relative to each other:
all startPrefixMapping events will occur immediately before the
corresponding startElement event,
and all endPrefixMapping
events will occur immediately after the corresponding
endElement event,
but their order is not otherwise
guaranteed.
There should never be start/endPrefixMapping events for the "xml" prefix, since it is predeclared and immutable.
prefix - The prefix that maps to the URIuri - The URI for the namespaceSAXException - the client may throw
an exception during processingContentHandler.startPrefixMapping(String, String)public void namespaceAfterStartElement(java.lang.String prefix,
java.lang.String uri)
throws SAXException
namespaceAfterStartElement in interface ExtendedContentHandlernamespaceAfterStartElement in class SerializerBaseuri - the URI of the namespaceprefix - the prefix associated with the given URI.SAXExceptionExtendedContentHandler.namespaceAfterStartElement(String, String)public boolean startPrefixMapping(java.lang.String prefix,
java.lang.String uri,
boolean shouldFlush)
throws SAXException
ExtendedContentHandlerprefix - the prefix that maps to the given URIuri - the namespace URI of the given prefixshouldFlush - if true this call is like the SAX
startPrefixMapping(prefix,uri) call and the mapping applies to the
element to come. If false the mapping applies to the current element.SAXExceptionpublic void setVersion(java.lang.String version)
setVersion in class SerializerBaseversion - the version of the output format.XSLOutputAttributes.setVersion(String)public void startDocument()
throws SAXException
SerializerBaseThe SAX parser will invoke this method only once, before any other methods in this interface or in DTDHandler (except for setDocumentLocator).
startDocument in interface ContentHandlerstartDocument in class SerializerBaseSAXException - any SAX exception, possibly
wrapping another exceptionContentHandler.startDocument()public void startElement(java.lang.String qName)
throws SAXException
ExtendedContentHandlerqName - the fully qualified name of the elementSAXExceptionpublic void startElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String qName)
throws SAXException
ExtendedContentHandlerstartElement(uri,localName,qname,atts)but without the attributes.
namespaceURI - the namespace URI of the elementlocalName - the local name (without prefix) of the elementqName - the qualified name of the elementSAXExceptionpublic void startElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String elementName,
Attributes atts)
throws SAXException
ContentHandlerThe Parser will invoke this method at the beginning of every
element in the XML document; there will be a corresponding
endElement event for every startElement event
(even when the element is empty). All of the element's content will be
reported, in order, before the corresponding endElement
event.
This event allows up to three name components for each element:
Any or all of these may be provided, depending on the values of the http://xml.org/sax/features/namespaces and the http://xml.org/sax/features/namespace-prefixes properties:
Note that the attribute list provided will contain only
attributes with explicit values (specified or defaulted):
#IMPLIED attributes will be omitted. The attribute list
will contain attributes used for Namespace declarations
(xmlns* attributes) only if the
http://xml.org/sax/features/namespace-prefixes
property is true (it is false by default, and support for a
true value is optional).
Like characters(), attribute values may have
characters that need more than one char value.
namespaceURI - the Namespace URI, or the empty string if the
element has no Namespace URI or if Namespace
processing is not being performedlocalName - the local name (without prefix), or the
empty string if Namespace processing is not being
performedelementName - the qualified name (with prefix), or the
empty string if qualified names are not availableatts - the attributes attached to the element. If
there are no attributes, it shall be an empty
Attributes object. The value of this object after
startElement returns is undefinedSAXException - any SAX exception, possibly
wrapping another exceptionContentHandler.endElement(java.lang.String, java.lang.String, java.lang.String),
Attributes,
AttributesImplpublic void comment(java.lang.String comment)
throws SAXException
comment in interface ExtendedLexicalHandlercomment in class SerializerBasecomment - the comment, but unlike the SAX comment() method this
method takes a String rather than a character array.SAXExceptionExtendedLexicalHandler.comment(String)public java.lang.String getDoctypePublic()
getDoctypePublic in class SerializerBaseXSLOutputAttributes.getDoctypePublic()public java.lang.String getDoctypeSystem()
getDoctypeSystem in class SerializerBaseXSLOutputAttributes.getDoctypeSystem()public java.lang.String getEncoding()
getEncoding in class SerializerBaseXSLOutputAttributes.getEncoding()public boolean getIndent()
getIndent in class SerializerBaseXSLOutputAttributes.getIndent()public int getIndentAmount()
getIndentAmount in class SerializerBaseXSLOutputAttributes.getIndentAmount()public java.lang.String getMediaType()
getMediaType in class SerializerBaseXSLOutputAttributes.getMediaType()public boolean getOmitXMLDeclaration()
getOmitXMLDeclaration in class SerializerBaseXSLOutputAttributes.getOmitXMLDeclaration()public java.lang.String getStandalone()
getStandalone in class SerializerBasestandalone delaration is to
be included in the output document.XSLOutputAttributes.getStandalone()public java.lang.String getVersion()
getVersion in class SerializerBaseXSLOutputAttributes.getVersion()public void setDoctype(java.lang.String system,
java.lang.String pub)
SerializerBasesetDoctype in class SerializerBasesystem - the system identifier to be used in the DOCTYPE
declaration in the output document.pub - the public identifier to be used in the DOCTYPE
declaration in the output document.XSLOutputAttributes.setDoctype(String, String)public void setDoctypePublic(java.lang.String doctype)
setDoctypePublic in class SerializerBasedoctype - the public doctype to setXSLOutputAttributes.setDoctypePublic(String)public void setDoctypeSystem(java.lang.String doctype)
setDoctypeSystem in class SerializerBasedoctype - the system doctype to setXSLOutputAttributes.setDoctypeSystem(String)public void setEncoding(java.lang.String encoding)
setEncoding in class SerializerBaseencoding - the character encodingXSLOutputAttributes.setEncoding(String)public void setIndent(boolean indent)
setIndent in class SerializerBaseindent - true if the output document should be indented to
visually indicate its structure.XSLOutputAttributes.setIndent(boolean)public void setIndentAmount(int value)
setIndentAmount in interface SerializationHandlersetIndentAmount in class SerializerBasevalue - The m_indentAmount to setpublic void setMediaType(java.lang.String mediaType)
SerializerBasesetMediaType in class SerializerBasemediaType - the non-null media-type or MIME type associated with the
output document.XSLOutputAttributes.setMediaType(String)public void setOmitXMLDeclaration(boolean b)
setOmitXMLDeclaration in class SerializerBaseb - true if the XML declaration is to be omitted from the output
document.XSLOutputAttributes.setOmitXMLDeclaration(boolean)public void setStandalone(java.lang.String standalone)
setStandalone in class SerializerBasestandalone - a value of "yes" indicates that the
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.XSLOutputAttributes.setStandalone(String)public void attributeDecl(java.lang.String arg0,
java.lang.String arg1,
java.lang.String arg2,
java.lang.String arg3,
java.lang.String arg4)
throws SAXException
arg0 - The name of the associated element.arg1 - The name of the attribute.arg2 - A string representing the attribute type.arg3 - A string representing the attribute defaulting mode
("#IMPLIED", "#REQUIRED", or "#FIXED") or null if
none of these applies.arg4 - A string representing the attribute's default value,
or null if there is none.SAXException - The application may raise an exception.DeclHandler.attributeDecl(String, String, String, String, String)public void elementDecl(java.lang.String arg0,
java.lang.String arg1)
throws SAXException
arg0 - The element type name.arg1 - The content model as a normalized string.SAXException - The application may raise an exception.DeclHandler.elementDecl(String, String)public void externalEntityDecl(java.lang.String name,
java.lang.String publicId,
java.lang.String systemId)
throws SAXException
name - The name of the entity. If it is a parameter
entity, the name will begin with '%'.publicId - The entity's public identifier, or null if none
was given.systemId - The entity's system identifier.SAXException - The application may raise an exception.DeclHandler.externalEntityDecl(String, String, String)public void internalEntityDecl(java.lang.String arg0,
java.lang.String arg1)
throws SAXException
arg0 - The name of the entity. If it is a parameter
entity, the name will begin with '%'.arg1 - The replacement text of the entity.SAXException - The application may raise an exception.DeclHandler.internalEntityDecl(String, String)public void characters(char[] characters,
int offset,
int length)
throws SAXException
characters - the characters from the XML documentoffset - the start position in the arraylength - the number of characters to read from the arraySAXException - any SAX exception, possibly
wrapping another exceptionContentHandler.characters(char[], int, int)public void endDocument()
throws SAXException
SAXException - any SAX exception, possibly
wrapping another exceptionContentHandler.endDocument()public void endElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String qName)
throws SAXException
namespaceURI - the Namespace URI, or the empty string if the
element has no Namespace URI or if Namespace
processing is not being performedlocalName - the local name (without prefix), or the
empty string if Namespace processing is not being
performedqName - the qualified XML name (with prefix), or the
empty string if qualified names are not availableSAXException - any SAX exception, possibly
wrapping another exceptionContentHandler.endElement(String, String, String)public void endPrefixMapping(java.lang.String prefix)
throws SAXException
prefix - the prefix that was being mapped.
This is the empty string when a default mapping scope ends.SAXException - the client may throw
an exception during processingContentHandler.endPrefixMapping(String)public void ignorableWhitespace(char[] ch,
int start,
int length)
throws SAXException
ch - the characters from the XML documentstart - the start position in the arraylength - the number of characters to read from the arraySAXException - any SAX exception, possibly
wrapping another exceptionContentHandler.ignorableWhitespace(char[], int, int)public void processingInstruction(java.lang.String target,
java.lang.String data)
throws SAXException
target - the processing instruction targetdata - the processing instruction data, or null if
none was supplied. The data does not include any
whitespace separating it from the targetSAXException - any SAX exception, possibly
wrapping another exceptionContentHandler.processingInstruction(String, String)public void setDocumentLocator(Locator locator)
setDocumentLocator in interface ContentHandlersetDocumentLocator in class SerializerBaselocator - An object that can return the location of any SAX document
event.
Receive an object for locating the origin of SAX document events.
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.
ContentHandler.setDocumentLocator(Locator)public void skippedEntity(java.lang.String name)
throws SAXException
name - the name of the skipped entity. If it is a
parameter entity, the name will begin with '%', and if
it is the external DTD subset, it will be the string
"[dtd]"SAXException - any SAX exception, possibly
wrapping another exceptionContentHandler.skippedEntity(String)public void comment(char[] ch,
int start,
int length)
throws SAXException
ch - An array holding the characters in the comment.start - The starting position in the array.length - The number of characters to use from the array.SAXException - The application may raise an exception.LexicalHandler.comment(char[], int, int)public void endCDATA()
throws SAXException
SAXException - The application may raise an exception.LexicalHandler.endCDATA()public void endDTD()
throws SAXException
SAXException - The application may raise an exception.LexicalHandler.endDTD()public void endEntity(java.lang.String name)
throws SAXException
endEntity in interface LexicalHandlerendEntity in class SerializerBasename - The name of the entity that is ending.SAXException - The application may raise an exception.LexicalHandler.endEntity(String)public void startCDATA()
throws SAXException
SAXException - The application may raise an exception.LexicalHandler.startCDATA()public void startDTD(java.lang.String name,
java.lang.String publicId,
java.lang.String systemId)
throws SAXException
name - The document type name.publicId - The declared public identifier for the
external DTD subset, or null if none was declared.systemId - The declared system identifier for the
external DTD subset, or null if none was declared.
(Note that this is not resolved against the document
base URI.)SAXException - The application may raise an
exception.LexicalHandler.startDTD(String, String, String)public void startEntity(java.lang.String name)
throws SAXException
name - The name of the entity. If it is a parameter
entity, the name will begin with '%', and if it is the
external DTD subset, it will be "[dtd]".SAXException - The application may raise an exception.LexicalHandler.startEntity(String)public DOMSerializer asDOMSerializer() throws java.io.IOException
SerializerBaseDOMSerializer interface into this serializer. If the
serializer does not support the DOMSerializer interface, it should
return null.asDOMSerializer in interface SerializerasDOMSerializer in class SerializerBaseDOMSerializer interface into this serializer, or null
if the serializer is not DOM capablejava.io.IOException - An I/O exception occuredSerializer.asDOMSerializer()public void setCdataSectionElements(java.util.Vector URI_and_localNames)
URI_and_localNames - Vector a list of pairs of URI/localName
specified in the cdata-section-elements attribute.XSLOutputAttributes.setCdataSectionElements(java.util.Vector)public void addAttributes(Attributes atts) throws SAXException
SerializerBaseaddAttributes in interface ExtendedContentHandleraddAttributes in class SerializerBaseatts - List of attributes to add to this listSAXExceptionExtendedContentHandler.addAttributes(org.xml.sax.Attributes)public NamespaceMappings getNamespaceMappings()
getNamespaceMappings in interface ExtendedContentHandlergetNamespaceMappings in class SerializerBaseExtendedContentHandler.getNamespaceMappings()public void flushPending()
throws SAXException
SerializationHandlerIf the SerializationHandler has a Writer or OutputStream, a call to this method will flush such accumulated events as a closed start tag for an element.
If the SerializationHandler wraps a ContentHandler, a call to this method will flush such accumulated events as a SAX (not SAX-like) calls to startPrefixMapping() and startElement().
If one calls endDocument() then one need not call this method since a call to endDocument() will do what this method does. However, in some circumstances, such as with document fragments, endDocument() is not called and it may be necessary to call this method to flush any pending events.
For performance reasons this method should not be called very often.
SAXExceptionSerializationHandler.flushPending()public java.lang.String getPrefix(java.lang.String namespaceURI)
SerializerBasegetPrefix in interface ExtendedContentHandlergetPrefix in class SerializerBasenamespaceURI - the uri of the namespace in questionExtendedContentHandler.getPrefix(java.lang.String)public void entityReference(java.lang.String entityName)
throws SAXException
SerializerBaseentityReference in interface ExtendedContentHandlerentityReference in class SerializerBaseentityName - Name of entitySAXExceptionExtendedContentHandler.entityReference(java.lang.String)public java.lang.String getNamespaceURI(java.lang.String qname,
boolean isElement)
SerializerBasegetNamespaceURI in interface ExtendedContentHandlergetNamespaceURI in class SerializerBaseqname - a qualified nameisElement - true if the qualified name is the name of
an element.ExtendedContentHandler.getNamespaceURI(java.lang.String, boolean)public java.lang.String getNamespaceURIFromPrefix(java.lang.String prefix)
SerializerBasegetNamespaceURIFromPrefix in interface ExtendedContentHandlergetNamespaceURIFromPrefix in class SerializerBaseprefix - the prefix whose URI is searched forpublic void setTransformer(Transformer t)
SerializerBasesetTransformer in interface SerializationHandlersetTransformer in class SerializerBaset - the transformer associated with this serializer.SerializationHandler.setTransformer(Transformer)public Transformer getTransformer()
SerializerBasegetTransformer in interface SerializationHandlergetTransformer in class SerializerBaseSerializationHandler.getTransformer()public void setContentHandler(ContentHandler ch)
SerializationHandlerpublic void setSourceLocator(SourceLocator locator)
setSourceLocator in interface ExtendedContentHandlersetSourceLocator in class SerializerBaselocator - the source locatorExtendedContentHandler.setSourceLocator(javax.xml.transform.SourceLocator)public java.lang.Object asDOM3Serializer()
throws java.io.IOException
SerializerBaseDOM3Serializer interface into this serializer. If the
serializer does not support the DOM3Serializer interface, it should
return null.asDOM3Serializer in interface SerializerasDOM3Serializer in class SerializerBaseDOM3Serializer interface into this serializer, or null
if the serializer is not DOM capablejava.io.IOException - An I/O exception occuredSerializer.asDOM3Serializer()Copyright © 2014 Apache XML Project. All Rights Reserved.