Html Tag Attribute Syntax Coat
Brought to you by:
derrickoswald
Html Tag Attribute Syntax Coat:
eg:
<table>
<tr vtl:foreach="user in users">
<td>${user.name}</td>
</tr>
</table>
Transform To Velocity/FreeMarker/CommonTemplate:
<table>
#foreach{user in users}
<tr>
<td>${user.name}</td>
</tr>
#end
</table>
Hope for API:
public final class Coat {
private final String before;
private final String after;
public Coat(String before, String after) {
this.before = before;
this.after = after;
}
public String getBefore() {
return before;
}
public String getAfter() {
return after;
}
}
public interface AttributeCoatHandler {
Coat handleAttribute(String attrName, String attrValue);
}
TagCoatContext.registerAttributeCoatHandler(String namespace, AttributeCoatHandler handler);