<chtml>
<bag id=doc><we name=we_id>@{sn:ask}</we></bag>
<if x="@{doc:we_id}">
<we>
<esql module=base id=pk>Select max(WE_ID) as ask_id from ask_base</esql>
<bag id=doc><we name=we_id>@{sn:ask=@{pk:ask_id}}</we></bag>
</we>
</if>
</chtml>
<html>
<h1>@{doc:we_id}<h1>
</html>