★ ★★★★test.xsl XML文件轉換文件完整程序代碼★★★★★
<?XML version="1.0" encoding="utf-8"?>
< xsl:stylesheet version="1.0"
XMLns:xsl="http://www.w3.org/1999/XSL/Transform">
< xsl:template match="/">
< Html>
< body>
< !--
This is an XSLT template file. Fill in this area with the
XSL elements which will transform your XML to XHtml.
-->
<table width="300" height="30" border="10" cellspacing="0" cellpadding="0" style="font-size: 9pt;">
< tr align="center">
< td style="font-size: 9pt;">書名</td>
< td style="font-size: 9pt;">頁碼</td>
< /tr>
< xsl:for-each select="PUBLICATION/BOOK">
< tr align="center" height="30">
< td style="font-size: 9pt;">
< xsl:value-of select="TITLE"/>
< /td>
< td style="font-size: 9pt;">
< xsl:value-of select="PAGES"/>
< /td>
< /tr>
< /xsl:for-each>
< /table>
< /body>
< /Html>
< /xsl:template>
< /xsl:stylesheet>
圖1 刪除XML節點