help sos sos

yushuzhang7942 2003-08-22 05:20:11
我编写一个asp页面 完成如下功能,首先从数据库中提取查询数据,然后把数据拼成一个xml文件,然后用xslt样式表转化一下,最后再前端显示。请问关于xml用xslt转换和显示的部分应该怎么写,请给我一个具体的例子好吗? 本人急需 谢谢
...全文
37 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
tigerwen01 2003-08-22
  • 打赏
  • 举报
回复
简单例子:
nickmean.xml:
<?xml version="1.0" encoding="gb2312"?>
<?xml-stylesheet href="nickmean01.xsl" type="text/xsl"?>
<UserInformation>
<Information>
<name>美眉</name>
<tel>表示在网络上横行的漂亮女孩子</tel>
</Information>
<Information>
<name>恐龙</name>
<tel>表示在网络上寻找另一个自我的表面张力和比例结构不友好的女孩子</tel>
</Information>
</UserInformation>

<?xml version="1.0" encoding="GB2312"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
<xsl:template match="/">
<html>
<body>
<xsl:apply-templates select="UserInformation" />
</body>
</html>
</xsl:template>

nickmean01.xsl:
<xsl:template match="UserInformation">
<table Border="1">
<xsl:for-each select="Information">
<tr>
<td bgcolor="#aaaaff"><xsl:value-of select="name"/></td>
<td bgcolor="#c0c0c0"><xsl:value-of select="tel"/></td>
</tr>
</xsl:for-each>
</table>
</xsl:template>

</xsl:stylesheet>

28,390

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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