⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 xslt-lite-eg.xtp

📁 解压在c盘
💻 XTP
字号:
<title css='default.css'  keywords="xsl,xslt,xml,jsp,resin,caucho,template,tag,library">XSLT-lite examples</title><summarylist/><section name=counter title="Counter"><p>XTP pages can use the counter just by adding the tag:</p><example title='counter.xtp'><eg-em>A counter example: </eg-em>&lt;ct:counter id='test'/&gt;</example><p>Here the patterns to do it.  For efficiency, we've added the <code/cache/> directive.  The cache directive tells XTP to execute thestylesheet only once and cache the generated JSP file.<example title='default.xsl'>&lt;#@ cache #&gt;counter[@id] &lt;&lt;<eg-em>&lt;%=application.attribute["</eg-em><{@id}><eg-em>"]</eg-em><eg-em>%&gt;</eg-em>>>counter &lt;&lt;<eg-em>&lt;%= application.attribute.counter++ %></eg-em>>></example></section><section name=flow title="JSP flow control"><ul><li>ct:get prints the value of a variable<li>ct:if generates an if statement<li>ct:iter loops</ul><example title='definition of ct:get'>ct:get &lt;&lt;<eg-em>&lt;%=</eg-em> &lt;{@expr}><eg-em> %></eg-em>>></example><example title='definition of ct:if'>ct:if &lt;&lt;<eg-em>&lt;% if (</eg-em>&lt;{@expr}><eg-em>) { %></eg-em>  &lt;xsl:apply-templates/><eg-em>&lt;% } %></eg-em>>></example><example title='definition of ct:iter'>ct:iter[@index] &lt;&lt;<eg-em>&lt;% for (var </eg-em>&lt{@index}> <eg-em>in</eg-em> &lt;{@expr}><eg-em>) { %></eg-em>  &lt;xsl:apply-templates/><eg-em>&lt;% } %></eg-em>>>ct:iter &lt;&lt;<eg-em>&lt;% for (var i in </eg-em>&lt;{@expr}><eg-em>) { %></eg-em>  &lt;xsl:apply-templates/><eg-em>&lt;% } %></eg-em>>></example></section>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -