I have found a way to accomplish my question. all I need to do is create a CreateOptionEntryTei
<tag>
<name>create-option-entry</name>
<tagclass>pack.CreateOptionEntryTag</tagclass>
<teiclass>pack.CreateOptionEntryTei</teiclass>
<bodycontent>JSP</bodycontent>
<attribute>
<name>var</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
</tag>
and define the class like this
public class CreateOptionEntryTei extends TagExtraInfo {
public VariableInfo[] getVariableInfo(TagData data) {
String var = data.getAttributeString("var");
return new VariableInfo[] { new VariableInfo(var, OptionEntry.class.getName(), true, VariableInfo.NESTED), };
}
}