|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.cocoon.xml.AbstractXMLProducer
org.apache.cocoon.xml.AbstractXMLPipe
org.apache.cocoon.components.language.markup.CocoonMarkupLanguage.PreProcessFilter
public class CocoonMarkupLanguage.PreProcessFilter
Preprocess filter for Cocoon Markup languages. It looks for PI event other that <?xml-logisheet href="..."> for quoting them; It adds creation-date, file-name and file-path attributes to the root Element; And it quotes the PCDATA based by calling the quote method of the programming language.
ContentHandler| Field Summary | |
|---|---|
protected String |
filename
|
protected AbstractXMLPipe |
filter
|
protected boolean |
isRootElem
|
protected ProgrammingLanguage |
language
|
protected String |
localPrefix
|
protected Logger |
log
|
| Fields inherited from class org.apache.cocoon.xml.AbstractXMLProducer |
|---|
contentHandler, EMPTY_CONTENT_HANDLER, lexicalHandler, xmlConsumer |
| Constructor Summary | |
|---|---|
CocoonMarkupLanguage.PreProcessFilter(AbstractXMLPipe filter,
String filename,
ProgrammingLanguage language)
|
|
| Method Summary | |
|---|---|
void |
enableLogging(Logger logger)
|
void |
processingInstruction(String target,
String data)
Receive notification of a processing instruction. |
void |
setConsumer(XMLConsumer consumer)
Set the XMLConsumer that will receive XML data. |
void |
setContentHandler(ContentHandler handler)
Set the ContentHandler that will receive XML data. |
void |
setLexicalHandler(LexicalHandler handler)
Set the LexicalHandler that will receive XML data. |
void |
startDocument()
Receive notification of the beginning of a document. |
void |
startElement(String namespaceURI,
String localName,
String qName,
Attributes atts)
Receive notification of the beginning of an element. |
void |
startPrefixMapping(String prefix,
String uri)
Begin the scope of a prefix-URI Namespace mapping. |
| Methods inherited from class org.apache.cocoon.xml.AbstractXMLPipe |
|---|
characters, comment, endCDATA, endDocument, endDTD, endElement, endEntity, endPrefixMapping, ignorableWhitespace, setDocumentLocator, skippedEntity, startCDATA, startDTD, startEntity |
| Methods inherited from class org.apache.cocoon.xml.AbstractXMLProducer |
|---|
recycle |
| Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled |
|---|
getLogger, setupLogger, setupLogger, setupLogger |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Logger log
protected AbstractXMLPipe filter
protected String filename
protected boolean isRootElem
protected ProgrammingLanguage language
protected String localPrefix
| Constructor Detail |
|---|
public CocoonMarkupLanguage.PreProcessFilter(AbstractXMLPipe filter,
String filename,
ProgrammingLanguage language)
filename - the filenamelanguage - the programming language| Method Detail |
|---|
public void setConsumer(XMLConsumer consumer)
AbstractXMLProducerXMLConsumer that will receive XML data.
setContentHandler(consumer)
and setLexicalHandler(consumer).
setConsumer in interface XMLProducersetConsumer in class AbstractXMLProducerpublic void setContentHandler(ContentHandler handler)
AbstractXMLProducerContentHandler that will receive XML data.
ContentHandler instance
accessing the protected super.contentHandler field.
setContentHandler in class AbstractXMLProducerpublic void setLexicalHandler(LexicalHandler handler)
AbstractXMLProducerLexicalHandler that will receive XML data.
LexicalHandler instance
accessing the protected super.lexicalHandler field.
setLexicalHandler in class AbstractXMLProducerpublic void enableLogging(Logger logger)
enableLogging in interface LogEnabledenableLogging in class AbstractLogEnabled
public void startDocument()
throws SAXException
AbstractXMLPipe
startDocument in interface ContentHandlerstartDocument in class AbstractXMLPipeSAXException
public void processingInstruction(String target,
String data)
throws SAXException
AbstractXMLPipe
processingInstruction in interface ContentHandlerprocessingInstruction in class AbstractXMLPipetarget - The processing instruction target.data - The processing instruction data, or null if none was
supplied.
SAXException
public void startPrefixMapping(String prefix,
String uri)
throws SAXException
AbstractXMLPipe
startPrefixMapping in interface ContentHandlerstartPrefixMapping in class AbstractXMLPipeprefix - The Namespace prefix being declared.uri - The Namespace URI the prefix is mapped to.
SAXException
public void startElement(String namespaceURI,
String localName,
String qName,
Attributes atts)
throws SAXException
AbstractXMLPipe
startElement in interface ContentHandlerstartElement in class AbstractXMLPipenamespaceURI - The Namespace URI, or the empty string if the element has no
Namespace URI or if Namespace
processing is not being performed.localName - The local name (without prefix), or the empty string if
Namespace processing is not being performed.qName - The raw XML 1.0 name (with prefix), or the empty string if
raw names are not available.atts - The attributes attached to the element. If there are no
attributes, it shall be an empty Attributes object.
SAXException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||