command-line.xtp

来自「解压在c盘」· XTP 代码 · 共 59 行

XTP
59
字号
<s1 title="Command Line"><p>To transform documents with XSL on the command line use thecom.caucho.xsl.Xsl class.</p><p>The CLASSPATH needs to include the following jar files:</p><ul><li>lib/dom.jar<li>lib/resin-xml.jar<li>lib/resin-xsl.jar</ul><p>The following trivial example just replaces the tag &lt;hello/> with<var/Hello, World/>.</p><example title="hello.xsl">&lt;xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform">&lt;xsl:template match="hello">  &lt;html>  &lt;body>  &lt;xsl:text>Hello, World&lt;/xsl:text>  &lt;/body>  &lt;/html>&lt;/xsl:template>&lt;/xsl:stylesheet></example><example title="hello.xml">&lt;hello/></example><p>By default, the command-line XSL prints to standard out.So a command-line invocation with CLASSPATH already configuredmight look like:</p><example>unix> <var/java com.caucho.xsl.Xsl -xsl hello.xsl hello.xml/>&lt;!DOCTYPE html PUBLIC "-//W3C/DTD HTML 4.0 Frameset//EN"                  "http://www.w3c.org/TR/REC-html40/frameset.dtd">&lt;html>&lt;head>  &lt;meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">&lt;/head>&lt;body>Hello, World&lt;/body>&lt;/html></example><deftable title="command-line options"><tr><td>-xsl <var/stylesheet/><td>Select a stylesheet<tr><td>-o <var/path/><td>Sets the result file or directory to <var/path/><tr><td>-stylescript<td>Uses the StyleScript syntax instead of strict XSL<tr><td>-conf <var/resin.conf/><td>Select a different resin.conf<tr><td>-suffix <var/html/><td>Sets the replacement suffix to <var/html/></deftable></s1>

⌨️ 快捷键说明

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