一个关于XSLT的比较麻烦的问题

bucher 2003-05-17 05:27:53
如何用一个template就输出XML文件的所有元素?
...全文
23 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
bucher 2003-06-19
  • 打赏
  • 举报
回复
谢谢
saucer 2003-05-18
  • 打赏
  • 举报
回复
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="yes"/>
<xsl:template match="node()">
<xsl:copy>
<xsl:copy-of select="@*" />
<xsl:apply-templates />
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
Debian 2003-05-18
  • 打赏
  • 举报
回复
<xsl:template match="/">
<xls:apply-templates />
</xsl:template>
bucher 2003-05-18
  • 打赏
  • 举报
回复
看来我没有说清楚
我需要遍历每一个元素,因为我输出的是FlatFile,需要对每一个元素进行处理
chechy 2003-05-17
  • 打赏
  • 举报
回复
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" version="1.0" encoding="gb2312" indent="yes"/>
<xsl:template match="/">
<xsl:copy-of select="/"/>
</xsl:template>
</xsl:stylesheet>

8,906

社区成员

发帖
与我相关
我的任务
社区描述
XML/XSL相关问题讨论专区
社区管理员
  • XML/XSL社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧