|
 |
XSLT 实例:使用变量(Variable)创建单选框和复选框
|
|
使用到的XSLT元素: xsl:stylesheet xsl:template xsl:apply-templates xsl:value-of xsl:key xsl:output xsl:variable xsl:if xsl:for-each xsl:attribute
使用到的XSLT/XPath函数: key concat
|
|
 |
XSLT 实例:创建带有“前一页”和“后一页”的 HTML 文档
|
|
本例使用到的XSLT元素: xsl:stylesheet xsl:template xsl:apply-templates xsl:for-each xsl:value-of xsl:call-template xsl:copy-of xsl:param xsl:attribute xsl:text xsl:output
本例使用到的XSLT/XPath函数: translate
|
|
 |
XSLT 实例:统计作者出版物的销量
|
|
实例中用到的XSLT元素: xsl:stylesheet xsl:template xsl:text xsl:apply-templates xsl:key xsl:output xsl:sort xsl:copy xsl:value-of
实例中用到的XSLT/XPath函数: key sum count position
|
|
 |
XSLT 实例:使用不同的轴(Axis)
|
|
本例展示轴(Axis)的用法
使用到的XSLT元素:xsl:stylesheet xsl:template xsl:apply-templates xsl:call-template xsl:value-of
|
|
 |
用 XML/XSL 来生成动态页面
|
|
为了得到html输出,我们把生成的xml文件和控制xml数据如何表示的xsl模板相结合。我们的xsl模板由精心组织的xsl和html标签组成。
|
|
 |
查找公共祖先节点
|
|
查找公共祖先结点
substring-before ancestor-or-self xsl:with-param xsl:param
|
|
 |
查找节点的父节点
|
|
显示出目标示例中某个节点的父节点,由父节点向子节点排列(显示出目标示例中某个结点的父结点,由父结点向子结点排列.).
|
|
 |
把数据库输表用 XSLT 转化为树状
|
|
题目: 把数据库输出的表用XSLT转化为树状的. 输出表示例: root item id=1 parent=0 / item id=2 parent=1 / item id=3 parent=2 / item id=4 parent=1 / /root 目标示例: root item id=1 item id=2 item id=3 / /item item id=4/ /item /root 实现: ?xml version=1.0
|
|
 |
利用 XSL 解析 RSS
|
|
题目: 用XSL解析RSS,生成html形式的流,输出到前台 实现: String urlRSS= http://rss.xinhuanet.com/rss/2006worldcup.xml ; try { //取得xml和xsl流 StreamSource source = new StreamSource(urlRSS); StreamSource style = new StreamSource( titleList.xsl ); //
|
|
|
 |
|
相关分类 |
|
|
|
|
|