| Method from org.apache.cocoon.transformation.JPathTransformer Detail: |
public void endTransformingElement(String uri,
String name,
String raw) throws IOException, SAXException, ProcessingException {
if (JPATH_VALUEOF.equals(name) ||
JPATH_CONTINUATION.equals(name)) {
return; // do nothing
} else if (JPATH_IF.equals(name)) {
finishIf();
} else {
super.endTransformingElement(uri, name, raw);
}
}
Exit method for all elements in our namespace |
public void initialize() throws Exception {
this.defaultNamespaceURI = JPATH_NAMESPACE_URI;
m_re = new RE("id");
m_cache = new HashMap();
}
Initialize this transformer. |
public void recycle() {
m_cache.clear();
m_kont = null;
m_jxpathContext = null;
super.recycle();
}
Release all held resources. |
public void setup(SourceResolver resolver,
Map objectModel,
String src,
Parameters parameters) throws IOException, SAXException, ProcessingException {
super.setup(resolver, objectModel, src, parameters);
// setup the jpath transformer for this thread
Object bean = FlowHelper.getContextObject(objectModel);
m_kont = FlowHelper.getWebContinuation(objectModel);
m_jxpathContext = JXPathContext.newContext(bean);
}
|
public void startElement(String uri,
String loc,
String raw,
Attributes a) throws SAXException {
AttributesImpl impl = new AttributesImpl(a);
checkJPathAction(impl);
super.startElement(uri, loc, raw, impl);
}
Intercept startElement to ensure all <jpath:action> attributes
are modified. |
public void startTransformingElement(String uri,
String name,
String raw,
Attributes attr) throws IOException, SAXException, ProcessingException {
if (JPATH_VALUEOF.equals(name)) {
doValueOf(attr);
} else if (JPATH_CONTINUATION.equals(name)) {
doContinuation(attr);
} else if (JPATH_IF.equals(name)) {
doIf(attr);
} else {
super.startTransformingElement(uri, name, raw, attr);
}
}
Entry method for all elements in our namespace |