public class EmptySerializer extends java.lang.Object implements SerializationHandler
HTML_ATTREMPTY, HTML_ATTRURL, NO_BAD_CHARS| Constructor and Description |
|---|
EmptySerializer() |
| Modifier and Type | Method and Description |
|---|---|
void |
addAttribute(java.lang.String name,
java.lang.String value)
Add an attribute to the current element.
|
void |
addAttribute(java.lang.String uri,
java.lang.String localName,
java.lang.String rawName,
java.lang.String type,
java.lang.String value)
Add at attribute to the current element, not from an xsl:attribute
element.
|
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 at attribute to the current element
|
void |
addAttributes(org.xml.sax.Attributes atts)
Add attributes to the current element
|
void |
addUniqueAttribute(java.lang.String name,
java.lang.String value,
int flags)
Add a unique attribute to the current element.
|
void |
addXSLAttribute(java.lang.String qName,
java.lang.String value,
java.lang.String uri)
Add an attribute from an xsl:attribute element.
|
org.xml.sax.ContentHandler |
asContentHandler()
Return a
ContentHandler interface to provide SAX input to. |
java.lang.Object |
asDOM3Serializer()
Return an Object into this serializer to be cast to a DOM3Serializer.
|
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) |
void |
characters(char[] arg0,
int arg1,
int arg2) |
void |
characters(org.w3c.dom.Node node)
This method is used to notify of a character event, but passing the data
as a DOM Node rather than the standard character array.
|
void |
characters(java.lang.String chars)
This method is used to notify of a character event, but passing the data
as a character String rather than the standard character array.
|
void |
close() |
void |
comment(char[] arg0,
int arg1,
int arg2) |
void |
comment(java.lang.String comment)
This method is used to notify of a comment
|
void |
elementDecl(java.lang.String arg0,
java.lang.String arg1) |
void |
endCDATA() |
void |
endDocument() |
void |
endDTD() |
void |
endElement(java.lang.String elemName)
This method is used to notify that an element has ended.
|
void |
endElement(java.lang.String arg0,
java.lang.String arg1,
java.lang.String arg2) |
void |
endEntity(java.lang.String arg0) |
void |
endPrefixMapping(java.lang.String arg0) |
void |
entityReference(java.lang.String entityName)
Notify of an entity reference.
|
void |
error(org.xml.sax.SAXParseException arg0) |
void |
externalEntityDecl(java.lang.String arg0,
java.lang.String arg1,
java.lang.String arg2) |
void |
fatalError(org.xml.sax.SAXParseException arg0) |
void |
flushPending()
A SerializationHandler accepts SAX-like events, so
it can accumulate attributes or namespace nodes after
a startElement().
|
java.lang.String |
getDoctypePublic()
Returns the previously set value of the value to be used as the public
identifier in the document type declaration (DTD).
|
java.lang.String |
getDoctypeSystem()
Returns the previously set value of the value to be used
as the system identifier in the document type declaration (DTD).
|
java.lang.String |
getEncoding() |
boolean |
getIndent() |
int |
getIndentAmount() |
java.lang.String |
getMediaType() |
NamespaceMappings |
getNamespaceMappings()
This method returns an object that has the current namespace mappings in
effect.
|
java.lang.String |
getNamespaceURI(java.lang.String name,
boolean isElement)
This method gets the prefix associated with a current element or
attribute name.
|
java.lang.String |
getNamespaceURIFromPrefix(java.lang.String prefix)
This method returns the namespace URI currently associated with the
prefix.
|
boolean |
getOmitXMLDeclaration() |
java.util.Properties |
getOutputFormat()
Returns the output format properties for this serializer.
|
java.lang.String |
getOutputProperty(java.lang.String name)
Get the value for a property that affects seraialization,
if a property was set return that value, otherwise return
the default value, otherwise return null.
|
java.lang.String |
getOutputPropertyDefault(java.lang.String name)
Get the default value for a property that affects seraialization,
or null if there is none.
|
java.io.OutputStream |
getOutputStream()
Get the output stream where the events will be serialized to.
|
java.lang.String |
getPrefix(java.lang.String uri)
This method returns the prefix that currently maps to the given namespace
URI.
|
java.lang.String |
getStandalone() |
javax.xml.transform.Transformer |
getTransformer()
Get the transformer associated with the serializer.
|
java.lang.String |
getVersion() |
java.io.Writer |
getWriter()
Get the character stream where the events will be serialized to.
|
void |
ignorableWhitespace(char[] arg0,
int arg1,
int arg2) |
void |
internalEntityDecl(java.lang.String arg0,
java.lang.String arg1) |
void |
namespaceAfterStartElement(java.lang.String uri,
java.lang.String prefix)
This method is used to notify that a prefix mapping is to start, but
after an element is started.
|
void |
notationDecl(java.lang.String arg0,
java.lang.String arg1,
java.lang.String arg2) |
void |
processingInstruction(java.lang.String arg0,
java.lang.String arg1) |
boolean |
reset()
This method resets the serializer.
|
void |
serialize(org.w3c.dom.Node node)
Notify that the serializer should take this DOM node as input to be
serialized.
|
void |
setCdataSectionElements(java.util.Hashtable h) |
void |
setCdataSectionElements(java.util.Vector URI_and_localNames)
Sets the value coming from the xsl:output cdata-section-elements
stylesheet property.
|
void |
setContentHandler(org.xml.sax.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 value coming from the xsl:output doctype-public stylesheet attribute.
|
void |
setDoctypeSystem(java.lang.String doctype)
Set the value coming from the xsl:output doctype-system stylesheet attribute.
|
void |
setDocumentLocator(org.xml.sax.Locator arg0) |
void |
setDTDEntityExpansion(boolean expand)
Default behavior is to expand DTD entities,
that is the initall default value is true.
|
void |
setEncoding(java.lang.String encoding)
Sets the character encoding coming from the xsl:output encoding stylesheet attribute.
|
boolean |
setEscaping(boolean escape)
Turns special character escaping on/off.
|
void |
setIndent(boolean indent)
Sets the value coming from the xsl:output indent stylesheet
attribute.
|
void |
setIndentAmount(int spaces)
Set the number of spaces to indent for each indentation level.
|
void |
setMediaType(java.lang.String mediatype)
Sets the value coming from the xsl:output media-type stylesheet attribute.
|
void |
setNamespaceMappings(NamespaceMappings mappings)
Used only by TransformerSnapshotImpl to restore the serialization
to a previous state.
|
void |
setOmitXMLDeclaration(boolean b)
Sets the value coming from the xsl:output omit-xml-declaration stylesheet attribute
|
void |
setOutputFormat(java.util.Properties format)
Specifies an output format for this serializer.
|
void |
setOutputProperty(java.lang.String name,
java.lang.String val)
Set the non-default value for a property that affects seraialization.
|
void |
setOutputPropertyDefault(java.lang.String name,
java.lang.String val)
Set the default value for a property that affects seraialization.
|
void |
setOutputStream(java.io.OutputStream output)
Specifies an output stream to which the document should be
serialized.
|
void |
setSourceLocator(javax.xml.transform.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)
Sets the value coming from the xsl:output standalone stylesheet attribute.
|
void |
setTransformer(javax.xml.transform.Transformer transformer)
Set the transformer associated with the serializer.
|
void |
setVersion(java.lang.String version)
Sets the value coming from the xsl:output version attribute.
|
void |
setWriter(java.io.Writer writer)
Specifies a writer to which the document should be serialized.
|
void |
skippedEntity(java.lang.String arg0) |
void |
startCDATA() |
void |
startDocument() |
void |
startDTD(java.lang.String arg0,
java.lang.String arg1,
java.lang.String arg2) |
void |
startElement(java.lang.String qName)
This method is used to notify of the start of an element
|
void |
startElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName)
This method is used to notify that an element is starting.
|
void |
startElement(java.lang.String arg0,
java.lang.String arg1,
java.lang.String arg2,
org.xml.sax.Attributes arg3) |
void |
startEntity(java.lang.String arg0) |
void |
startPrefixMapping(java.lang.String arg0,
java.lang.String arg1) |
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.
|
void |
unparsedEntityDecl(java.lang.String arg0,
java.lang.String arg1,
java.lang.String arg2,
java.lang.String arg3) |
void |
warning(org.xml.sax.SAXParseException arg0) |
public org.xml.sax.ContentHandler asContentHandler()
throws java.io.IOException
SerializerContentHandler interface to provide SAX input to.
Through the returned object the document to be serailized,
as a series of SAX events, can be provided to the serialzier.
If the serializer does not support the ContentHandler
interface, it will return null.
In principle only one of asDOMSerializer() or asContentHander() should be called.
asContentHandler in interface SerializerContentHandler interface into this serializer,
or null if the serializer is not SAX 2 capablejava.io.IOException - An I/O exception occuredSerializer.asContentHandler()public void setContentHandler(org.xml.sax.ContentHandler ch)
SerializationHandlersetContentHandler in interface SerializationHandlerSerializationHandler.setContentHandler(org.xml.sax.ContentHandler)public void close()
close in interface SerializationHandlerSerializationHandler.close()public java.util.Properties getOutputFormat()
SerializergetOutputFormat in interface SerializerSerializer.getOutputFormat()public java.io.OutputStream getOutputStream()
SerializergetOutputStream in interface SerializerSerializer.getOutputStream()public java.io.Writer getWriter()
SerializergetWriter in interface SerializerSerializer.getWriter()public boolean reset()
Serializerreset in interface SerializerSerializer.reset()public void serialize(org.w3c.dom.Node node)
throws java.io.IOException
SerializationHandlerserialize in interface DOMSerializerserialize in interface SerializationHandlernode - the DOM node to be serialized.java.io.IOException - if an I/O exception occured while serializingSerializationHandler.serialize(org.w3c.dom.Node)public void setCdataSectionElements(java.util.Vector URI_and_localNames)
URI_and_localNames - pairs of namespace URI and local names that
identify elements whose text elements are to be output as CDATA sections.
The namespace of the local element must be the given URI to match. The
qName is not given because the prefix does not matter, only the namespace
URI to which that prefix would map matters, so the prefix itself is not
relevant in specifying which elements have their text to be output as
CDATA sections.XSLOutputAttributes.setCdataSectionElements(java.util.Vector)public boolean setEscaping(boolean escape)
throws org.xml.sax.SAXException
SerializationHandlersetEscaping in interface SerializationHandlerescape - true if escaping is to be set on.org.xml.sax.SAXExceptionSerializationHandler.setEscaping(boolean)public void setIndent(boolean indent)
indent - true if the output document should be indented to visually
indicate its structure.XSLOutputAttributes.setIndent(boolean)public void setIndentAmount(int spaces)
SerializationHandlersetIndentAmount in interface SerializationHandlerspaces - the number of spaces to indent for each indentation level.SerializationHandler.setIndentAmount(int)public void setOutputFormat(java.util.Properties format)
SerializerThe standard property keys supported are: "method", "version", "encoding", "omit-xml-declaration", "standalone", doctype-public", "doctype-system", "cdata-section-elements", "indent", "media-type". These property keys and their values are described in the XSLT recommendation, see XSLT 1.0 recommendation
The non-standard property keys supported are defined in OutputPropertiesFactory.
This method can be called multiple times before a document is serialized. Each time it is called more, or over-riding property values, can be specified. One property value that can not be changed is that of the "method" property key.
The value of the "cdata-section-elements" property key is a whitespace separated list of elements. If the element is in a namespace then value is passed in this format: {uri}localName
If the "cdata-section-elements" key is specified on multiple calls to this method the set of elements specified in the value is not replaced from one call to the next, but it is cumulative across the calls.
setOutputFormat in interface Serializerformat - The output format to use, as a set of key/value pairs.Serializer.setOutputFormat(java.util.Properties)public void setOutputStream(java.io.OutputStream output)
Serializer
The encoding specified in the output Properties is used, or
if no encoding was specified, the default for the selected
output method.
Only one of setWriter() or setOutputStream() should be called.
setOutputStream in interface Serializeroutput - The output streamSerializer.setOutputStream(java.io.OutputStream)public void setVersion(java.lang.String version)
version - the version of the output format.XSLOutputAttributes.setVersion(java.lang.String)public void setWriter(java.io.Writer writer)
Serializer
The encoding specified for the output Properties must be
identical to the output format used with the writer.
Only one of setWriter() or setOutputStream() should be called.
setWriter in interface Serializerwriter - The output writer streamSerializer.setWriter(java.io.Writer)public void setTransformer(javax.xml.transform.Transformer transformer)
SerializationHandlersetTransformer in interface SerializationHandlertransformer - the transformer associated with the serializer.SerializationHandler.setTransformer(javax.xml.transform.Transformer)public javax.xml.transform.Transformer getTransformer()
SerializationHandlergetTransformer in interface SerializationHandlerSerializationHandler.getTransformer()public void flushPending()
throws org.xml.sax.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.
flushPending in interface SerializationHandlerorg.xml.sax.SAXExceptionSerializationHandler.flushPending()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
ExtendedContentHandleraddAttribute in interface ExtendedContentHandleruri - the namespace URI of the attribute namelocalName - the local name of the attribute (without prefix)rawName - the qualified name of the attributetype - the attribute type typically character data (CDATA)value - the value of the attributeXSLAttribute - true if the added attribute is coming from an xsl:attribute elementorg.xml.sax.SAXExceptionExtendedContentHandler.addAttribute(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String)public void addAttributes(org.xml.sax.Attributes atts)
throws org.xml.sax.SAXException
ExtendedContentHandleraddAttributes in interface ExtendedContentHandleratts - the attributes to add.org.xml.sax.SAXExceptionExtendedContentHandler.addAttributes(org.xml.sax.Attributes)public void addAttribute(java.lang.String name,
java.lang.String value)
ExtendedContentHandleraddAttribute in interface ExtendedContentHandlerExtendedContentHandler.addAttribute(java.lang.String, java.lang.String)public void characters(java.lang.String chars)
throws org.xml.sax.SAXException
ExtendedContentHandlercharacters in interface ExtendedContentHandlerchars - the character dataorg.xml.sax.SAXExceptionExtendedContentHandler.characters(java.lang.String)public void endElement(java.lang.String elemName)
throws org.xml.sax.SAXException
ExtendedContentHandlerendElement(namespaceURI,localName,qName)only the last parameter is passed. If needed the serializer can derive the localName from the qualified name and derive the namespaceURI from its implementation.
endElement in interface ExtendedContentHandlerelemName - the fully qualified element name.org.xml.sax.SAXExceptionExtendedContentHandler.endElement(java.lang.String)public void startDocument()
throws org.xml.sax.SAXException
startDocument in interface org.xml.sax.ContentHandlerorg.xml.sax.SAXExceptionContentHandler.startDocument()public void startElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName)
throws org.xml.sax.SAXException
ExtendedContentHandlerstartElement(uri,localName,qname,atts)but without the attributes.
startElement in interface ExtendedContentHandleruri - the namespace URI of the elementlocalName - the local name (without prefix) of the elementqName - the qualified name of the elementorg.xml.sax.SAXExceptionExtendedContentHandler.startElement(java.lang.String, java.lang.String, java.lang.String)public void startElement(java.lang.String qName)
throws org.xml.sax.SAXException
ExtendedContentHandlerstartElement in interface ExtendedContentHandlerqName - the fully qualified name of the elementorg.xml.sax.SAXExceptionExtendedContentHandler.startElement(java.lang.String)public void namespaceAfterStartElement(java.lang.String uri,
java.lang.String prefix)
throws org.xml.sax.SAXException
ExtendedContentHandlerstartPrefixMapping(prefix,uri)is used just before an element starts and applies to the element to come, not to the current element. This method applies to the current element. For example one could make the calls in this order:
startElement("prfx8:elem9")
namespaceAfterStartElement("http://namespace8","prfx8")
namespaceAfterStartElement in interface ExtendedContentHandleruri - the namespace URI being declaredprefix - the prefix that maps to the given namespaceorg.xml.sax.SAXExceptionExtendedContentHandler.namespaceAfterStartElement(java.lang.String, java.lang.String)public boolean startPrefixMapping(java.lang.String prefix,
java.lang.String uri,
boolean shouldFlush)
throws org.xml.sax.SAXException
ExtendedContentHandlerstartPrefixMapping in interface 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.org.xml.sax.SAXExceptionExtendedContentHandler.startPrefixMapping(java.lang.String, java.lang.String, boolean)public void entityReference(java.lang.String entityName)
throws org.xml.sax.SAXException
ExtendedContentHandlerentityReference in interface ExtendedContentHandlerentityName - the name of the entityorg.xml.sax.SAXExceptionExtendedContentHandler.entityReference(java.lang.String)public NamespaceMappings getNamespaceMappings()
ExtendedContentHandlergetNamespaceMappings in interface ExtendedContentHandlerExtendedContentHandler.getNamespaceMappings()public java.lang.String getPrefix(java.lang.String uri)
ExtendedContentHandlergetPrefix in interface ExtendedContentHandleruri - the namespace URIExtendedContentHandler.getPrefix(java.lang.String)public java.lang.String getNamespaceURI(java.lang.String name,
boolean isElement)
ExtendedContentHandlergetNamespaceURI in interface ExtendedContentHandlername - the qualified name of an element, or attributeisElement - true if it is an element name, false if it is an
atttribute nameExtendedContentHandler.getNamespaceURI(java.lang.String, boolean)public java.lang.String getNamespaceURIFromPrefix(java.lang.String prefix)
ExtendedContentHandlergetNamespaceURIFromPrefix in interface ExtendedContentHandlerprefix - a prefix of an element or attribute.ExtendedContentHandler.getNamespaceURIFromPrefix(java.lang.String)public void setDocumentLocator(org.xml.sax.Locator arg0)
setDocumentLocator in interface org.xml.sax.ContentHandlerContentHandler.setDocumentLocator(org.xml.sax.Locator)public void endDocument()
throws org.xml.sax.SAXException
endDocument in interface org.xml.sax.ContentHandlerorg.xml.sax.SAXExceptionContentHandler.endDocument()public void startPrefixMapping(java.lang.String arg0,
java.lang.String arg1)
throws org.xml.sax.SAXException
startPrefixMapping in interface org.xml.sax.ContentHandlerorg.xml.sax.SAXExceptionContentHandler.startPrefixMapping(java.lang.String, java.lang.String)public void endPrefixMapping(java.lang.String arg0)
throws org.xml.sax.SAXException
endPrefixMapping in interface org.xml.sax.ContentHandlerorg.xml.sax.SAXExceptionContentHandler.endPrefixMapping(java.lang.String)public void startElement(java.lang.String arg0,
java.lang.String arg1,
java.lang.String arg2,
org.xml.sax.Attributes arg3)
throws org.xml.sax.SAXException
startElement in interface org.xml.sax.ContentHandlerorg.xml.sax.SAXExceptionContentHandler.startElement(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes)public void endElement(java.lang.String arg0,
java.lang.String arg1,
java.lang.String arg2)
throws org.xml.sax.SAXException
endElement in interface org.xml.sax.ContentHandlerorg.xml.sax.SAXExceptionContentHandler.endElement(java.lang.String, java.lang.String, java.lang.String)public void characters(char[] arg0,
int arg1,
int arg2)
throws org.xml.sax.SAXException
characters in interface org.xml.sax.ContentHandlerorg.xml.sax.SAXExceptionContentHandler.characters(char[], int, int)public void ignorableWhitespace(char[] arg0,
int arg1,
int arg2)
throws org.xml.sax.SAXException
ignorableWhitespace in interface org.xml.sax.ContentHandlerorg.xml.sax.SAXExceptionContentHandler.ignorableWhitespace(char[], int, int)public void processingInstruction(java.lang.String arg0,
java.lang.String arg1)
throws org.xml.sax.SAXException
processingInstruction in interface org.xml.sax.ContentHandlerorg.xml.sax.SAXExceptionContentHandler.processingInstruction(java.lang.String, java.lang.String)public void skippedEntity(java.lang.String arg0)
throws org.xml.sax.SAXException
skippedEntity in interface org.xml.sax.ContentHandlerorg.xml.sax.SAXExceptionContentHandler.skippedEntity(java.lang.String)public void comment(java.lang.String comment)
throws org.xml.sax.SAXException
ExtendedLexicalHandlercomment in interface ExtendedLexicalHandlercomment - the comment, but unlike the SAX comment() method this
method takes a String rather than a character array.org.xml.sax.SAXExceptionExtendedLexicalHandler.comment(java.lang.String)public void startDTD(java.lang.String arg0,
java.lang.String arg1,
java.lang.String arg2)
throws org.xml.sax.SAXException
startDTD in interface org.xml.sax.ext.LexicalHandlerorg.xml.sax.SAXExceptionLexicalHandler.startDTD(java.lang.String, java.lang.String, java.lang.String)public void endDTD()
throws org.xml.sax.SAXException
endDTD in interface org.xml.sax.ext.LexicalHandlerorg.xml.sax.SAXExceptionLexicalHandler.endDTD()public void startEntity(java.lang.String arg0)
throws org.xml.sax.SAXException
startEntity in interface org.xml.sax.ext.LexicalHandlerorg.xml.sax.SAXExceptionLexicalHandler.startEntity(java.lang.String)public void endEntity(java.lang.String arg0)
throws org.xml.sax.SAXException
endEntity in interface org.xml.sax.ext.LexicalHandlerorg.xml.sax.SAXExceptionLexicalHandler.endEntity(java.lang.String)public void startCDATA()
throws org.xml.sax.SAXException
startCDATA in interface org.xml.sax.ext.LexicalHandlerorg.xml.sax.SAXExceptionLexicalHandler.startCDATA()public void endCDATA()
throws org.xml.sax.SAXException
endCDATA in interface org.xml.sax.ext.LexicalHandlerorg.xml.sax.SAXExceptionLexicalHandler.endCDATA()public void comment(char[] arg0,
int arg1,
int arg2)
throws org.xml.sax.SAXException
comment in interface org.xml.sax.ext.LexicalHandlerorg.xml.sax.SAXExceptionLexicalHandler.comment(char[], int, int)public java.lang.String getDoctypePublic()
XSLOutputAttributes.getDoctypePublic()public java.lang.String getDoctypeSystem()
XSLOutputAttributes.getDoctypeSystem()public java.lang.String getEncoding()
XSLOutputAttributes.getEncoding()public boolean getIndent()
XSLOutputAttributes.getIndent()public int getIndentAmount()
XSLOutputAttributes.getIndentAmount()public java.lang.String getMediaType()
XSLOutputAttributes.getMediaType()public boolean getOmitXMLDeclaration()
XSLOutputAttributes.getOmitXMLDeclaration()public java.lang.String getStandalone()
standalone delaration is to
be included in the output document.XSLOutputAttributes.getStandalone()public java.lang.String getVersion()
XSLOutputAttributes.getVersion()public void setCdataSectionElements(java.util.Hashtable h)
throws java.lang.Exception
java.lang.ExceptionXSLOutputAttributes.setCdataSectionElements(java.util.Vector)public void setDoctype(java.lang.String system,
java.lang.String pub)
system - 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(java.lang.String, java.lang.String)public void setDoctypePublic(java.lang.String doctype)
doctype - the public identifier to be used in the DOCTYPE
declaration in the output document.XSLOutputAttributes.setDoctypePublic(java.lang.String)public void setDoctypeSystem(java.lang.String doctype)
doctype - the system identifier to be used in the DOCTYPE
declaration in the output document.XSLOutputAttributes.setDoctypeSystem(java.lang.String)public void setEncoding(java.lang.String encoding)
encoding - the character encodingXSLOutputAttributes.setEncoding(java.lang.String)public void setMediaType(java.lang.String mediatype)
mediatype - the media-type or MIME type associated with the output
document.XSLOutputAttributes.setMediaType(java.lang.String)public void setOmitXMLDeclaration(boolean b)
b - true if the XML declaration is to be omitted from the output
document.XSLOutputAttributes.setOmitXMLDeclaration(boolean)public void setStandalone(java.lang.String standalone)
standalone - a value of "yes" indicates that the
standalone delaration is to be included in the output
document.XSLOutputAttributes.setStandalone(java.lang.String)public void elementDecl(java.lang.String arg0,
java.lang.String arg1)
throws org.xml.sax.SAXException
elementDecl in interface org.xml.sax.ext.DeclHandlerorg.xml.sax.SAXExceptionDeclHandler.elementDecl(java.lang.String, java.lang.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 org.xml.sax.SAXException
attributeDecl in interface org.xml.sax.ext.DeclHandlerorg.xml.sax.SAXExceptionDeclHandler.attributeDecl(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String)public void internalEntityDecl(java.lang.String arg0,
java.lang.String arg1)
throws org.xml.sax.SAXException
internalEntityDecl in interface org.xml.sax.ext.DeclHandlerorg.xml.sax.SAXExceptionDeclHandler.internalEntityDecl(java.lang.String, java.lang.String)public void externalEntityDecl(java.lang.String arg0,
java.lang.String arg1,
java.lang.String arg2)
throws org.xml.sax.SAXException
externalEntityDecl in interface org.xml.sax.ext.DeclHandlerorg.xml.sax.SAXExceptionDeclHandler.externalEntityDecl(java.lang.String, java.lang.String, java.lang.String)public void warning(org.xml.sax.SAXParseException arg0)
throws org.xml.sax.SAXException
warning in interface org.xml.sax.ErrorHandlerorg.xml.sax.SAXExceptionErrorHandler.warning(org.xml.sax.SAXParseException)public void error(org.xml.sax.SAXParseException arg0)
throws org.xml.sax.SAXException
error in interface org.xml.sax.ErrorHandlerorg.xml.sax.SAXExceptionErrorHandler.error(org.xml.sax.SAXParseException)public void fatalError(org.xml.sax.SAXParseException arg0)
throws org.xml.sax.SAXException
fatalError in interface org.xml.sax.ErrorHandlerorg.xml.sax.SAXExceptionErrorHandler.fatalError(org.xml.sax.SAXParseException)public DOMSerializer asDOMSerializer() throws java.io.IOException
SerializerDOMSerializer interface into this serializer.
Through the returned object the document to be serialized,
a DOM, can be provided to the serializer.
If the serializer does not support the DOMSerializer
interface, it should return null.
In principle only one of asDOMSerializer() or asContentHander() should be called.
asDOMSerializer in interface SerializerDOMSerializer interface into this serializer,
or null if the serializer is not DOM capablejava.io.IOException - An I/O exception occuredSerializer.asDOMSerializer()public void setNamespaceMappings(NamespaceMappings mappings)
SerializationHandlersetNamespaceMappings in interface SerializationHandlermappings - NamespaceMappingsSerializationHandler.setNamespaceMappings(NamespaceMappings)public void setSourceLocator(javax.xml.transform.SourceLocator locator)
ExtendedContentHandlersetSourceLocator in interface ExtendedContentHandlerlocator - the source locatorExtendedContentHandler.setSourceLocator(javax.xml.transform.SourceLocator)public void addUniqueAttribute(java.lang.String name,
java.lang.String value,
int flags)
throws org.xml.sax.SAXException
ExtendedContentHandleraddUniqueAttribute in interface ExtendedContentHandlername - the fully qualified attribute name.value - the attribute valueflags - a bitwise flagorg.xml.sax.SAXExceptionExtendedContentHandler.addUniqueAttribute(java.lang.String, java.lang.String, int)public void characters(org.w3c.dom.Node node)
throws org.xml.sax.SAXException
ExtendedContentHandlercharacters in interface ExtendedContentHandlernode - a DOM Node containing text.org.xml.sax.SAXExceptionExtendedContentHandler.characters(org.w3c.dom.Node)public void addXSLAttribute(java.lang.String qName,
java.lang.String value,
java.lang.String uri)
ExtendedContentHandleraddXSLAttribute in interface ExtendedContentHandlerqName - the qualified attribute name (prefix:localName)value - the attributes valueuri - the uri that the prefix of the qName is mapped to.ExtendedContentHandler.addXSLAttribute(java.lang.String, java.lang.String, java.lang.String)public void addAttribute(java.lang.String uri,
java.lang.String localName,
java.lang.String rawName,
java.lang.String type,
java.lang.String value)
throws org.xml.sax.SAXException
ExtendedContentHandleraddAttribute in interface ExtendedContentHandleruri - the namespace URI of the attribute namelocalName - the local name of the attribute (without prefix)rawName - the qualified name of the attributetype - the attribute type typically character data (CDATA)value - the value of the attributeorg.xml.sax.SAXExceptionExtendedContentHandler.addAttribute(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String)public void notationDecl(java.lang.String arg0,
java.lang.String arg1,
java.lang.String arg2)
throws org.xml.sax.SAXException
notationDecl in interface org.xml.sax.DTDHandlerorg.xml.sax.SAXExceptionDTDHandler.notationDecl(java.lang.String, java.lang.String, java.lang.String)public void unparsedEntityDecl(java.lang.String arg0,
java.lang.String arg1,
java.lang.String arg2,
java.lang.String arg3)
throws org.xml.sax.SAXException
unparsedEntityDecl in interface org.xml.sax.DTDHandlerorg.xml.sax.SAXExceptionDTDHandler.unparsedEntityDecl(java.lang.String, java.lang.String, java.lang.String, java.lang.String)public void setDTDEntityExpansion(boolean expand)
SerializationHandlersetDTDEntityExpansion in interface SerializationHandlerexpand - true if DTD entities are to be expanded,
false if they are to be left as DTD entity references.SerializationHandler.setDTDEntityExpansion(boolean)public java.lang.String getOutputProperty(java.lang.String name)
name - 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:
public java.lang.String getOutputPropertyDefault(java.lang.String name)
name - The name of the property.public void setOutputProperty(java.lang.String name,
java.lang.String val)
name - 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:
public void setOutputPropertyDefault(java.lang.String name,
java.lang.String val)
name - 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:
public java.lang.Object asDOM3Serializer()
throws java.io.IOException
SerializerDOM3Serializer
interface, it should return null.
In principle only one of asDOM3Serializer() or asContentHander() should be called.
asDOM3Serializer in interface Serializerjava.io.IOException - An I/O exception occuredSerializer.asDOM3Serializer()Copyright © 2023 Apache XML Project. All Rights Reserved.