|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.cocoon.xml.IncludeXMLConsumer
public class IncludeXMLConsumer
A special purpose XMLConsumer
which can:
ignoreEmptyCharacters
is set.
ignoreRootElement
is set.
It is more complicated version of EmbeddedXMLPipe
which, except
being used to include other files into the SAX events stream, can perform
optional operations described above.
EmbeddedXMLPipe
Constructor Summary | |
---|---|
IncludeXMLConsumer(ContentHandler contentHandler)
Constructor |
|
IncludeXMLConsumer(ContentHandler contentHandler,
LexicalHandler lexicalHandler)
Constructor |
|
IncludeXMLConsumer(XMLConsumer consumer)
Constructor |
Method Summary | |
---|---|
void |
characters(char[] ch,
int start,
int end)
|
void |
comment(char[] ary,
int start,
int length)
|
void |
endCDATA()
|
void |
endDocument()
|
void |
endDTD()
|
void |
endElement(String uri,
String local,
String qName)
|
void |
endEntity(String name)
|
void |
endPrefixMapping(String prefix)
|
void |
ignorableWhitespace(char[] ch,
int start,
int end)
|
static void |
includeNode(Node node,
ContentHandler contentHandler,
LexicalHandler lexicalHandler)
Utility method to stream a DOM node into the provided content handler, lexical handler. |
void |
processingInstruction(String name,
String value)
|
void |
setDocumentLocator(Locator loc)
|
void |
setIgnoreEmptyCharacters(boolean value)
Control SAX event handling. |
void |
setIgnoreRootElement(boolean value)
Control SAX event handling. |
void |
skippedEntity(String ent)
|
void |
startCDATA()
|
void |
startDocument()
|
void |
startDTD(String name,
String public_id,
String system_id)
|
void |
startElement(String uri,
String local,
String qName,
Attributes attr)
|
void |
startEntity(String name)
|
void |
startPrefixMapping(String prefix,
String uri)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IncludeXMLConsumer(XMLConsumer consumer)
public IncludeXMLConsumer(ContentHandler contentHandler)
public IncludeXMLConsumer(ContentHandler contentHandler, LexicalHandler lexicalHandler)
Method Detail |
---|
public static void includeNode(Node node, ContentHandler contentHandler, LexicalHandler lexicalHandler) throws SAXException
node
- The DOM Node to be includedcontentHandler
- The SAX ContentHandler receiving the informationlexicalHandler
- The SAX LexicalHandler receiving the information (optional)
SAXException
public void setIgnoreEmptyCharacters(boolean value)
true
all empty characters events are ignored.
The default is false
.
public void setIgnoreRootElement(boolean value)
true
the root element is ignored.
The default is false
.
public void setDocumentLocator(Locator loc)
setDocumentLocator
in interface ContentHandler
public void startDocument() throws SAXException
startDocument
in interface ContentHandler
SAXException
public void endDocument() throws SAXException
endDocument
in interface ContentHandler
SAXException
public void startPrefixMapping(String prefix, String uri) throws SAXException
startPrefixMapping
in interface ContentHandler
SAXException
public void endPrefixMapping(String prefix) throws SAXException
endPrefixMapping
in interface ContentHandler
SAXException
public void startElement(String uri, String local, String qName, Attributes attr) throws SAXException
startElement
in interface ContentHandler
SAXException
public void endElement(String uri, String local, String qName) throws SAXException
endElement
in interface ContentHandler
SAXException
public void characters(char[] ch, int start, int end) throws SAXException
characters
in interface ContentHandler
SAXException
public void ignorableWhitespace(char[] ch, int start, int end) throws SAXException
ignorableWhitespace
in interface ContentHandler
SAXException
public void processingInstruction(String name, String value) throws SAXException
processingInstruction
in interface ContentHandler
SAXException
public void skippedEntity(String ent) throws SAXException
skippedEntity
in interface ContentHandler
SAXException
public void startDTD(String name, String public_id, String system_id) throws SAXException
startDTD
in interface LexicalHandler
SAXException
public void endDTD() throws SAXException
endDTD
in interface LexicalHandler
SAXException
public void startEntity(String name) throws SAXException
startEntity
in interface LexicalHandler
SAXException
public void endEntity(String name) throws SAXException
endEntity
in interface LexicalHandler
SAXException
public void startCDATA() throws SAXException
startCDATA
in interface LexicalHandler
SAXException
public void endCDATA() throws SAXException
endCDATA
in interface LexicalHandler
SAXException
public void comment(char[] ary, int start, int length) throws SAXException
comment
in interface LexicalHandler
SAXException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |