<?xml version="1.0" encoding="GB2312"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:template match="/"> <html> <head><title>學生信息</title></head> <body> <table border="1"> <tr> <th>姓名</th> <th>年齡</th> <th>電話</th> </tr>
<xsl:for-each select="學生花名冊/學生"> <tr> <td><xsl:value-of select="姓名"/></td> <td><xsl:value-of select="年齡"/></td> <td><xsl:value-of select="電話"/></td> </tr> </xsl:for-each> </table>
</body></html> </xsl:template> </xsl:stylesheet>
-- 學海無涯
Powered by: BlogJava Copyright © 啥都寫點