ObjectModel objectModel,
ExecutionContext executionContext, MacroContext macroContext,
NamespacesTable namespaces, Event startEvent, Event endEvent) throws SAXException {
Iterator iter = getSubstitutions().iterator();
while (iter.hasNext()) {
Subst subst = (Subst) iter.next();
char[] chars;
if (subst instanceof Literal) {
chars = ((Literal) subst).getCharArray();
consumer.characters(chars, 0, chars.length);
} else {
Subst expr = (Subst) subst;
try {
Object val = expr.getNode(objectModel);
Invoker.executeNode(consumer, val);
} catch (Exception e) {
throw new SAXParseException(e.getMessage(), getLocation(), e);
} catch (Error err) {
throw new SAXParseException(err.getMessage(), getLocation(), new ErrorHolder(err));