use of org.apache.sling.scripting.sightly.impl.compiler.frontend.ElementContext in project sling by apache.
the class MarkupHandler method onCloseTag.
public void onCloseTag(String markup) {
ElementContext context = elementStack.pop();
PluginInvoke invoke = context.pluginInvoke();
invoke.afterChildren(stream);
boolean selfClosingTag = StringUtils.isEmpty(markup);
boolean slyTag = "sly".equalsIgnoreCase(context.getTagName());
if (slyTag) {
Patterns.beginStreamIgnore(stream);
}
invoke.beforeTagClose(stream, selfClosingTag);
out(markup);
invoke.afterTagClose(stream, selfClosingTag);
if (slyTag) {
Patterns.endStreamIgnore(stream);
}
invoke.afterElement(stream);
}
use of org.apache.sling.scripting.sightly.impl.compiler.frontend.ElementContext in project sling by apache.
the class MarkupHandler method onOpenTagEnd.
public void onOpenTagEnd(String markup) {
ElementContext context = elementStack.peek();
PluginInvoke invoke = context.pluginInvoke();
invoke.beforeElement(stream, context.getTagName());
boolean slyTag = "sly".equalsIgnoreCase(context.getTagName());
if (slyTag) {
Patterns.beginStreamIgnore(stream);
}
invoke.beforeTagOpen(stream);
out(context.getOpenTagStartMarkup());
invoke.beforeAttributes(stream);
traverseAttributes(context, invoke);
invoke.afterAttributes(stream);
out(markup);
invoke.afterTagOpen(stream);
if (slyTag) {
Patterns.endStreamIgnore(stream);
}
invoke.beforeChildren(stream);
}
use of org.apache.sling.scripting.sightly.impl.compiler.frontend.ElementContext in project sling by apache.
the class MarkupHandler method onOpenTagStart.
public void onOpenTagStart(String markup, String tagName) {
ElementContext context = new ElementContext(tagName, markup);
elementStack.push(context);
}
Aggregations