|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xml.sax.helpers.DefaultHandler
org.apache.avalon.framework.configuration.SAXConfigurationHandler
org.apache.cocoon.transformation.helpers.InterpolatingConfigurationHandler
public class InterpolatingConfigurationHandler
A SAX ContentHandler that builds Avalon Configuration objects,
but also replaces variables of the form {var} with values from a map.
VariableConfiguration| Constructor Summary | |
|---|---|
InterpolatingConfigurationHandler(Map vars)
Constructor. |
|
InterpolatingConfigurationHandler(Map vars,
String location)
Constructor. |
|
| Method Summary | |
|---|---|
void |
characters(char[] ch,
int start,
int len)
Replace {vars} in element bodies. |
protected String |
getLocationString()
|
void |
startElement(String uri,
String localName,
String qName,
Attributes attr)
Replace {vars} in attributes. |
| Methods inherited from class org.apache.avalon.framework.configuration.SAXConfigurationHandler |
|---|
clear, createConfiguration, endElement, error, fatalError, getConfiguration, setDocumentLocator, warning |
| Methods inherited from class org.xml.sax.helpers.DefaultHandler |
|---|
endDocument, endPrefixMapping, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public InterpolatingConfigurationHandler(Map vars)
vars - The mappings from variable name to value.
public InterpolatingConfigurationHandler(Map vars,
String location)
vars - The mappings from variable name to value.location - The origin of this configuration info.| Method Detail |
|---|
public void startElement(String uri,
String localName,
String qName,
Attributes attr)
throws SAXException
startElement in interface ContentHandlerstartElement in class SAXConfigurationHandlerSAXException
public void characters(char[] ch,
int start,
int len)
throws SAXException
characters in interface ContentHandlercharacters in class SAXConfigurationHandlerSAXExceptionprotected String getLocationString()
getLocationString in class SAXConfigurationHandler
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||