{"id":101,"date":"2006-07-17T15:33:23","date_gmt":"2006-07-17T07:33:23","guid":{"rendered":"http:\/\/tmp.xujiwei.com\/blog\/?p=101"},"modified":"2010-01-28T23:56:03","modified_gmt":"2010-01-28T15:56:03","slug":"make-a-gustbook-with-xml-xsl-css-asp","status":"publish","type":"post","link":"https:\/\/xujiwei.com\/blog\/2006\/07\/make-a-gustbook-with-xml-xsl-css-asp\/","title":{"rendered":"XML+XSL+CSS+ASP\u6253\u9020\u7559\u8a00\u7c3f"},"content":{"rendered":"<p>\u524d\u6bb5\u65f6\u95f4\u65e0\u610f\u95f4\u770b\u5230\u4e00\u4e2a\u535a\u5ba2\u7684RSS\u53ef\u4ee5\u7528XSL\u683c\u5f0f\u8f93\u51fa\u5e76\u4e14\u80fd\u5728Firefox\u91cc\u6d4f\u89c8\uff0c\u60f3\u5230\u81ea\u5df1\u4ee5\u524d\u5199\u7684\u4e00\u4e2aXML\u7559\u8a00\u7c3f\u56e0\u4e3a\u4e0d\u517c\u5bb9Firefox\u6240\u4e0d\u4e86\u4e86\u4e4b\u4e86\uff0c\u73b0\u5728\u770b\u5230\u4ed6\u7684\u80fd\u5728Firefox\u6d4f\u89c8\u5c31\u89c9\u5f97\u5f88\u597d\u5947\uff0c\u770b\u4e86\u4e00\u4e0b\u4ee3\u7801\uff0c\u4e00\u53e5\u4e00\u53e5\u7684\u6bd4\u5bf9\uff0c\u6700\u540e\u7ec8\u4e8e\u627e\u5230\u4e86\u539f\u56e0\uff0c\u4e5f\u5c31\u628a\u8fd9\u4e2a\u7559\u8a00\u7c3f\u7ed9\u5b8c\u6210\u4e86\u3002\u56e0\u4e3a\u662f\u4e00\u4e2a\u7b80\u5355\u7684XML\u7559\u8a00\u7c3f\uff0c\u6240\u4ee5\u53d6\u540dSXGB(Simple\u00a0XML\u00a0GuestBook)\u3002<\/p>\n<p><a rel=\"external\" href=\"http:\/\/home.goofar.com\/hotheart\/gbook\/gbook.asp\">\u67e5\u770b\u7559\u8a00\u672c\u6f14\u793a<\/a>\uff0c\u7ba1\u7406\u5bc6\u7801\u4e3atest\uff1a<\/p>\n<p>\u9996\u5148\u5b9a\u4e49\u7559\u8a00\u7c3f\u7684XML\u6587\u6863\u7684\u683c\u5f0f\u3002\u4f5c\u4e3a\u4e00\u4e2a\u7559\u8a00\u7c3f\uff0c\u4e0d\u9700\u8981\u592a\u590d\u6742\u7684\u5185\u5bb9\uff0c\u4e8e\u662f\u6211\u5c31\u7ed9\u7559\u8a00\u5185\u5bb9\u5206\u4e3a3\u4e2a\u90e8\u5206\uff1a\u7559\u8a00\u8005\u59d3\u540d\u3001\u7559\u8a00\u8005\u4e3b\u9875\u548c\u7559\u8a00\u5185\u5bb9\u3002\u53e6\u5916\uff0c\u4e00\u4e2a\u7559\u8a00\u7c3f\u8fd8\u9700\u8981\u6709\u4f7f\u7528\u8005\u7684\u4e00\u4e9b\u4fe1\u606f\uff0c\u5305\u62ec\u7528\u6237\u540d\u548c\u7528\u6237\u4e3b\u9875\u3002\u518d\u6709\uff0c\u5728\u7559\u8a00\u6bd4\u8f83\u591a\u65f6\u8fd8\u9700\u8981\u5206\u9875\u4fe1\u606f\u3002\u5927\u81f4\u7ed3\u6784\u5b8c\u6210\u540e\u5c31\u53ef\u4ee5\u5f00\u59cb\u5199XML\u6587\u6863\u6a21\u677f\u4e86\u3002<\/p>\n<p>XML\u6587\u6863\u6839\u5143\u7d20\u5b9a\u4e49\u4e3agbook<\/p>\n<p><strong>XML\u6587\u6863\u6a21\u677fgbook.xml<\/strong><\/p>\n<blockquote><p><strong> <\/strong><\/p>\n<div id=\"_mcePaste\">\n<div id=\"_mcePaste\">&lt;?xml version=\"1.0\" encoding=\"utf-8\"?&gt;<\/div>\n<div id=\"_mcePaste\">&lt;!-- DTD file --&gt;<\/div>\n<div id=\"_mcePaste\">&lt;!DOCTYPE gbook SYSTEM \"sxgb.dtd\"&gt;<\/div>\n<div id=\"_mcePaste\">&lt;!-- XSL file --&gt;<\/div>\n<div id=\"_mcePaste\">&lt;?xml-stylesheet type=\"text\/xsl\" href=\"gbook.xsl\"?&gt;<\/div>\n<div id=\"_mcePaste\">&lt;gbook&gt;<\/div>\n<div id=\"_mcePaste\">&lt;!-- \u7559\u8a00\u7c3f\u76f8\u5173\u4fe1\u606f --&gt;<\/div>\n<div id=\"_mcePaste\">&lt;info&gt;<\/div>\n<div id=\"_mcePaste\">&lt;!-- \u7528\u6237\u540d --&gt;<\/div>\n<div id=\"_mcePaste\">&lt;user&gt;HotHeart&lt;\/user&gt;<\/div>\n<div id=\"_mcePaste\">&lt;!-- \u7528\u6237\u4e3b\u9875 --&gt;<\/div>\n<div id=\"_mcePaste\">&lt;home&gt;http:\/\/www.xujiwei.cn&lt;\/home&gt;<\/div>\n<div id=\"_mcePaste\">&lt;!-- \u5206\u9875\u4fe1\u606f\uff0c\u5206\u522b\u4e3a\u76ee\u524d\u6240\u5728\u9875\uff0c\u603b\u9875\u6570\uff0c\u4e0a\u4e00\u9875\uff0c\u4e0b\u4e00\u9875 --&gt;<\/div>\n<div id=\"_mcePaste\">&lt;pagenow&gt;1&lt;\/pagenow&gt;<\/div>\n<div id=\"_mcePaste\">&lt;pagetotal&gt;1&lt;\/pagetotal&gt;<\/div>\n<div id=\"_mcePaste\">&lt;pageprev&gt;1&lt;\/pageprev&gt;<\/div>\n<div id=\"_mcePaste\">&lt;pagenext&gt;2&lt;\/pagenext&gt;<\/div>\n<div id=\"_mcePaste\">&lt;!-- \u662f\u5426\u5df2\u7ecf\u767b\u9646\uff0c\u7528\u6765\u5904\u7406\u662f\u5426\u663e\u793a\u767b\u9646\u6846 --&gt;<\/div>\n<div id=\"_mcePaste\">&lt;logined&gt;NO&lt;\/logined&gt;<\/div>\n<div id=\"_mcePaste\">&lt;\/info&gt;<\/div>\n<div id=\"_mcePaste\">&lt;!-- \u7559\u8a00\u5217\u8868 --&gt;<\/div>\n<div id=\"_mcePaste\">&lt;messages&gt;<\/div>\n<div id=\"_mcePaste\">&lt;!-- \u4e00\u4e2a\u7559\u8a00 --&gt;<\/div>\n<div id=\"_mcePaste\">&lt;message&gt;<\/div>\n<div id=\"_mcePaste\">&lt;!-- \u7559\u8a00ID --&gt;<\/div>\n<div id=\"_mcePaste\">&lt;id&gt;1&lt;\/id&gt;<\/div>\n<div id=\"_mcePaste\">&lt;!-- \u7559\u8a00\u8005\u59d3\u540d --&gt;<\/div>\n<div id=\"_mcePaste\">&lt;username&gt;Admin&lt;\/username&gt;<\/div>\n<div id=\"_mcePaste\">&lt;!-- \u7559\u8a00\u65f6\u95f4 --&gt;<\/div>\n<div id=\"_mcePaste\">&lt;time&gt;2005-08-09 12:00&lt;\/time&gt;<\/div>\n<div id=\"_mcePaste\">&lt;!-- \u7559\u8a00\u8005\u4e3b\u9875 --&gt;<\/div>\n<div id=\"_mcePaste\">&lt;homepage&gt;http:\/\/www.xujiwei.cn\/&lt;\/homepage&gt;<\/div>\n<div id=\"_mcePaste\">&lt;!-- \u7559\u8a00\u5185\u5bb9 --&gt;<\/div>\n<div id=\"_mcePaste\">&lt;content&gt;&lt;![CDATA[ \u7559\u8a00\u5185\u5bb9 ]]&gt;&lt;\/content&gt;<\/div>\n<div id=\"_mcePaste\">&lt;\/message&gt;<\/div>\n<div id=\"_mcePaste\">&lt;\/messages&gt;<\/div>\n<div id=\"_mcePaste\">&lt;\/gbook&gt;<\/div>\n<\/div>\n<\/blockquote>\n<div><span style=\"color: #333333; font-family: Corbel, \u5fae\u8f6f\u96c5\u9ed1, Verdana, Arial, sans-serif; line-height: 21px; font-size: 14px;\"><\/p>\n<p style=\"margin-top: 0.5em; margin-right: 0px; margin-bottom: 0.7em; margin-left: 0px; text-indent: 2em; line-height: 1.5em; padding: 0px;\">\u8981\u6ce8\u610f\u5728\u5f15\u7528XSL\u65f6\u4e0d\u80fd\u7528<\/p>\n<p style=\"margin-top: 0.5em; margin-right: 0px; margin-bottom: 0.7em; margin-left: 0px; text-indent: 2em; line-height: 1.5em; padding: 0px;\">&lt;?xml:stylesheet\u00a0type=\"text\/xsl\"\u00a0href=\"gbook.xsl\"?&gt;<\/p>\n<p style=\"margin-top: 0.5em; margin-right: 0px; margin-bottom: 0.7em; margin-left: 0px; text-indent: 2em; line-height: 1.5em; padding: 0px;\">xml\u548cstylesheet\u4e4b\u95f4\u5e94\u8be5\u7528\u4e00\u6760(-)\u800c\u4e0d\u80fd\u7528\u5192\u53f7(:)\uff0c\u5728Firefox\u91cc\u662f\u4e0d\u652f\u6301\u7528\u5192\u53f7\u7684\u3002<\/p>\n<p style=\"margin-top: 0.5em; margin-right: 0px; margin-bottom: 0.7em; margin-left: 0px; text-indent: 2em; line-height: 1.5em; padding: 0px;\">\u4e00\u4e2a\u597d\u7684XML\u6587\u6863\uff0c\u9664\u4e86\u8981\u6709\u7ed3\u6784\u6027\uff0c\u8fd8\u5e94\u8be5\u8981\u6709\u6709\u6548\u6027\uff0c\u6240\u4ee5\u5728XML\u6587\u6863\u7684\u4e00\u5f00\u5934\u5c31\u5b9a\u4e49\u4e86\u6587\u6863\u7c7b\u578b\u5b9a\u4e49(DTD)\u00a0sxgb.dtd\uff0c\u4e0b\u9762\u5c31\u6765\u628a\u8fd9\u4e2a\u6587\u6863\u7c7b\u578b\u5b9a\u4e49\u7ed9\u5b8c\u6210\u3002\u56e0\u4e3a\u5df2\u7ecf\u8bbe\u8ba1\u597d\u7559\u8a00\u7c3fXML\u6587\u6863\u7684\u7ed3\u6784\uff0c\u6240\u4ee5\u5199\u51faDTD\u662f\u5f88\u65b9\u4fbf\u7684\u3002<\/p>\n<p style=\"margin-top: 0.5em; margin-right: 0px; margin-bottom: 0.7em; margin-left: 0px; text-indent: 2em; line-height: 1.5em; padding: 0px;\"><!--more--><\/p>\n<p style=\"margin-top: 0.5em; margin-right: 0px; margin-bottom: 0.7em; margin-left: 0px; text-indent: 2em; line-height: 1.5em; padding: 0px;\"><strong>\u6587\u6863\u7c7b\u578b\u5b9a\u4e49sxgb.dtd<\/strong><\/p>\n<blockquote>\n<div><strong><\/p>\n<div><span style=\"font-weight: normal;\"><span style=\"font-style: normal;\">&lt;?xml version=\"1.0\" encoding=\"utf-8\"?&gt;<\/span><\/span><\/div>\n<div><span style=\"font-weight: normal;\"><span style=\"font-style: normal;\">&lt;!ELEMENT gbook (info,messages)&gt;<\/span><\/span><\/div>\n<div><span style=\"font-weight: normal;\"><span style=\"font-style: normal;\">&lt;!ELEMENT info (user,home,msgtotal,pagenow,pagetotal,pageprev,pagenext,logined)&gt;<\/span><\/span><\/div>\n<div><span style=\"font-weight: normal;\"><span style=\"font-style: normal;\">&lt;!ELEMENT messages (message+)&gt;<\/span><\/span><\/div>\n<div><span style=\"font-weight: normal;\"><span style=\"font-style: normal;\">&lt;!ELEMENT message (id,username,time,homepage,content)&gt;<\/span><\/span><\/div>\n<div><span style=\"font-weight: normal;\"><span style=\"font-style: normal;\">&lt;!ELEMENT user (#PCDATA)&gt;<\/span><\/span><\/div>\n<div><span style=\"font-weight: normal;\"><span style=\"font-style: normal;\">&lt;!ELEMENT home (#PCDATA)&gt;<\/span><\/span><\/div>\n<div><span style=\"font-weight: normal;\"><span style=\"font-style: normal;\">&lt;!ELEMENT msgtotal (#PCDATA)&gt;<\/span><\/span><\/div>\n<div><span style=\"font-weight: normal;\"><span style=\"font-style: normal;\">&lt;!ELEMENT pagenow (#PCDATA)&gt;<\/span><\/span><\/div>\n<div><span style=\"font-weight: normal;\"><span style=\"font-style: normal;\">&lt;!ELEMENT pagetotal (#PCDATA)&gt;<\/span><\/span><\/div>\n<div><span style=\"font-weight: normal;\"><span style=\"font-style: normal;\">&lt;!ELEMENT pageprev (#PCDATA)&gt;<\/span><\/span><\/div>\n<div><span style=\"font-weight: normal;\"><span style=\"font-style: normal;\">&lt;!ELEMENT pagenext (#PCDATA)&gt;<\/span><\/span><\/div>\n<div><span style=\"font-weight: normal;\"><span style=\"font-style: normal;\">&lt;!ELEMENT logined (#PCDATA)&gt;<\/span><\/span><\/div>\n<div><span style=\"font-weight: normal;\"><span style=\"font-style: normal;\">&lt;!ELEMENT id (#PCDATA)&gt;<\/span><\/span><\/div>\n<div><span style=\"font-weight: normal;\"><span style=\"font-style: normal;\">&lt;!ELEMENT title (#PCDATA)&gt;<\/span><\/span><\/div>\n<div><span style=\"font-weight: normal;\"><span style=\"font-style: normal;\">&lt;!ELEMENT username (#PCDATA)&gt;<\/span><\/span><\/div>\n<div><span style=\"font-weight: normal;\"><span style=\"font-style: normal;\">&lt;!ELEMENT time (#PCDATA)&gt;<\/span><\/span><\/div>\n<div><span style=\"font-weight: normal;\"><span style=\"font-style: normal;\">&lt;!ELEMENT homepage (#PCDATA)&gt;<\/span><\/span><\/div>\n<div><span style=\"font-weight: normal;\"><span style=\"font-style: normal;\">&lt;!ELEMENT content (#PCDATA)&gt;<\/span><\/span><\/div>\n<p><\/strong><\/div>\n<\/blockquote>\n<div>\n<p style=\"margin-top: 0.5em; margin-right: 0px; margin-bottom: 0.7em; margin-left: 0px; text-indent: 2em; line-height: 1.5em; padding: 0px;\">&lt;!ELEMENT\u00a0messages\u00a0(message+)&gt;\u4e2d\uff0b\u53f7\u8868\u793a\u7559\u8a00\u5217\u8868\u4e2d\u81f3\u5c11\u6709\u4e00\u6761\u7559\u8a00\uff0c\u4f46\u5b9e\u9645\u5e94\u7528\u53ef\u80fd\u4f1a\u51fa\u73b0\u6ca1\u6709\u7559\u8a00\u7684\u60c5\u51b5\uff0c\u4e3a\u4e86\u5e94\u5bf9\u8fd9\u79cd\u60c5\u51b5\uff0c\u6211\u5728\u8f93\u51faXML\u6587\u6863\u7684ASP\u7a0b\u5e8f\u8f93\u51fa\u4e00\u6761\u7cfb\u7edf\u4ea7\u751f\u7684\u7559\u8a00\uff0c\u63d0\u793a\u76ee\u524d\u8fd8\u6ca1\u6709\u7559\u8a00\u3002<\/p>\n<p style=\"margin-top: 0.5em; margin-right: 0px; margin-bottom: 0.7em; margin-left: 0px; text-indent: 2em; line-height: 1.5em; padding: 0px;\">\u63a5\u4e0b\u6765\u662f\u5f88\u91cd\u8981\u7684\u90e8\u5206\uff0cXSL\u7684\u7f16\u5199\u4e86\u3002<\/p>\n<p style=\"margin-top: 0.5em; margin-right: 0px; margin-bottom: 0.7em; margin-left: 0px; text-indent: 2em; line-height: 1.5em; padding: 0px;\"><strong style=\"font-style: inherit; font-weight: bold;\">XSL\u6587\u6863gbook.xsl<\/strong><\/p>\n<p style=\"margin-top: 0.5em; margin-right: 0px; margin-bottom: 0.7em; margin-left: 0px; text-indent: 2em; line-height: 1.5em; padding: 0px;\"><a style=\"color: #0066cc; text-decoration: none;\" rel=\"external\" href=\"http:\/\/home.goofar.com\/hotheart\/gbook\/gbook.xsl\">\u70b9\u51fb\u8fd9\u91cc\u67e5\u770bXSL\u6587\u6863gbook.xsl<\/a><\/p>\n<p style=\"margin-top: 0.5em; margin-right: 0px; margin-bottom: 0.7em; margin-left: 0px; text-indent: 2em; line-height: 1.5em; padding: 0px;\">\u5728\u5b9a\u4e49XSL\u540d\u79f0\u7a7a\u95f4\u65f6\uff0c\u5e94\u8be5\u7528http:\/\/www.w3.org\/1999\/XSL\/Transform\uff0c\u5373<\/p>\n<p style=\"margin-top: 0.5em; margin-right: 0px; margin-bottom: 0.7em; margin-left: 0px; text-indent: 2em; line-height: 1.5em; padding: 0px;\"><strong style=\"font-style: inherit; font-weight: bold;\">&lt;xsl:stylesheet\u00a0xmlns:xsl=\"http:\/\/www.w3.org\/1999\/XSL\/Transform\"\u00a0version=\"1.0\"&gt;<\/strong><\/p>\n<p style=\"margin-top: 0.5em; margin-right: 0px; margin-bottom: 0.7em; margin-left: 0px; text-indent: 2em; line-height: 1.5em; padding: 0px;\">\u800c\u4e0d\u80fd\u7528http:\/\/www.w3.org\/TR\/WD-xsl\uff0c\u4e0d\u77e5\u4e3a\u4ec0\u4e48\u5982\u679c\u4f7f\u7528\u8fd9\u4e2a\u540d\u79f0\u7a7a\u95f4\uff0c\u5728Firefox\u4f1a\u663e\u793a\u9519\u8bef\uff1a\u5206\u6790\u00a0XSLT\u00a0\u6837\u5f0f\u8868\u5355\u5931\u8d25\u3002<\/p>\n<p style=\"margin-top: 0.5em; margin-right: 0px; margin-bottom: 0.7em; margin-left: 0px; text-indent: 2em; line-height: 1.5em; padding: 0px;\">\u5728XSL\u91cc\uff0c\u4e00\u4e2a\u5f88\u91cd\u8981\u7684\u6982\u5ff5\u5c31\u662f\u6a21\u677f\u3002\u4e00\u4e2a\u6a21\u677f\u5c31\u5bf9\u5e94\u4e00\u5757\u5185\u5bb9\u7684\u683c\u5f0f\u5316\u8f93\u51fa\uff0c\u5728\u6784\u5efa\u6a21\u677f\u65f6\uff0c\u53ef\u4ee5\u4ece\u5927\u5230\u5c0f\uff0c\u5373\u5148\u6784\u5efa\u5168\u5c40\u7684\u6a21\u677f\uff0c\u7136\u540e\u518d\u5904\u7406\u6bcf\u4e00\u5757\u7ec6\u5206\u7684\u5185\u5bb9\uff0c\u4e5f\u53ef\u4ee5\u4ece\u5c0f\u5230\u5927\uff0c\u5148\u6784\u5efa\u597d\u7ec6\u5206\u5185\u5bb9\u7684\u6a21\u677f\uff0c\u7136\u540e\u5c06\u5b83\u4eec\u7ec4\u5408\u8d77\u6765\u5f62\u6210\u6574\u4f53\u7684\u6a21\u677f\u3002\u5728XSL\u91cc\uff0c\u521b\u5efa\u4e00\u4e2a\u6a21\u677f\u4f7f\u7528\u4e0b\u9762\u7684\u6807\u8bb0\uff1a<\/p>\n<p style=\"margin-top: 0.5em; margin-right: 0px; margin-bottom: 0.7em; margin-left: 0px; text-indent: 2em; line-height: 1.5em; padding: 0px;\"><strong style=\"font-style: inherit; font-weight: bold;\">&lt;xsl:template\u00a0match=\"\/gbook\"&gt;<\/strong><\/p>\n<p><strong style=\"font-style: inherit; font-weight: bold;\"><\/p>\n<p style=\"margin-top: 0.5em; margin-right: 0px; margin-bottom: 0.7em; margin-left: 0px; text-indent: 2em; line-height: 1.5em; padding: 0px;\">&lt;!--\u00a0\u6a21\u677f\u5185\u5bb9\u00a0--&gt;<\/p>\n<p><\/strong><\/p>\n<p style=\"margin-top: 0.5em; margin-right: 0px; margin-bottom: 0.7em; margin-left: 0px; text-indent: 2em; line-height: 1.5em; padding: 0px;\"><strong style=\"font-style: inherit; font-weight: bold;\">&lt;\/xsl:template&gt;<\/strong><\/p>\n<p style=\"margin-top: 0.5em; margin-right: 0px; margin-bottom: 0.7em; margin-left: 0px; text-indent: 2em; line-height: 1.5em; padding: 0px;\">\u5176\u4e2dmatch\u8868\u793a\u7684\u662f\u8fd9\u4e2a\u6a21\u677f\u5bf9\u5e94\u90a3\u4e2a\u6807\u8bb0\u3002<\/p>\n<p style=\"margin-top: 0.5em; margin-right: 0px; margin-bottom: 0.7em; margin-left: 0px; text-indent: 2em; line-height: 1.5em; padding: 0px;\">\u4f7f\u7528\u6a21\u677f\u6709\u4e24\u79cd\u65b9\u6cd5\uff1a<\/p>\n<p style=\"margin-top: 0.5em; margin-right: 0px; margin-bottom: 0.7em; margin-left: 0px; text-indent: 2em; line-height: 1.5em; padding: 0px;\">\u7b2c\u4e00\u79cd\u662f\u76f4\u63a5\u5e94\u7528\uff1a<\/p>\n<p style=\"margin-top: 0.5em; margin-right: 0px; margin-bottom: 0.7em; margin-left: 0px; text-indent: 2em; line-height: 1.5em; padding: 0px;\"><strong style=\"font-style: inherit; font-weight: bold;\">&lt;xsl:apply-templates\u00a0select=\"info\"\/&gt;<\/strong><\/p>\n<p style=\"margin-top: 0.5em; margin-right: 0px; margin-bottom: 0.7em; margin-left: 0px; text-indent: 2em; line-height: 1.5em; padding: 0px;\">\u8fd9\u79cd\u65b9\u6cd5\u662f\u9009\u62e9\u5f53\u524d\u6807\u8bb0\u4e0b\u7684info\u6807\u8bb0\u5e76\u4f7f\u7528match\u4e3ainfo\u7684\u6a21\u677f\u8fdb\u884c\u5904\u7406<\/p>\n<p style=\"margin-top: 0.5em; margin-right: 0px; margin-bottom: 0.7em; margin-left: 0px; text-indent: 2em; line-height: 1.5em; padding: 0px;\">\u7b2c\u4e8c\u79cd\u662f\u5faa\u73af\u9009\u62e9\uff1a<\/p>\n<p style=\"margin-top: 0.5em; margin-right: 0px; margin-bottom: 0.7em; margin-left: 0px; text-indent: 2em; line-height: 1.5em; padding: 0px;\"><strong style=\"font-style: inherit; font-weight: bold;\">&lt;xsl:for-each\u00a0select=\"message\"&gt;<\/strong><\/p>\n<p><strong style=\"font-style: inherit; font-weight: bold;\"><\/p>\n<p style=\"margin-top: 0.5em; margin-right: 0px; margin-bottom: 0.7em; margin-left: 0px; text-indent: 2em; line-height: 1.5em; padding: 0px;\">&lt;!--\u00a0\u6a21\u677f\u5185\u5bb9\u00a0--&gt;<\/p>\n<p><\/strong><\/p>\n<p style=\"margin-top: 0.5em; margin-right: 0px; margin-bottom: 0.7em; margin-left: 0px; text-indent: 2em; line-height: 1.5em; padding: 0px;\"><strong style=\"font-style: inherit; font-weight: bold;\">&lt;\/xsl:for-eace&gt;<\/strong><\/p>\n<p style=\"margin-top: 0.5em; margin-right: 0px; margin-bottom: 0.7em; margin-left: 0px; text-indent: 2em; line-height: 1.5em; padding: 0px;\">\u5728\u5faa\u73af\u9009\u62e9\u4e2d\uff0c\u6a21\u677f\u76f4\u63a5\u5199\u5728for-each\u4e4b\u4e2d\uff0c\u4f46\u662f\u5f53\u524d\u4e0a\u4e0b\u6587\u5df2\u7ecf\u8f6c\u5230message\u3002<\/p>\n<p style=\"margin-top: 0.5em; margin-right: 0px; margin-bottom: 0.7em; margin-left: 0px; text-indent: 2em; line-height: 1.5em; padding: 0px;\">\u81f3\u4e8e\u5728select\u4e2d\u4f7f\u7528\u7684\u8868\u8fbe\u5f0f\uff0c\u5c5e\u4e8eXPath\u90e8\u5206\uff0c\u53ef\u4ee5\u53c2\u8003<a style=\"color: #0066cc; text-decoration: none;\" rel=\"external\" href=\"http:\/\/www.w3.org\/TR\/xpath\">W3C\u7684XPath\u6587\u6863(XML\u00a0Path\u00a0Language)<\/a><\/p>\n<p style=\"margin-top: 0.5em; margin-right: 0px; margin-bottom: 0.7em; margin-left: 0px; text-indent: 2em; line-height: 1.5em; padding: 0px;\">\u5728gbook.xsl\u4e2d\u8fd8\u4f7f\u7528\u5230\u7684\u6807\u8bb0\u6709\uff1a<\/p>\n<p style=\"margin-top: 0.5em; margin-right: 0px; margin-bottom: 0.7em; margin-left: 0px; text-indent: 2em; line-height: 1.5em; padding: 0px;\"><strong style=\"font-style: inherit; font-weight: bold;\">&lt;xsl:value-of\u00a0select=\"content\"\/&gt;<\/strong><\/p>\n<p style=\"margin-top: 0.5em; margin-right: 0px; margin-bottom: 0.7em; margin-left: 0px; text-indent: 2em; line-height: 1.5em; padding: 0px;\">\u8fd9\u662f\u5728XSL\u4e2d\u5e38\u7528\u7684\u6807\u8bb0\u4e4b\u4e00\uff0c\u8f93\u51fa\u7ed3\u679c\u662f\u9009\u62e9\u8282\u70b9\u7684\u503c\uff0c\u901a\u8fc7\u7528\u5b83\u6765\u8f93\u51fa\u8282\u70b9\u7684\u503c\uff0c\u5728\u8fd9\u4e2a\u7559\u8a00\u672c\u4e2d\uff0c\u5b83\u7528\u6765\u8f93\u51fa\u7528\u6237\u540d\u3001\u7559\u8a00\u8005\u59d3\u540d\u3001\u7559\u8a00\u5185\u5bb9\u7b49\u3002<\/p>\n<p style=\"margin-top: 0.5em; margin-right: 0px; margin-bottom: 0.7em; margin-left: 0px; text-indent: 2em; line-height: 1.5em; padding: 0px;\"><strong style=\"font-style: inherit; font-weight: bold;\">&lt;xsl:attribute\u00a0name=\"href\"&gt;gbook.asp?page=1&lt;\/xsl:attribute&gt;<\/strong><\/p>\n<p style=\"margin-top: 0.5em; margin-right: 0px; margin-bottom: 0.7em; margin-left: 0px; text-indent: 2em; line-height: 1.5em; padding: 0px;\">\u7528\u6765\u7ed9\u5f53\u524d\u6807\u7b7e\u6dfb\u52a0\u4e00\u4e2a\u5c5e\u6027\uff0c\u5728\u7559\u8a00\u7c3f\u4e2d\u7528\u6765\u7ed9\u5206\u9875\u5bfc\u822a\u6dfb\u52a0\u7f51\u5740\u3002\u5176\u4e2d<strong style=\"font-style: inherit; font-weight: bold;\">name]<\/strong>\u5c5e\u6027\u8868\u793a\u8981\u6dfb\u52a0\u5c5e\u6027\u7684\u540d\u5b57\uff0c\u6807\u8bb0\u5305\u542b\u7684\u5185\u5bb9\u4e3a\u8981\u6dfb\u52a0\u5c5e\u6027\u7684\u503c\u3002<\/p>\n<p style=\"margin-top: 0.5em; margin-right: 0px; margin-bottom: 0.7em; margin-left: 0px; text-indent: 2em; line-height: 1.5em; padding: 0px;\"><strong style=\"font-style: inherit; font-weight: bold;\">&lt;xsl:if\u00a0test=\"id!='\"&gt;&lt;!--\u00a0\u5904\u7406\u5185\u5bb9\u00a0--&gt;&lt;\/xsl:if&gt;<\/strong><\/p>\n<p style=\"margin-top: 0.5em; margin-right: 0px; margin-bottom: 0.7em; margin-left: 0px; text-indent: 2em; line-height: 1.5em; padding: 0px;\">\u5224\u65adtest\u4e2d\u7684\u8868\u8fbe\u793a\u7ed3\u679c\uff0c\u5982\u679c\u4e3a\u771f\u5219\u5904\u7406\u5305\u542b\u7684\u5185\u5bb9\uff0c\u5047\u5219\u5ffd\u7565\u3002\u8981\u6ce8\u610f\u662f\uff0c\u5982\u679c\u662f\u5224\u65ad\u5c0f\u4e8e\uff0c\u5c31\u4e0d\u80fd\u7528\u201c&lt;\u201d\uff0c\u800c\u5e94\u8be5\u7528\u201c&amp;lt;\u201d\uff0c\u56e0\u4e3a\u201c&lt;\u201d\u662f\u6807\u7b7e\u8d77\u59cb\u6807\u5fd7\uff0c\u5982\u679c\u4e0d\u8fdb\u884c\u8f6c\u6362\u5219\u5728\u6d4f\u89c8\u5668\u4e2d\u4f1a\u51fa\u73b0\u9519\u8bef\u3002<\/p>\n<p style=\"margin-top: 0.5em; margin-right: 0px; margin-bottom: 0.7em; margin-left: 0px; text-indent: 2em; line-height: 1.5em; padding: 0px;\">\u7136\u540e\u5c31\u662fASP\u8f93\u51fa\u7559\u8a00\u7c3f\u9700\u8981\u7684XML\u6587\u6863\u4e86\uff0c\u8fd9\u4e2a\u53ea\u8981\u6309\u7167\u524d\u9762\u5b9a\u4e49\u7684\u683c\u5f0f\uff0c\u4ece\u6570\u636e\u5e93\u4e2d\u8bfb\u53d6\u8bb0\u5f55\u6309\u7167\u6a21\u677f\u8f93\u51fa\u5373\u53ef\uff0c\u4e0d\u8fc7\u9700\u8981\u5728\u8f93\u51fa\u4e4b\u524d\u5b9a\u4e49MIME\u7c7b\u578b\uff1a<\/p>\n<p style=\"margin-top: 0.5em; margin-right: 0px; margin-bottom: 0.7em; margin-left: 0px; text-indent: 2em; line-height: 1.5em; padding: 0px;\"><strong style=\"font-style: inherit; font-weight: bold;\">Response.ContentType=\"application\/xml\"<\/strong><\/p>\n<p style=\"margin-top: 0.5em; margin-right: 0px; margin-bottom: 0.7em; margin-left: 0px; text-indent: 2em; line-height: 1.5em; padding: 0px;\">\u6307\u660e\u8fd9\u662f\u4e00\u4e2aXML\u6587\u6863\u3002\u53e6\u5916\uff0c\u56e0\u4e3a\u6574\u4e2a\u7559\u8a00\u7c3f\u90fd\u4f7f\u7528\u7684UTF-8\u7f16\u7801\uff0c\u9700\u8981\u5728ASP\u4e2d\u6307\u5b9a\u7f16\u7801\uff1a<\/p>\n<p style=\"margin-top: 0.5em; margin-right: 0px; margin-bottom: 0.7em; margin-left: 0px; text-indent: 2em; line-height: 1.5em; padding: 0px;\"><strong style=\"font-style: inherit; font-weight: bold;\">CodePage=\"65001\"<\/strong><\/p>\n<p style=\"margin-top: 0.5em; margin-right: 0px; margin-bottom: 0.7em; margin-left: 0px; text-indent: 2em; line-height: 1.5em; padding: 0px;\">\u8fd9\u53e5\u5e94\u8be5\u653e\u5728ASP\u6587\u4ef6\u7684\u5f00\u5934\u3002<\/p>\n<p style=\"margin-top: 0.5em; margin-right: 0px; margin-bottom: 0.7em; margin-left: 0px; text-indent: 2em; line-height: 1.5em; padding: 0px;\">\u6700\u540e\u8fd8\u6709CSS\uff0c\u8fd9\u4e2a\u5c5e\u4e8e\u5b9a\u4e49\u7559\u8a00\u7c3f\u7684\u663e\u793a\u6548\u679c\u4e86\uff0c\u5177\u4f53\u53ef\u4ee5<a style=\"color: #0066cc; text-decoration: none;\" rel=\"external\" href=\"http:\/\/home.goofar.com\/hotheart\/gbook\/gbook.css\">\u67e5\u770bCSS\u7684\u5185\u5bb9<\/a>\u3002\u53e6\u5916\uff0c\u4e3a\u4e86\u9632\u6b62\u7528\u6237\u8bef\u64cd\u4f5c\u63d0\u4ea4\u4e86\u7a7a\u8868\u5355\uff0c\u6211\u5728\u5ba2\u6237\u7aef\u52a0\u4e86\u4e00\u6bb5JS\u4ee3\u7801\u6765\u68c0\u67e5\u7559\u8a00\u59d3\u540d\u548c\u7559\u8a00\u5185\u5bb9\u662f\u5426\u4e3a\u7a7a\uff0c\u5982\u679c\u4e3a\u7a7a\u5219\u63d0\u793a\u7528\u6237\u5e76\u505c\u6b62\u63d0\u4ea4\u8868\u5355\uff0c\u5177\u4f53\u5185\u5bb9\u53ef\u4ee5<a style=\"color: #0066cc; text-decoration: none;\" rel=\"external\" href=\"http:\/\/home.goofar.com\/hotheart\/gbook\/gbook.js\">\u67e5\u770bJS\u811a\u672c\u6587\u4ef6<\/a>\u3002<\/p>\n<p style=\"margin-top: 0.5em; margin-right: 0px; margin-bottom: 0.7em; margin-left: 0px; text-indent: 2em; line-height: 1.5em; padding: 0px;\"><a style=\"color: #0066cc; text-decoration: none;\" rel=\"external\" href=\"http:\/\/home.goofar.com\/hotheart\/gbook\/SXGB.rar\"><strong style=\"font-style: inherit; font-weight: bold;\">\u5b8c\u6574\u7559\u8a00\u7c3f\u7cfb\u7edfSXGB\u6253\u5305\u4e0b\u8f7d<\/strong><\/a><\/p>\n<p style=\"margin-top: 0.5em; margin-right: 0px; margin-bottom: 0.7em; margin-left: 0px; text-indent: 2em; line-height: 1.5em; padding: 0px;\">\u53c2\u8003\u8d44\u6599\uff1a<\/p>\n<p style=\"margin-top: 0.5em; margin-right: 0px; margin-bottom: 0.7em; margin-left: 0px; text-indent: 2em; line-height: 1.5em; padding: 0px;\">1.\u00a0XML\u53caWAP\u5f00\u53d1\u624b\u518c(\u674e\u5efa\u56fd\u7b49\u7f16\u8457)<\/p>\n<p style=\"margin-top: 0.5em; margin-right: 0px; margin-bottom: 0.7em; margin-left: 0px; text-indent: 2em; line-height: 1.5em; padding: 0px;\">2.\u00a0<a style=\"color: #0066cc; text-decoration: none;\" rel=\"external\" href=\"http:\/\/bbs.blueidea.com\/viewthread.php?tid=2399268\">xml\u00a0,xsl,css\u00a0\u4e4b\u4e71\u641e\u3002\u3002<\/a>(\u7ecf\u5178\u8bba\u575bjavapigpig)<\/p>\n<\/div>\n<p><\/span><\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u524d\u6bb5\u65f6\u95f4\u65e0\u610f\u95f4\u770b\u5230\u4e00\u4e2a\u535a\u5ba2\u7684RSS\u53ef\u4ee5\u7528XSL\u683c\u5f0f\u8f93\u51fa\u5e76\u4e14\u80fd\u5728Firefox\u91cc\u6d4f &hellip;<\/p>\n<p class=\"read-more\"><a href=\"https:\/\/xujiwei.com\/blog\/2006\/07\/make-a-gustbook-with-xml-xsl-css-asp\/\">\u7ee7\u7eed\u9605\u8bfb &raquo;<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[11],"tags":[18,70,67,69],"_links":{"self":[{"href":"https:\/\/xujiwei.com\/blog\/wp-json\/wp\/v2\/posts\/101"}],"collection":[{"href":"https:\/\/xujiwei.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/xujiwei.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/xujiwei.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/xujiwei.com\/blog\/wp-json\/wp\/v2\/comments?post=101"}],"version-history":[{"count":0,"href":"https:\/\/xujiwei.com\/blog\/wp-json\/wp\/v2\/posts\/101\/revisions"}],"wp:attachment":[{"href":"https:\/\/xujiwei.com\/blog\/wp-json\/wp\/v2\/media?parent=101"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/xujiwei.com\/blog\/wp-json\/wp\/v2\/categories?post=101"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/xujiwei.com\/blog\/wp-json\/wp\/v2\/tags?post=101"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}