Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#56 Html Tag Attribute Syntax Coat

open
nobody
None
5
2008-02-11
2008-02-11
LiangFei
No

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);

Discussion