org.apache.cocoon.components.language.markup.xsp
Class XSPMarkupLanguage.PreProcessFilter

java.lang.Object
  |
  +--org.xml.sax.helpers.XMLFilterImpl
        |
        +--org.apache.cocoon.components.language.markup.xsp.XSPMarkupLanguage.PreProcessFilter
All Implemented Interfaces:
org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler, org.apache.avalon.framework.logger.Loggable, org.xml.sax.XMLFilter, org.xml.sax.XMLReader
Enclosing class:
XSPMarkupLanguage

protected class XSPMarkupLanguage.PreProcessFilter
extends org.xml.sax.helpers.XMLFilterImpl
implements org.apache.avalon.framework.logger.Loggable

Preprocess filter for XSP Markup language. 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.


Field Summary
protected  org.apache.log.Logger log
           
 
Constructor Summary
XSPMarkupLanguage.PreProcessFilter(java.lang.String filename, ProgrammingLanguage language)
          default constructor
 
Method Summary
 void characters(char[] ch, int start, int length)
           
 void endElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName)
           
 void processingInstruction(java.lang.String target, java.lang.String data)
           
 void setLogger(org.apache.log.Logger logger)
           
 void startDocument()
           
 void startElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes atts)
           
 
Methods inherited from class org.xml.sax.helpers.XMLFilterImpl
endDocument, endPrefixMapping, error, fatalError, getContentHandler, getDTDHandler, getEntityResolver, getErrorHandler, getFeature, getParent, getProperty, ignorableWhitespace, notationDecl, parse, parse, resolveEntity, setContentHandler, setDocumentLocator, setDTDHandler, setEntityResolver, setErrorHandler, setFeature, setParent, setProperty, skippedEntity, startPrefixMapping, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected org.apache.log.Logger log
Constructor Detail

XSPMarkupLanguage.PreProcessFilter

public XSPMarkupLanguage.PreProcessFilter(java.lang.String filename,
                                          ProgrammingLanguage language)
default constructor
Parameters:
filename - the filename
the - programming language
Method Detail

setLogger

public void setLogger(org.apache.log.Logger logger)
Specified by:
setLogger in interface org.apache.avalon.framework.logger.Loggable

startDocument

public void startDocument()
                   throws org.xml.sax.SAXException
Overrides:
startDocument in class org.xml.sax.helpers.XMLFilterImpl
See Also:
ContentHandler

processingInstruction

public void processingInstruction(java.lang.String target,
                                  java.lang.String data)
                           throws org.xml.sax.SAXException
Overrides:
processingInstruction in class org.xml.sax.helpers.XMLFilterImpl
See Also:
ContentHandler

startElement

public void startElement(java.lang.String namespaceURI,
                         java.lang.String localName,
                         java.lang.String qName,
                         org.xml.sax.Attributes atts)
                  throws org.xml.sax.SAXException
Overrides:
startElement in class org.xml.sax.helpers.XMLFilterImpl
See Also:
ContentHandler

endElement

public void endElement(java.lang.String namespaceURI,
                       java.lang.String localName,
                       java.lang.String qName)
                throws org.xml.sax.SAXException
Overrides:
endElement in class org.xml.sax.helpers.XMLFilterImpl
See Also:
ContentHandler

characters

public void characters(char[] ch,
                       int start,
                       int length)
                throws org.xml.sax.SAXException
Overrides:
characters in class org.xml.sax.helpers.XMLFilterImpl
See Also:
ContentHandler


Copyright © 1999-2001 Apache Software Foundation. All Rights Reserved.