使用JET在Eclipse中创建更多更好的代码 - 编程入门网
作者 佚名技术
来源 NET编程
浏览
发布时间 2012-06-14
<c:when test="''happy''">My dear</c:when>
<c:when test="''neutral''">Dear</c:when>
<c:when test="''angry''">My enemy</c:when>
</c:choose> <c:get select="$currEmail/@to" />,
I am writing you <c:choose select="$currEmail/@mood" >
<c:when test="''happy''">in joy </c:when>
<c:when test="''neutral''"></c:when>
<c:when test="''angry''">in burning anger </c:when>
</c:choose>to ask for <c:choose select="$currEmail/@numItems" >
<c:when test="1">
a <c:get select="$currEmail/request/@item" />.
</c:when>
<c:otherwise>
the following:
<c:setVariable var="i" select="0" />
<c:iterate select="$currEmail/request" var="r">
<c:setVariable var="i" select="$i+1" />
<c:get select="$i" />. <c:get select="$r/@item" />
</c:iterate>
</c:otherwise>
</c:choose>
<c:choose select="$currEmail/@mood">
<c:when test="''happy''">Please</c:when>
<c:when test="''neutral''">Please</c:when>
<c:when test="''angry''">Either suffer my wrath, or</c:when>
</c:choose> send me <c:choose select="$currEmail/@numItems">
<c:when test="1">
this item</c:when>
<c:otherwise>
these items</c:otherwise>
</c:choose> <c:choose select="$currEmail/@mood" >
<c:when test="''happy''">at your earliest convenience.</c:when>
<c:when test="''neutral''">promptly.</c:when>
<c:when test="''angry''">immediately!</c:when>
</c:choose>
<c:choose select="$currEmail/@mood" >
<c:when test="''happy''">Your friend,</c:when>
<c:when test="''neutral''">Sincerely,</c:when>
<c:when test="''angry''">In rage,</c:when>
</c:choose>
<c:get select="/app/@from" />
使用JET在Eclipse中创建更多更好的代码(11)时间:2011-11-29 IBM Chris Aniszczyk该模板的输入模型实例如下: 清单 14. sample.xml <app from="Nathan" > <email to="Chris" mood="angry" > <request item="well-written article" /> </email> <email to="Nick" mood="happy" > <request item="Piano" /> <request item="Lollipop" /> <request item="Blank DVDs" /> </email> </app> 将 mood 电子邮件蓝图应用于这些参数,生成下列两个文件。 清单 15. Chris.txt
清 |
凌众科技专业提供服务器租用、服务器托管、企业邮局、虚拟主机等服务,公司网站:http://www.lingzhong.cn 为了给广大客户了解更多的技术信息,本技术文章收集来源于网络,凌众科技尊重文章作者的版权,如果有涉及你的版权有必要删除你的文章,请和我们联系。以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢! |
你可能对下面的文章感兴趣
关于使用JET在Eclipse中创建更多更好的代码 - 编程入门网的所有评论