org.apache.cocoon.components.language.markup
Class AbstractMarkupLanguage.TransformerChainBuilderFilter

java.lang.Object
  extended by org.apache.avalon.framework.logger.AbstractLogEnabled
      extended by org.apache.cocoon.xml.AbstractXMLProducer
          extended by org.apache.cocoon.xml.AbstractXMLPipe
              extended by org.apache.cocoon.components.language.markup.AbstractMarkupLanguage.TransformerChainBuilderFilter
All Implemented Interfaces:
Poolable, Recyclable, LogEnabled, XMLPipe, XMLProducer, XMLConsumer, ContentHandler, LexicalHandler
Direct Known Subclasses:
CocoonMarkupLanguage.CocoonTransformerChainBuilderFilter
Enclosing class:
AbstractMarkupLanguage

public class AbstractMarkupLanguage.TransformerChainBuilderFilter
extends AbstractXMLPipe

An XMLFilter that build the chain of transformers on the fly. Each time a stylesheet is found, a call to the code generator is done to add the new transformer at the end of the current transformer chain.


Field Summary
protected  AbstractMarkupLanguage.LanguageDescriptor language
          the language description
protected  LogicsheetCodeGenerator logicsheetMarkupGenerator
          The markup generator
 
Fields inherited from class org.apache.cocoon.xml.AbstractXMLProducer
contentHandler, EMPTY_CONTENT_HANDLER, lexicalHandler, xmlConsumer
 
Constructor Summary
protected AbstractMarkupLanguage.TransformerChainBuilderFilter(LogicsheetCodeGenerator logicsheetMarkupGenerator)
          the constructor depends on the code generator
 
Method Summary
protected  void setLanguageDescriptor(AbstractMarkupLanguage.LanguageDescriptor language)
          This method should be called prior to receiving any SAX event.
 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, processingInstruction, setDocumentLocator, skippedEntity, startCDATA, startDTD, startEntity
 
Methods inherited from class org.apache.cocoon.xml.AbstractXMLProducer
recycle, setConsumer, setContentHandler, setLexicalHandler
 
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.cocoon.xml.XMLProducer
setConsumer
 

Field Detail

logicsheetMarkupGenerator

protected LogicsheetCodeGenerator logicsheetMarkupGenerator
The markup generator


language

protected AbstractMarkupLanguage.LanguageDescriptor language
the language description

Constructor Detail

AbstractMarkupLanguage.TransformerChainBuilderFilter

protected AbstractMarkupLanguage.TransformerChainBuilderFilter(LogicsheetCodeGenerator logicsheetMarkupGenerator)
the constructor depends on the code generator

Parameters:
logicsheetMarkupGenerator - The code generator
Method Detail

setLanguageDescriptor

protected void setLanguageDescriptor(AbstractMarkupLanguage.LanguageDescriptor language)
This method should be called prior to receiving any SAX event. Indeed the language information is needed to get the core stylesheet.

Parameters:
language - the language in used

startDocument

public void startDocument()
                   throws SAXException
Description copied from class: AbstractXMLPipe
Receive notification of the beginning of a document.

Specified by:
startDocument in interface ContentHandler
Overrides:
startDocument in class AbstractXMLPipe
Throws:
SAXException
See Also:
ContentHandler

startPrefixMapping

public void startPrefixMapping(String prefix,
                               String uri)
                        throws SAXException
Description copied from class: AbstractXMLPipe
Begin the scope of a prefix-URI Namespace mapping.

Specified by:
startPrefixMapping in interface ContentHandler
Overrides:
startPrefixMapping in class AbstractXMLPipe
Parameters:
prefix - The Namespace prefix being declared.
uri - The Namespace URI the prefix is mapped to.
Throws:
SAXException
See Also:
ContentHandler

startElement

public void startElement(String namespaceURI,
                         String localName,
                         String qName,
                         Attributes atts)
                  throws SAXException
Description copied from class: AbstractXMLPipe
Receive notification of the beginning of an element.

Specified by:
startElement in interface ContentHandler
Overrides:
startElement in class AbstractXMLPipe
Parameters:
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.
Throws:
SAXException
See Also:
ContentHandler


Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.