org.apache.xml.serializer
public interface ExtendedContentHandler extends ContentHandler
startElement(namespaceURI,localName,qName,atts)could be replaced with the calls
startElement(namespaceURI,localName,qName) addAttributes(atts)If there are no attributes the second call can be dropped. If attributes are to be added one at a time with calls to
addAttribute(namespaceURI, localName, qName, type, value)
UNKNOWN: internal
Field Summary | |
---|---|
static int | HTML_ATTREMPTY |
static int | HTML_ATTRURL |
static int | NO_BAD_CHARS |
Method Summary | |
---|---|
void | addAttribute(String uri, String localName, String rawName, String type, String value, boolean XSLAttribute)
Add at attribute to the current element |
void | addAttribute(String qName, String value)
Add an attribute to the current element. |
void | addAttribute(String uri, String localName, String rawName, String type, String value)
Add at attribute to the current element, not from an xsl:attribute
element. |
void | addAttributes(Attributes atts)
Add attributes to the current element |
void | addUniqueAttribute(String qName, String value, int flags)
Add a unique attribute to the current element.
|
void | addXSLAttribute(String qName, String value, String uri)
Add an attribute from an xsl:attribute element. |
void | characters(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 | characters(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 | endElement(String elemName)
This method is used to notify that an element has ended. |
void | entityReference(String entityName)
Notify of an entity reference. |
NamespaceMappings | getNamespaceMappings()
This method returns an object that has the current namespace mappings in
effect.
|
String | getNamespaceURI(String name, boolean isElement)
This method gets the prefix associated with a current element or
attribute name. |
String | getNamespaceURIFromPrefix(String prefix)
This method returns the namespace URI currently associated with the
prefix. |
String | getPrefix(String uri)
This method returns the prefix that currently maps to the given namespace
URI. |
void | namespaceAfterStartElement(String uri, String prefix)
This method is used to notify that a prefix mapping is to start, but
after an element is started. |
void | setSourceLocator(SourceLocator locator)
This method is used to set the source locator, which might be used to
generated an error message. |
void | startElement(String uri, String localName, String qName)
This method is used to notify that an element is starting.
|
void | startElement(String qName)
This method is used to notify of the start of an element |
boolean | startPrefixMapping(String prefix, 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. |
Parameters: uri the namespace URI of the attribute name localName the local name of the attribute (without prefix) rawName the qualified name of the attribute type the attribute type typically character data (CDATA) value the value of the attribute XSLAttribute true if the added attribute is coming from an xsl:attribute element
Throws: SAXException
Parameters: qName value
Parameters: uri the namespace URI of the attribute name localName the local name of the attribute (without prefix) rawName the qualified name of the attribute type the attribute type typically character data (CDATA) value the value of the attribute
Throws: SAXException
Parameters: atts the attributes to add.
Throws: SAXException
Parameters: qName the fully qualified attribute name. value the attribute value flags a bitwise flag
Parameters: qName the qualified attribute name (prefix:localName) value the attributes value uri the uri that the prefix of the qName is mapped to.
Parameters: chars the character data
Throws: SAXException
Parameters: node a DOM Node containing text.
Throws: 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.
Parameters: elemName the fully qualified element name.
Throws: SAXException
Parameters: entityName the name of the entity
Throws: SAXException
Returns: NamespaceMappings an object that has the current namespace mappings in effect.
Parameters: name the qualified name of an element, or attribute isElement true if it is an element name, false if it is an atttribute name
Returns: String the namespace URI associated with the element or attribute.
Parameters: prefix a prefix of an element or attribute.
Returns: String the namespace URI currently associated with the prefix.
Parameters: uri the namespace URI
Returns: String the prefix that currently maps to the given URI.
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")
Parameters: uri the namespace URI being declared prefix the prefix that maps to the given namespace
Throws: SAXException
Parameters: locator the source locator
startElement(uri,localName,qname,atts)but without the attributes.
Parameters: uri the namespace URI of the element localName the local name (without prefix) of the element qName the qualified name of the element
Throws: SAXException
Parameters: qName the fully qualified name of the element
Throws: SAXException
Parameters: prefix the prefix that maps to the given URI uri the namespace URI of the given prefix shouldFlush 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.
Returns: boolean false if the prefix mapping was already in effect (in other words we are just re-declaring), true if this is a new, never before seen mapping for the element.
Throws: SAXException