org.apache.cocoon.xml
Class ParamSaxBuffer
java.lang.Object
org.apache.cocoon.xml.AbstractSAXFragment
org.apache.cocoon.xml.SaxBuffer
org.apache.cocoon.xml.ParamSaxBuffer
- All Implemented Interfaces:
- Serializable, Poolable, Recyclable, XMLFragment, XMLConsumer, XMLizable, ContentHandler, LexicalHandler
public class ParamSaxBuffer
- extends SaxBuffer
Modification of the SAX buffer with parameterization capabilities.
Any {name}
expression inside of the character events can be
replaced by the content of another SaxBuffer if it is present in the map
passed to the toSAX(ContentHandler, Map)
method.
- Version:
- CVS $Id: ParamSaxBuffer.html 1304258 2012-03-23 10:09:27Z ilgrosso $
- Author:
- Vadim Gritsenko
- See Also:
- Serialized Form
Nested classes/interfaces inherited from class org.apache.cocoon.xml.SaxBuffer |
SaxBuffer.Characters, SaxBuffer.Comment, SaxBuffer.EndCDATA, SaxBuffer.EndDocument, SaxBuffer.EndDTD, SaxBuffer.EndElement, SaxBuffer.EndEntity, SaxBuffer.EndPrefixMapping, SaxBuffer.IgnorableWhitespace, SaxBuffer.PI, SaxBuffer.SkippedEntity, SaxBuffer.StartCDATA, SaxBuffer.StartDocument, SaxBuffer.StartDTD, SaxBuffer.StartElement, SaxBuffer.StartEntity, SaxBuffer.StartPrefixMapping, SaxBuffer.XMLizableBit |
Method Summary |
void |
characters(char[] ch,
int start,
int length)
Parses text and extracts {name} parameters for later
substitution. |
void |
comment(char[] ch,
int start,
int length)
|
void |
endDocument()
|
void |
endDTD()
|
void |
endElement(String namespaceURI,
String localName,
String qName)
|
void |
ignorableWhitespace(char[] ch,
int start,
int length)
|
void |
processingInstruction(String target,
String data)
|
void |
startDocument()
|
void |
startDTD(String name,
String publicId,
String systemId)
|
void |
startElement(String namespaceURI,
String localName,
String qName,
Attributes atts)
|
void |
toSAX(ContentHandler contentHandler,
Map parameters)
|
String |
toString(Map parameters)
|
Methods inherited from class org.apache.cocoon.xml.SaxBuffer |
addBit, bits, dump, endCDATA, endEntity, endPrefixMapping, getBits, isEmpty, recycle, setDocumentLocator, skippedEntity, startCDATA, startEntity, startPrefixMapping, toSAX, toString, xmlizable |
ParamSaxBuffer
public ParamSaxBuffer()
- Creates empty SaxBuffer
ParamSaxBuffer
public ParamSaxBuffer(SaxBuffer saxBuffer)
- Creates copy of another SaxBuffer
characters
public void characters(char[] ch,
int start,
int length)
throws SAXException
- Parses text and extracts
{name}
parameters for later
substitution.
- Specified by:
characters
in interface ContentHandler
- Overrides:
characters
in class SaxBuffer
- Throws:
SAXException
endElement
public void endElement(String namespaceURI,
String localName,
String qName)
throws SAXException
- Specified by:
endElement
in interface ContentHandler
- Overrides:
endElement
in class SaxBuffer
- Throws:
SAXException
ignorableWhitespace
public void ignorableWhitespace(char[] ch,
int start,
int length)
throws SAXException
- Specified by:
ignorableWhitespace
in interface ContentHandler
- Overrides:
ignorableWhitespace
in class SaxBuffer
- Throws:
SAXException
processingInstruction
public void processingInstruction(String target,
String data)
throws SAXException
- Specified by:
processingInstruction
in interface ContentHandler
- Overrides:
processingInstruction
in class SaxBuffer
- Throws:
SAXException
startDocument
public void startDocument()
throws SAXException
- Specified by:
startDocument
in interface ContentHandler
- Overrides:
startDocument
in class SaxBuffer
- Throws:
SAXException
startElement
public void startElement(String namespaceURI,
String localName,
String qName,
Attributes atts)
throws SAXException
- Specified by:
startElement
in interface ContentHandler
- Overrides:
startElement
in class SaxBuffer
- Throws:
SAXException
endDocument
public void endDocument()
throws SAXException
- Specified by:
endDocument
in interface ContentHandler
- Overrides:
endDocument
in class SaxBuffer
- Throws:
SAXException
comment
public void comment(char[] ch,
int start,
int length)
throws SAXException
- Specified by:
comment
in interface LexicalHandler
- Overrides:
comment
in class SaxBuffer
- Throws:
SAXException
endDTD
public void endDTD()
throws SAXException
- Specified by:
endDTD
in interface LexicalHandler
- Overrides:
endDTD
in class SaxBuffer
- Throws:
SAXException
startDTD
public void startDTD(String name,
String publicId,
String systemId)
throws SAXException
- Specified by:
startDTD
in interface LexicalHandler
- Overrides:
startDTD
in class SaxBuffer
- Throws:
SAXException
toSAX
public void toSAX(ContentHandler contentHandler,
Map parameters)
throws SAXException
- Parameters:
parameters
- map containing SaxBuffers
- Throws:
SAXException
toString
public String toString(Map parameters)
throws SAXException
- Parameters:
parameters
- map containing SaxBuffers
- Throws:
SAXException
Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.