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

📄 xtp-format.xtp

📁 解压在c盘
💻 XTP
字号:
<s1 title="Format Sections"><p>A major advantage of XTP is its separation of content from formatting.Your source documents can use meaningful markup tags letting the stylesheetformat the output.</p><p>The XTP source of this tutorial uses a few tags for basic formatting:<var/&lt;s1>/>, <var/&lt;example>/>, and <var/&lt;var>/>.</p><p>For example, the source for the tutorial index contains a sectionlike:</p><example title="index.xtp">&lt;s1 title="XTP">&lt;ul>&lt;li>&lt;a href="xtp-copy.xtp">XTP copy&lt;/a> treats XTP pages exactly like JSP.&lt;li>&lt;a href="xtp-format.xtp">Format&lt;/a> sections, splitting style from content&lt;li>&lt;a href="xtp-page.xtp">Encode links&lt;/a> for sessions automatically&lt;li>&lt;a href="xtp-strict.xtp">Strict XSL&lt;/a> equivalent to StyleScript&lt;/ul>&lt;/s1></example><p>The stylesheet contains a new rule for <var/s1/>.  In thisexample, the rule only works when there is a <var/title/> attribute.  In thereplacement code, <var/&lt;xsl:value-of select="@title"/>/> inserts thevalue of the <var/title/> attribute.</p><example title="default.xsl">&lt;xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"                version="1.0">  &lt;!-- make sure '&lt;' is not printed as '&amp;lt;' -->  &lt;xsl:output disable-output-escaping='true'/>  &lt;!-- copy input to output -->  &lt;xsl:template match='*|@*'>    &lt;xsl:copy>      &lt;xsl:apply-templates select='node()|@*'/>    &lt;/xsl:copy>  &lt;/xsl:template>  &lt;!-- s1 format -->  &lt;xsl:template match="s1[@title]">    &lt;table width="100%" cellpadding="5" border="0">    &lt;tr bgcolor="#ccddff">&lt;td>      &lt;font size="+2">&lt;b>&lt;value-of select="@title"/>&lt;/b>&lt;/font>    &lt;/td>&lt;/tr>    &lt;/table>    &lt;xsl:apply-templates/>  &lt;/xsl:template>&lt;/xsl:stylesheet></example></s1>

⌨️ 快捷键说明

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