|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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 languageMethod Detail |
---|
public void setConsumer(XMLConsumer consumer)
AbstractXMLProducer
XMLConsumer
that will receive XML data.
setContentHandler(consumer)
and setLexicalHandler(consumer)
.
setConsumer
in interface XMLProducer
setConsumer
in class AbstractXMLProducer
public void setContentHandler(ContentHandler handler)
AbstractXMLProducer
ContentHandler
that will receive XML data.
ContentHandler
instance
accessing the protected super.contentHandler
field.
setContentHandler
in class AbstractXMLProducer
public void setLexicalHandler(LexicalHandler handler)
AbstractXMLProducer
LexicalHandler
that will receive XML data.
LexicalHandler
instance
accessing the protected super.lexicalHandler
field.
setLexicalHandler
in class AbstractXMLProducer
public void enableLogging(Logger logger)
enableLogging
in interface LogEnabled
enableLogging
in class AbstractLogEnabled
public void startDocument() throws SAXException
AbstractXMLPipe
startDocument
in interface ContentHandler
startDocument
in class AbstractXMLPipe
SAXException
public void processingInstruction(String target, String data) throws SAXException
AbstractXMLPipe
processingInstruction
in interface ContentHandler
processingInstruction
in class AbstractXMLPipe
target
- 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 ContentHandler
startPrefixMapping
in class AbstractXMLPipe
prefix
- 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 ContentHandler
startElement
in class AbstractXMLPipe
namespaceURI
- 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 |