|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ajax4jsf.xml.serializer.SerializerBase
public abstract class SerializerBase
This class acts as a base class for the XML "serializers" and the stream serializers. It contains a number of common fields and methods.
Field Summary | |
---|---|
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 |
EMPTYSTRING
|
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 int |
HTML_ATTREMPTY
|
static int |
HTML_ATTRURL
|
protected char[] |
m_attrBuff
A utility buffer for converting Strings passed to attribute methods to character arrays. |
protected AttributesImplSerializer |
m_attributes
All the attributes of the current element, collected from startPrefixMapping() calls, or addAddtribute() calls, or from the SAX attributes in a startElement() call. |
protected java.util.Vector |
m_cdataSectionElements
Pairs of local names and corresponding URIs of CDATA sections. |
protected boolean |
m_cdataTagOpen
True if a trailing "]]>" still needs to be written to be written out. |
protected char[] |
m_charsBuff
A utility buffer for converting Strings passed to character() methods to character arrays. |
protected boolean |
m_doIndent
Flag to tell if indenting (pretty-printing) is on. |
protected org.ajax4jsf.xml.serializer.ElemContext |
m_elemContext
A reference to "stack frame" corresponding to the current element. |
protected int |
m_indentAmount
Amount to indent. |
protected boolean |
m_inEntityRef
Tells if we're in an EntityRef event. |
protected boolean |
m_inExternalDTD
This flag is set while receiving events from the external DTD |
protected boolean |
m_needToCallStartDocument
true if we still need to call startDocumentInternal() |
protected NamespaceMappings |
m_prefixMap
Namespace support, that keeps track of currently defined prefix/uri mappings. |
protected javax.xml.transform.SourceLocator |
m_sourceLocator
|
protected boolean |
m_standaloneWasSpecified
True if standalone was specified. |
protected SerializerTrace |
m_tracer
Handle for firing generate events. |
protected java.io.Writer |
m_writer
The writer to send output to. |
static int |
NO_BAD_CHARS
|
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. |
Constructor Summary | |
---|---|
SerializerBase()
|
Method Summary | |
---|---|
void |
addAttribute(java.lang.String name,
java.lang.String value)
Adds the given attribute to the set of collected attributes, but only if there is a currently open element. |
void |
addAttribute(java.lang.String uri,
java.lang.String localName,
java.lang.String rawName,
java.lang.String type,
java.lang.String value)
This method adds an attribute the the current element, but should not be used for an xsl:attribute child. |
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 the given attribute to the set of collected attributes , but only if there is a currently open element. |
boolean |
addAttributeAlways(java.lang.String uri,
java.lang.String localName,
java.lang.String rawName,
java.lang.String type,
java.lang.String value,
boolean XSLAttribute)
Adds the given attribute to the set of attributes, even if there is no currently open element. |
void |
addAttributes(org.xml.sax.Attributes atts)
Add the given attributes to the currently collected ones. |
void |
addUniqueAttribute(java.lang.String qName,
java.lang.String value,
int flags)
Add a unique attribute to the current element. |
void |
addXSLAttribute(java.lang.String name,
java.lang.String value,
java.lang.String uri)
Adds the given xsl:attribute to the set of collected attributes, but only if there is a currently open element. |
org.xml.sax.ContentHandler |
asContentHandler()
Return a ContentHandler interface into this serializer. |
DOMSerializer |
asDOMSerializer()
Return a DOMSerializer interface into this serializer. |
void |
characters(org.w3c.dom.Node node)
This method gets the nodes value as a String and uses that String as if it were an input character notification. |
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()
Flush and close the underlying java.io.Writer. |
void |
comment(java.lang.String data)
Receive notification of a comment. |
void |
endElement(java.lang.String elemName)
This method is used to notify that an element has ended. |
void |
endEntity(java.lang.String name)
Report the end of an entity. |
void |
entityReference(java.lang.String name)
Entity reference event. |
void |
error(org.xml.sax.SAXParseException exc)
|
void |
fatalError(org.xml.sax.SAXParseException exc)
|
protected void |
fireCDATAEvent(char[] chars,
int start,
int length)
Report the CDATA trace event |
protected void |
fireCharEvent(char[] chars,
int start,
int length)
Report the characters trace event |
protected void |
fireCommentEvent(char[] chars,
int start,
int length)
Report the comment trace event |
protected void |
fireEndDoc()
To fire off end document trace event |
protected void |
fireEndElem(java.lang.String name)
To fire off the end element trace event |
void |
fireEndEntity(java.lang.String name)
To fire off end entity trace event |
protected void |
fireEntityReference(java.lang.String name)
To fire off the entity reference trace event |
protected void |
fireEscapingEvent(java.lang.String name,
java.lang.String data)
To fire off the PI trace event |
protected void |
fireStartDoc()
To fire off start document trace event |
protected void |
fireStartElem(java.lang.String elemName)
Report the start element trace event. |
protected void |
fireStartEntity(java.lang.String name)
To fire off start entity trace event |
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()
Returns the character encoding to be used in the output document. |
boolean |
getIndent()
|
int |
getIndentAmount()
|
protected static java.lang.String |
getLocalName(java.lang.String qname)
Returns the local name of a qualified name. |
java.lang.String |
getMediaType()
Gets the mediatype the media-type or MIME type associated with the output document. |
NamespaceMappings |
getNamespaceMappings()
Some users of the serializer may need 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()
|
java.lang.String |
getPrefix(java.lang.String namespaceURI)
Returns the prefix currently pointing to the given URI (if any). |
protected static java.lang.String |
getPrefixPart(java.lang.String qname)
Returns the local name of a qualified name. |
java.lang.String |
getStandalone()
Gets the XSL standalone attribute |
javax.xml.transform.Transformer |
getTransformer()
Gets the transformer associated with this serializer |
java.lang.String |
getVersion()
Gets the version of the output format. |
protected void |
initCDATA()
Initialize global variables |
protected boolean |
isCdataSection()
Push a boolean state based on if the name of the current element is found in the list of qnames. |
void |
namespaceAfterStartElement(java.lang.String uri,
java.lang.String prefix)
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 |
notationDecl(java.lang.String arg0,
java.lang.String arg1,
java.lang.String arg2)
|
protected java.lang.String |
patchName(java.lang.String qname)
If at runtime, when the qname of the attribute is known, another prefix is specified for the attribute, then we can patch or hack the name with this method. |
boolean |
reset()
This method resets the serializer. |
void |
setCdataSectionElements(java.util.Vector URI_and_localNames)
Sets the value coming from the xsl:output cdata-section-elements stylesheet property. |
void |
setDoctype(java.lang.String doctypeSystem,
java.lang.String doctypePublic)
Set the value coming from the xsl:output doctype-public and doctype-system stylesheet properties |
void |
setDoctypePublic(java.lang.String doctypePublic)
Set the value coming from the xsl:output doctype-public stylesheet attribute. |
void |
setDoctypeSystem(java.lang.String doctypeSystem)
Set the value coming from the xsl:output doctype-system stylesheet attribute. |
void |
setDocumentLocator(org.xml.sax.Locator locator)
Receive an object for locating the origin of SAX document events. |
void |
setDTDEntityExpansion(boolean expand)
If set to false the serializer does not expand DTD entities, but leaves them as is, the default value is true. |
void |
setEncoding(java.lang.String m_encoding)
Sets the character encoding coming from the xsl:output encoding stylesheet attribute. |
void |
setIndent(boolean doIndent)
Sets the value coming from the xsl:output indent stylesheet attribute. |
void |
setIndentAmount(int m_indentAmount)
Sets the indentation amount. |
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 |
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. |
protected void |
setStandaloneInternal(java.lang.String standalone)
Sets the XSL standalone attribute, but does not remember if this is a default or explicite setting. |
void |
setTransformer(javax.xml.transform.Transformer t)
Sets the transformer associated with this serializer |
void |
setVersion(java.lang.String version)
Sets the value coming from the xsl:output version attribute. |
void |
startDocument()
Receive notification of the beginning of a document. |
protected void |
startDocumentInternal()
This method handles what needs to be done at a startDocument() call, whether from an external caller, or internally called in the serializer. |
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. |
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 exc)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.ajax4jsf.xml.serializer.SerializationHandler |
---|
flushPending, serialize, setContentHandler, setEscaping |
Methods inherited from interface org.xml.sax.ContentHandler |
---|
characters, endDocument, endElement, endPrefixMapping, ignorableWhitespace, processingInstruction, skippedEntity, startElement, startPrefixMapping |
Methods inherited from interface org.xml.sax.ext.LexicalHandler |
---|
comment, endCDATA, endDTD, startCDATA, startDTD, startEntity |
Methods inherited from interface org.xml.sax.ext.DeclHandler |
---|
attributeDecl, elementDecl, externalEntityDecl, internalEntityDecl |
Methods inherited from interface org.ajax4jsf.xml.serializer.Serializer |
---|
getOutputFormat, getOutputStream, getWriter, setOutputFormat, setOutputStream, setWriter |
Field Detail |
---|
protected boolean m_needToCallStartDocument
protected boolean m_cdataTagOpen
protected AttributesImplSerializer m_attributes
protected boolean m_inEntityRef
protected boolean m_inExternalDTD
protected boolean m_standaloneWasSpecified
protected boolean m_doIndent
protected int m_indentAmount
protected java.util.Vector m_cdataSectionElements
protected NamespaceMappings m_prefixMap
protected SerializerTrace m_tracer
protected javax.xml.transform.SourceLocator m_sourceLocator
protected java.io.Writer m_writer
protected org.ajax4jsf.xml.serializer.ElemContext m_elemContext
protected char[] m_charsBuff
protected char[] m_attrBuff
public static final int NO_BAD_CHARS
public static final int HTML_ATTREMPTY
public static final int HTML_ATTRURL
public 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 EMPTYSTRING
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
Constructor Detail |
---|
public SerializerBase()
Method Detail |
---|
protected void fireEndElem(java.lang.String name) throws org.xml.sax.SAXException
name
- Name of element
org.xml.sax.SAXException
protected void fireCharEvent(char[] chars, int start, int length) throws org.xml.sax.SAXException
chars
- content of charactersstart
- starting index of characters to outputlength
- number of characters to output
org.xml.sax.SAXException
public void comment(java.lang.String data) throws org.xml.sax.SAXException
data
- the comment, but unlike the SAX comment() method this
method takes a String rather than a character array.
org.xml.sax.SAXException
ExtendedLexicalHandler#comment(String)
protected java.lang.String patchName(java.lang.String qname)
protected static java.lang.String getLocalName(java.lang.String qname)
qname
- the qualified name
public void setDocumentLocator(org.xml.sax.Locator locator)
locator
- 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.
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
uri
- the URI of the attributelocalName
- the local name of the attributerawName
- the qualified name of the attributetype
- the type of the attribute (probably CDATA)value
- the value of the attributeXSLAttribute
- true if this attribute is coming from an xsl:attriute element
org.xml.sax.SAXException
ExtendedContentHandler#addAttribute(String, String, String, String, String)
public boolean addAttributeAlways(java.lang.String uri, java.lang.String localName, java.lang.String rawName, java.lang.String type, java.lang.String value, boolean XSLAttribute)
uri
- the URI of the attributelocalName
- the local name of the attributerawName
- the qualified name of the attributetype
- the type of the attribute (probably CDATA)value
- the value of the attributeXSLAttribute
- true if this attribute is coming from an xsl:attribute element
public void addAttribute(java.lang.String name, java.lang.String value)
name
- the attribute's qualified namevalue
- the value of the attributepublic void addXSLAttribute(java.lang.String name, java.lang.String value, java.lang.String uri)
name
- the attribute's qualified name (prefix:localName)value
- the value of the attributeuri
- the URI that the prefix of the name points topublic void addAttributes(org.xml.sax.Attributes atts) throws org.xml.sax.SAXException
atts
- List of attributes to add to this list
org.xml.sax.SAXException
public org.xml.sax.ContentHandler asContentHandler() throws java.io.IOException
ContentHandler
interface into this serializer.
If the serializer does not support the ContentHandler
interface, it should return null.
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 occuredpublic void endEntity(java.lang.String name) throws org.xml.sax.SAXException
name
- The name of the entity that is ending.
org.xml.sax.SAXException
- The application may raise an exception.LexicalHandler.startEntity(java.lang.String)
public void close()
close
in interface SerializationHandler
ToStream
protected void initCDATA()
public java.lang.String getEncoding()
public void setEncoding(java.lang.String m_encoding)
m_encoding
- the character encodingpublic void setOmitXMLDeclaration(boolean b)
b
- true if the XML declaration is to be omitted from the output
document.public boolean getOmitXMLDeclaration()
public java.lang.String getDoctypePublic()
public void setDoctypePublic(java.lang.String doctypePublic)
doctypePublic
- the public identifier to be used in the DOCTYPE
declaration in the output document.public java.lang.String getDoctypeSystem()
public void setDoctypeSystem(java.lang.String doctypeSystem)
doctypeSystem
- the system identifier to be used in the DOCTYPE
declaration in the output document.public void setDoctype(java.lang.String doctypeSystem, java.lang.String doctypePublic)
doctypeSystem
- the system identifier to be used in the DOCTYPE
declaration in the output document.doctypePublic
- the public identifier to be used in the DOCTYPE
declaration in the output document.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. This method remembers if the value was explicitly set using
this method, verses if the value is the default value.protected void setStandaloneInternal(java.lang.String standalone)
standalone
- "yes" | "no"public java.lang.String getStandalone()
standalone
delaration is to
be included in the output document.XSLOutputAttributes#getStandalone()
public boolean getIndent()
public java.lang.String getMediaType()
public java.lang.String getVersion()
public void setVersion(java.lang.String version)
version
- the version of the output format.XSLOutputAttributes.setVersion(String)
public void setMediaType(java.lang.String mediaType)
mediaType
- the non-null media-type or MIME type associated with the
output document.OutputKeys.MEDIA_TYPE
,
XSLOutputAttributes.setMediaType(String)
public int getIndentAmount()
public void setIndentAmount(int m_indentAmount)
setIndentAmount
in interface SerializationHandler
m_indentAmount
- The m_indentAmount to setpublic void setIndent(boolean doIndent)
doIndent
- true if the output document should be indented to
visually indicate its structure.XSLOutputAttributes#setIndent(boolean)
public void namespaceAfterStartElement(java.lang.String uri, java.lang.String prefix) throws org.xml.sax.SAXException
uri
- the URI of the namespaceprefix
- the prefix associated with the given URI.
org.xml.sax.SAXException
ExtendedContentHandler#namespaceAfterStartElement(String, String)
public DOMSerializer asDOMSerializer() throws java.io.IOException
DOMSerializer
interface into this serializer. If the
serializer does not support the DOMSerializer
interface, it should
return null.
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()
protected boolean isCdataSection()
Hidden parameters are the vector of qualified elements specified in cdata-section-names attribute, and the m_cdataSectionStates stack onto which whether the current element is in the list is pushed (true or false). Other hidden parameters are the current elements namespaceURI, localName and qName
protected static final java.lang.String getPrefixPart(java.lang.String qname)
qname
- a qualified name
public NamespaceMappings getNamespaceMappings()
ExtendedContentHandler#getNamespaceMappings()
public java.lang.String getPrefix(java.lang.String namespaceURI)
namespaceURI
- the uri of the namespace in question
ExtendedContentHandler#getPrefix(String)
public java.lang.String getNamespaceURI(java.lang.String qname, boolean isElement)
qname
- a qualified nameisElement
- true if the qualified name is the name of
an element.
public java.lang.String getNamespaceURIFromPrefix(java.lang.String prefix)
prefix
- the prefix whose URI is searched for
public void entityReference(java.lang.String name) throws org.xml.sax.SAXException
name
- Name of entity
org.xml.sax.SAXException
public void setTransformer(javax.xml.transform.Transformer t)
setTransformer
in interface SerializationHandler
t
- the transformer associated with this serializer.SerializationHandler.setTransformer(Transformer)
public javax.xml.transform.Transformer getTransformer()
getTransformer
in interface SerializationHandler
SerializationHandler.getTransformer()
public void characters(org.w3c.dom.Node node) throws org.xml.sax.SAXException
node
- the Node to serialize
org.xml.sax.SAXException
public void error(org.xml.sax.SAXParseException exc) throws org.xml.sax.SAXException
error
in interface org.xml.sax.ErrorHandler
org.xml.sax.SAXException
ErrorHandler.error(SAXParseException)
public void fatalError(org.xml.sax.SAXParseException exc) throws org.xml.sax.SAXException
fatalError
in interface org.xml.sax.ErrorHandler
org.xml.sax.SAXException
ErrorHandler.fatalError(SAXParseException)
public void warning(org.xml.sax.SAXParseException exc) throws org.xml.sax.SAXException
warning
in interface org.xml.sax.ErrorHandler
org.xml.sax.SAXException
ErrorHandler.warning(SAXParseException)
protected void fireStartEntity(java.lang.String name) throws org.xml.sax.SAXException
name
- Name of entity
org.xml.sax.SAXException
protected void fireCDATAEvent(char[] chars, int start, int length) throws org.xml.sax.SAXException
chars
- content of CDATAstart
- starting index of characters to outputlength
- number of characters to output
org.xml.sax.SAXException
protected void fireCommentEvent(char[] chars, int start, int length) throws org.xml.sax.SAXException
chars
- content of commentstart
- starting index of comment to outputlength
- number of characters to output
org.xml.sax.SAXException
public void fireEndEntity(java.lang.String name) throws org.xml.sax.SAXException
name
- Name of entity
org.xml.sax.SAXException
protected void fireStartDoc() throws org.xml.sax.SAXException
org.xml.sax.SAXException
protected void fireEndDoc() throws org.xml.sax.SAXException
org.xml.sax.SAXException
protected void fireStartElem(java.lang.String elemName) throws org.xml.sax.SAXException
elemName
- the qualified name of the element
org.xml.sax.SAXException
protected void fireEscapingEvent(java.lang.String name, java.lang.String data) throws org.xml.sax.SAXException
name
- Name of PI
org.xml.sax.SAXException
protected void fireEntityReference(java.lang.String name) throws org.xml.sax.SAXException
name
- Name of entity reference
org.xml.sax.SAXException
public void startDocument() throws org.xml.sax.SAXException
The SAX parser will invoke this method only once, before any other methods in this interface or in DTDHandler (except for setDocumentLocator).
org.xml.sax.SAXException
- Any SAX exception, possibly
wrapping another exception.
org.xml.sax.SAXException
protected void startDocumentInternal() throws org.xml.sax.SAXException
org.xml.sax.SAXException
public void setSourceLocator(javax.xml.transform.SourceLocator locator)
locator
- the source locatorExtendedContentHandler#setSourceLocator(javax.xml.transform.SourceLocator)
public void setNamespaceMappings(NamespaceMappings mappings)
setNamespaceMappings
in interface SerializationHandler
mappings
- NamespaceMappingspublic boolean reset()
Serializer
reset
in interface Serializer
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
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)
setDTDEntityExpansion
in interface SerializationHandler
expand
- true if DTD entities are to be expanded,
false if they are to be left as DTD entity references.public void characters(java.lang.String chars) throws org.xml.sax.SAXException
chars
- the character data
org.xml.sax.SAXException
public void endElement(java.lang.String elemName) throws org.xml.sax.SAXException
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.
elemName
- the fully qualified element name.
org.xml.sax.SAXException
public void startElement(java.lang.String uri, java.lang.String localName, java.lang.String qName) throws org.xml.sax.SAXException
startElement(uri,localName,qname,atts)but without the attributes.
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
public void startElement(java.lang.String qName) throws org.xml.sax.SAXException
qName
- the fully qualified name of the element
org.xml.sax.SAXException
public boolean startPrefixMapping(java.lang.String prefix, java.lang.String uri, boolean shouldFlush) throws org.xml.sax.SAXException
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
public void addUniqueAttribute(java.lang.String qName, java.lang.String value, int flags) throws org.xml.sax.SAXException
qName
- the fully qualified attribute name.value
- the attribute valueflags
- a bitwise flag
org.xml.sax.SAXException
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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |