xslt入门

本文介绍如何使用xsltproc工具将XML文件转换成HTML格式,并提供了详细的命令行操作指南及一些在线资源链接。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

使用场景: 

已有xml数据,显示为web等

安装:

 xml+ie即可,不需要工具

如果转换为其它格式如:html需要使用xsltproc:

下载xsltproc


使用方法:

XSLT实现XML文档转换成HTML文档

http://www.cnblogs.com/a2602162453/p/5180253.html

http://www.cnblogs.com/xmlnode/p/4560754.html


XSLT语法: http://blog.163.com/endno_go/blog/static/1640590572010996720937/

http://www.cnblogs.com/xmlnode/p/4564265.html


嵌套+tab:

http://www.html5tricks.com/css3-responsive-tab-menu.html

http://www.cnblogs.com/saptechnique/archive/2012/08/28/2660403.html

http://www.it2down.com/it-xml-soap/209390.htm


xsltproc转换方法:

orchis:~ -> xsltproc
Usage: xsltproc [options] stylesheet file [file ...]
   Options:
      --version or -V: show the version of libxml and libxslt used
      --verbose or -v: show logs of what's happening
      --output file or -o file: save to a given file
      --timing: display the time used
      --repeat: run the transformation 20 times
      --debug: dump the tree of the result instead
      --novalid: skip the DTD loading phase
      --noout: do not dump the result
      --maxdepth val : increase the maximum depth
      --html: the input document is(are) an HTML file(s)
      --docbook: the input document is SGML docbook
      --param name value : pass a (parameter,value) pair
      --nonet refuse to fetch DTDs or entities over network
      --warnnet warn against fetching over the network
      --catalogs : use the catalogs from $SGML_CATALOG_FILES
      --xinclude : do XInclude processing on document input
      --profile or --norman : dump profiling information 
orchis:~ ->
cd /d %~dp0

.\tool\xsltproc\bin\xsltproc .\dog.xml -o .\dog.html




评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值