|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.xml.serializer.EmptySerializer
public class EmptySerializer
This class is an adapter class. Its only purpose is to be extended and for that extended class to over-ride all methods that are to be used. This class is not a public API, it is only public because it is used across package boundaries.
Field Summary | |
---|---|
protected static java.lang.String |
ERR
|
Fields inherited from interface org.apache.xml.serializer.ExtendedContentHandler |
---|
HTML_ATTREMPTY, HTML_ATTRURL, NO_BAD_CHARS |
Constructor Summary | |
---|---|
EmptySerializer()
|
Method Summary | |
---|---|
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. |
(package private) void |
aMethodIsCalled()
|
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 |
protected void |
couldThrowException()
|
protected void |
couldThrowIOException()
|
protected void |
couldThrowSAXException()
|
protected void |
couldThrowSAXException(char[] chars,
int off,
int len)
|
protected void |
couldThrowSAXException(java.lang.String elemQName)
|
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)
Serializes the DOM node. |
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)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final java.lang.String ERR
Constructor Detail |
---|
public EmptySerializer()
Method Detail |
---|
protected void couldThrowIOException() throws java.io.IOException
java.io.IOException
Serializer.asContentHandler()
protected void couldThrowSAXException() throws org.xml.sax.SAXException
org.xml.sax.SAXException
protected void couldThrowSAXException(char[] chars, int off, int len) throws org.xml.sax.SAXException
org.xml.sax.SAXException
protected void couldThrowSAXException(java.lang.String elemQName) throws org.xml.sax.SAXException
org.xml.sax.SAXException
protected void couldThrowException() throws java.lang.Exception
java.lang.Exception
void aMethodIsCalled()
public org.xml.sax.ContentHandler asContentHandler() throws java.io.IOException
Serializer
ContentHandler
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 Serializer
ContentHandler
interface into this serializer,
or null if the serializer is not SAX 2 capable
java.io.IOException
- An I/O exception occuredSerializer.asContentHandler()
public void setContentHandler(org.xml.sax.ContentHandler ch)
SerializationHandler
setContentHandler
in interface SerializationHandler
SerializationHandler.setContentHandler(org.xml.sax.ContentHandler)
public void close()
close
in interface SerializationHandler
SerializationHandler.close()
public java.util.Properties getOutputFormat()
Serializer
getOutputFormat
in interface Serializer
Serializer.getOutputFormat()
public java.io.OutputStream getOutputStream()
Serializer
getOutputStream
in interface Serializer
Serializer.getOutputStream()
public java.io.Writer getWriter()
Serializer
getWriter
in interface Serializer
Serializer.getWriter()
public boolean reset()
Serializer
reset
in interface Serializer
Serializer.reset()
public void serialize(org.w3c.dom.Node node) throws java.io.IOException
DOMSerializer
serialize
in interface DOMSerializer
serialize
in interface SerializationHandler
node
- the DOM node to serialize
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)
XSLOutputAttributes
setCdataSectionElements
in interface XSLOutputAttributes
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
SerializationHandler
setEscaping
in interface SerializationHandler
escape
- true if escaping is to be set on.
org.xml.sax.SAXException
SerializationHandler.setEscaping(boolean)
public void setIndent(boolean indent)
XSLOutputAttributes
setIndent
in interface XSLOutputAttributes
indent
- true if the output document should be indented to visually
indicate its structure.XSLOutputAttributes.setIndent(boolean)
public void setIndentAmount(int spaces)
SerializationHandler
setIndentAmount
in interface SerializationHandler
spaces
- the number of spaces to indent for each indentation level.SerializationHandler.setIndentAmount(int)
public void setOutputFormat(java.util.Properties format)
Serializer
The 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 Serializer
format
- 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 Serializer
output
- The output streamSerializer.setOutputStream(java.io.OutputStream)
public void setVersion(java.lang.String version)
XSLOutputAttributes
setVersion
in interface XSLOutputAttributes
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 Serializer
writer
- The output writer streamSerializer.setWriter(java.io.Writer)
public void setTransformer(javax.xml.transform.Transformer transformer)
SerializationHandler
setTransformer
in interface SerializationHandler
transformer
- the transformer associated with the serializer.SerializationHandler.setTransformer(javax.xml.transform.Transformer)
public javax.xml.transform.Transformer getTransformer()
SerializationHandler
getTransformer
in interface SerializationHandler
SerializationHandler.getTransformer()
public void flushPending() throws org.xml.sax.SAXException
SerializationHandler
If 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 SerializationHandler
org.xml.sax.SAXException
SerializationHandler.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
ExtendedContentHandler
addAttribute
in interface ExtendedContentHandler
uri
- 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 element
org.xml.sax.SAXException
ExtendedContentHandler.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
ExtendedContentHandler
addAttributes
in interface ExtendedContentHandler
atts
- the attributes to add.
org.xml.sax.SAXException
ExtendedContentHandler.addAttributes(org.xml.sax.Attributes)
public void addAttribute(java.lang.String name, java.lang.String value)
ExtendedContentHandler
addAttribute
in interface ExtendedContentHandler
ExtendedContentHandler.addAttribute(java.lang.String, java.lang.String)
public void characters(java.lang.String chars) throws org.xml.sax.SAXException
ExtendedContentHandler
characters
in interface ExtendedContentHandler
chars
- the character data
org.xml.sax.SAXException
ExtendedContentHandler.characters(java.lang.String)
public void endElement(java.lang.String elemName) throws org.xml.sax.SAXException
ExtendedContentHandler
endElement(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 ExtendedContentHandler
elemName
- the fully qualified element name.
org.xml.sax.SAXException
ExtendedContentHandler.endElement(java.lang.String)
public void startDocument() throws org.xml.sax.SAXException
startDocument
in interface org.xml.sax.ContentHandler
org.xml.sax.SAXException
ContentHandler.startDocument()
public void startElement(java.lang.String uri, java.lang.String localName, java.lang.String qName) throws org.xml.sax.SAXException
ExtendedContentHandler
startElement(uri,localName,qname,atts)but without the attributes.
startElement
in interface ExtendedContentHandler
uri
- the namespace URI of the elementlocalName
- the local name (without prefix) of the elementqName
- the qualified name of the element
org.xml.sax.SAXException
ExtendedContentHandler.startElement(java.lang.String, java.lang.String, java.lang.String)
public void startElement(java.lang.String qName) throws org.xml.sax.SAXException
ExtendedContentHandler
startElement
in interface ExtendedContentHandler
qName
- the fully qualified name of the element
org.xml.sax.SAXException
ExtendedContentHandler.startElement(java.lang.String)
public void namespaceAfterStartElement(java.lang.String uri, java.lang.String prefix) throws org.xml.sax.SAXException
ExtendedContentHandler
startPrefixMapping(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 ExtendedContentHandler
uri
- the namespace URI being declaredprefix
- the prefix that maps to the given namespace
org.xml.sax.SAXException
ExtendedContentHandler.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
ExtendedContentHandler
startPrefixMapping
in interface ExtendedContentHandler
prefix
- 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.SAXException
ExtendedContentHandler.startPrefixMapping(java.lang.String, java.lang.String, boolean)
public void entityReference(java.lang.String entityName) throws org.xml.sax.SAXException
ExtendedContentHandler
entityReference
in interface ExtendedContentHandler
entityName
- the name of the entity
org.xml.sax.SAXException
ExtendedContentHandler.entityReference(java.lang.String)
public NamespaceMappings getNamespaceMappings()
ExtendedContentHandler
getNamespaceMappings
in interface ExtendedContentHandler
ExtendedContentHandler.getNamespaceMappings()
public java.lang.String getPrefix(java.lang.String uri)
ExtendedContentHandler
getPrefix
in interface ExtendedContentHandler
uri
- the namespace URI
ExtendedContentHandler.getPrefix(java.lang.String)
public java.lang.String getNamespaceURI(java.lang.String name, boolean isElement)
ExtendedContentHandler
getNamespaceURI
in interface ExtendedContentHandler
name
- the qualified name of an element, or attributeisElement
- true if it is an element name, false if it is an
atttribute name
ExtendedContentHandler.getNamespaceURI(java.lang.String, boolean)
public java.lang.String getNamespaceURIFromPrefix(java.lang.String prefix)
ExtendedContentHandler
getNamespaceURIFromPrefix
in interface ExtendedContentHandler
prefix
- 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.ContentHandler
ContentHandler.setDocumentLocator(org.xml.sax.Locator)
public void endDocument() throws org.xml.sax.SAXException
endDocument
in interface org.xml.sax.ContentHandler
org.xml.sax.SAXException
ContentHandler.endDocument()
public void startPrefixMapping(java.lang.String arg0, java.lang.String arg1) throws org.xml.sax.SAXException
startPrefixMapping
in interface org.xml.sax.ContentHandler
org.xml.sax.SAXException
ContentHandler.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.ContentHandler
org.xml.sax.SAXException
ContentHandler.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.ContentHandler
org.xml.sax.SAXException
ContentHandler.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.ContentHandler
org.xml.sax.SAXException
ContentHandler.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.ContentHandler
org.xml.sax.SAXException
ContentHandler.characters(char[], int, int)
public void ignorableWhitespace(char[] arg0, int arg1, int arg2) throws org.xml.sax.SAXException
ignorableWhitespace
in interface org.xml.sax.ContentHandler
org.xml.sax.SAXException
ContentHandler.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.ContentHandler
org.xml.sax.SAXException
ContentHandler.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.ContentHandler
org.xml.sax.SAXException
ContentHandler.skippedEntity(java.lang.String)
public void comment(java.lang.String comment) throws org.xml.sax.SAXException
ExtendedLexicalHandler
comment
in interface ExtendedLexicalHandler
comment
- the comment, but unlike the SAX comment() method this
method takes a String rather than a character array.
org.xml.sax.SAXException
ExtendedLexicalHandler.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.LexicalHandler
org.xml.sax.SAXException
LexicalHandler.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.LexicalHandler
org.xml.sax.SAXException
LexicalHandler.endDTD()
public void startEntity(java.lang.String arg0) throws org.xml.sax.SAXException
startEntity
in interface org.xml.sax.ext.LexicalHandler
org.xml.sax.SAXException
LexicalHandler.startEntity(java.lang.String)
public void endEntity(java.lang.String arg0) throws org.xml.sax.SAXException
endEntity
in interface org.xml.sax.ext.LexicalHandler
org.xml.sax.SAXException
LexicalHandler.endEntity(java.lang.String)
public void startCDATA() throws org.xml.sax.SAXException
startCDATA
in interface org.xml.sax.ext.LexicalHandler
org.xml.sax.SAXException
LexicalHandler.startCDATA()
public void endCDATA() throws org.xml.sax.SAXException
endCDATA
in interface org.xml.sax.ext.LexicalHandler
org.xml.sax.SAXException
LexicalHandler.endCDATA()
public void comment(char[] arg0, int arg1, int arg2) throws org.xml.sax.SAXException
comment
in interface org.xml.sax.ext.LexicalHandler
org.xml.sax.SAXException
LexicalHandler.comment(char[], int, int)
public java.lang.String getDoctypePublic()
XSLOutputAttributes
getDoctypePublic
in interface XSLOutputAttributes
XSLOutputAttributes.getDoctypePublic()
public java.lang.String getDoctypeSystem()
XSLOutputAttributes
getDoctypeSystem
in interface XSLOutputAttributes
XSLOutputAttributes.getDoctypeSystem()
public java.lang.String getEncoding()
getEncoding
in interface XSLOutputAttributes
XSLOutputAttributes.getEncoding()
public boolean getIndent()
getIndent
in interface XSLOutputAttributes
XSLOutputAttributes.getIndent()
public int getIndentAmount()
getIndentAmount
in interface XSLOutputAttributes
XSLOutputAttributes.getIndentAmount()
public java.lang.String getMediaType()
getMediaType
in interface XSLOutputAttributes
XSLOutputAttributes.getMediaType()
public boolean getOmitXMLDeclaration()
getOmitXMLDeclaration
in interface XSLOutputAttributes
XSLOutputAttributes.getOmitXMLDeclaration()
public java.lang.String getStandalone()
getStandalone
in interface XSLOutputAttributes
standalone
delaration is to
be included in the output document.XSLOutputAttributes.getStandalone()
public java.lang.String getVersion()
getVersion
in interface XSLOutputAttributes
XSLOutputAttributes.getVersion()
public void setCdataSectionElements(java.util.Hashtable h) throws java.lang.Exception
java.lang.Exception
XSLOutputAttributes.setCdataSectionElements(java.util.Vector)
public void setDoctype(java.lang.String system, java.lang.String pub)
XSLOutputAttributes
setDoctype
in interface XSLOutputAttributes
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)
XSLOutputAttributes
setDoctypePublic
in interface XSLOutputAttributes
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)
XSLOutputAttributes
setDoctypeSystem
in interface XSLOutputAttributes
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)
XSLOutputAttributes
setEncoding
in interface XSLOutputAttributes
encoding
- the character encodingXSLOutputAttributes.setEncoding(java.lang.String)
public void setMediaType(java.lang.String mediatype)
XSLOutputAttributes
setMediaType
in interface XSLOutputAttributes
mediatype
- the media-type or MIME type associated with the output
document.XSLOutputAttributes.setMediaType(java.lang.String)
public void setOmitXMLDeclaration(boolean b)
XSLOutputAttributes
setOmitXMLDeclaration
in interface XSLOutputAttributes
b
- true if the XML declaration is to be omitted from the output
document.XSLOutputAttributes.setOmitXMLDeclaration(boolean)
public void setStandalone(java.lang.String standalone)
XSLOutputAttributes
setStandalone
in interface XSLOutputAttributes
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.DeclHandler
org.xml.sax.SAXException
DeclHandler.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.DeclHandler
org.xml.sax.SAXException
DeclHandler.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.DeclHandler
org.xml.sax.SAXException
DeclHandler.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.DeclHandler
org.xml.sax.SAXException
DeclHandler.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.ErrorHandler
org.xml.sax.SAXException
ErrorHandler.warning(org.xml.sax.SAXParseException)
public void error(org.xml.sax.SAXParseException arg0) throws org.xml.sax.SAXException
error
in interface org.xml.sax.ErrorHandler
org.xml.sax.SAXException
ErrorHandler.error(org.xml.sax.SAXParseException)
public void fatalError(org.xml.sax.SAXParseException arg0) throws org.xml.sax.SAXException
fatalError
in interface org.xml.sax.ErrorHandler
org.xml.sax.SAXException
ErrorHandler.fatalError(org.xml.sax.SAXParseException)
public DOMSerializer asDOMSerializer() throws java.io.IOException
Serializer
DOMSerializer
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 Serializer
DOMSerializer
interface into this serializer,
or null if the serializer is not DOM capable
java.io.IOException
- An I/O exception occuredSerializer.asDOMSerializer()
public void setNamespaceMappings(NamespaceMappings mappings)
SerializationHandler
setNamespaceMappings
in interface SerializationHandler
mappings
- NamespaceMappingsSerializationHandler.setNamespaceMappings(NamespaceMappings)
public void setSourceLocator(javax.xml.transform.SourceLocator locator)
ExtendedContentHandler
setSourceLocator
in interface ExtendedContentHandler
locator
- 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
ExtendedContentHandler
addUniqueAttribute
in interface ExtendedContentHandler
name
- the fully qualified attribute name.value
- the attribute valueflags
- a bitwise flag
org.xml.sax.SAXException
ExtendedContentHandler.addUniqueAttribute(java.lang.String, java.lang.String, int)
public void characters(org.w3c.dom.Node node) throws org.xml.sax.SAXException
ExtendedContentHandler
characters
in interface ExtendedContentHandler
node
- a DOM Node containing text.
org.xml.sax.SAXException
ExtendedContentHandler.characters(org.w3c.dom.Node)
public void addXSLAttribute(java.lang.String qName, java.lang.String value, java.lang.String uri)
ExtendedContentHandler
addXSLAttribute
in interface ExtendedContentHandler
qName
- 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
ExtendedContentHandler
addAttribute
in interface ExtendedContentHandler
uri
- 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 attribute
org.xml.sax.SAXException
ExtendedContentHandler.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.DTDHandler
org.xml.sax.SAXException
DTDHandler.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.DTDHandler
org.xml.sax.SAXException
DTDHandler.unparsedEntityDecl(java.lang.String, java.lang.String, java.lang.String, java.lang.String)
public void setDTDEntityExpansion(boolean expand)
SerializationHandler
setDTDEntityExpansion
in interface SerializationHandler
expand
- 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)
XSLOutputAttributes
getOutputProperty
in interface XSLOutputAttributes
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)
XSLOutputAttributes
getOutputPropertyDefault
in interface XSLOutputAttributes
name
- The name of the property.
public void setOutputProperty(java.lang.String name, java.lang.String val)
XSLOutputAttributes
setOutputProperty
in interface XSLOutputAttributes
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)
XSLOutputAttributes
setOutputPropertyDefault
in interface XSLOutputAttributes
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
Serializer
DOM3Serializer
interface, it should return null.
In principle only one of asDOM3Serializer() or asContentHander() should be called.
asDOM3Serializer
in interface Serializer
java.io.IOException
- An I/O exception occuredSerializer.asDOM3Serializer()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |