Linux command
xalan 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Transform XML with XSLT
java org.apache.xalan.xslt.Process -IN [input.xml] -XSL [style.xsl] -OUT [output.html]
Transform to stdout
java org.apache.xalan.xslt.Process -IN [input.xml] -XSL [style.xsl]
Set stylesheet parameter
java org.apache.xalan.xslt.Process -IN [input.xml] -XSL [style.xsl] -PARAM [name] [value]
Output as XML
java org.apache.xalan.xslt.Process -IN [input.xml] -XSL [style.xsl] -XML
Check environment
java org.apache.xalan.xslt.EnvironmentCheck
Use XSLTC compiler
java org.apache.xalan.xslt.Process -XSLTC -IN [input.xml] -XSL [style.xsl]
说明
Xalan is an XSLT processor for transforming XML documents. It implements XSLT 1.0 and XPath 1.0, transforming XML into HTML, text, or other XML formats based on stylesheet rules. The processor is written in Java and requires the JVM with Xalan JARs in the classpath. It supports the JAXP transformation API and can be used as a library or command-line tool. XSLTC mode compiles stylesheets to Java bytecode for faster repeated transformations. This is useful for server applications processing many documents with the same stylesheet.
参数
- -IN _file_
- Input XML document URL.
- -XSL _file_
- XSLT stylesheet URL.
- -OUT _file_
- Output file name.
- -PARAM _name_ _value_
- Set stylesheet parameter.
- -XML
- Output as XML with declaration.
- -HTML
- Output as HTML.
- -TEXT
- Output as plain text.
- -XSLTC
- Use XSLTC compiled transformation.
- -V
- Display version.
- -EDUMP _file_
- Dump stack trace on error.
FAQ
What is the xalan command used for?
Xalan is an XSLT processor for transforming XML documents. It implements XSLT 1.0 and XPath 1.0, transforming XML into HTML, text, or other XML formats based on stylesheet rules. The processor is written in Java and requires the JVM with Xalan JARs in the classpath. It supports the JAXP transformation API and can be used as a library or command-line tool. XSLTC mode compiles stylesheets to Java bytecode for faster repeated transformations. This is useful for server applications processing many documents with the same stylesheet.
How do I run a basic xalan example?
Run `java org.apache.xalan.xslt.Process -IN [input.xml] -XSL [style.xsl] -OUT [output.html]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -IN _file_ do in xalan?
Input XML document URL.