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

📄 xtp-copy.xtp

📁 解压在c盘
💻 XTP
字号:
<s1 title="XTP Identity"><p>XTP (XML template pages) lets you ease into XML and XSLT(XML Stylesheet Tranformations).  Your Serif pages can be almost identical toJSP pages and just use XSLT to eliminate repetitious error-prone patterns.</p><p>XTP transforms XML or HTML documents into a XML or HTML output.  Inother words, it's an XML transformation.  So each XTP page has four parts:</p><ol><li>The input XML (the XTP file)<li>The transformation stylesheet (the XSL file)<li>The generated JSP<li>The generated output (the result of executing the JSP)</ol><p>The easiest transformation is the identity transformation.  The followingstylesheet copies the input into the output.</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;/xsl:stylesheet></example><p>Each <var/template/> contains a <var/match/> pattern and a<var/replacement tree/>.  The match pattern is an <var/XPath/> expression.In the above example, the match pattern <var/*|@*/> matches any elementand any attribute.  The replacement <var/xsl:copy/> copies the currentnode and calls <var/xsl:apply-templates/> to recursively evaluateany children of the current node.</p><p>You can put <var/default.xsl/> in the same directory as the xtpfile, or you can put in WEB-INF/xsl, or you can put it in theclasspath like WEB-INF/classes.  The last option is useful if you wantto create a jar of useful stylesheets and beans. </p><p>Your XTP page may look something like:</p><example title='test.xtp'>&lt;h1>My test&lt;/h1>Adding: 2 + 2 = &lt;%= 2 + 2 %></example><p>The generated JSP is identical to the input, and the generated HTMLjust executes the JSP.</p><results>&lt;h1>My test&lt;/h1>Adding: 2 + 2 = 4</results></s1>

⌨️ 快捷键说明

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