0

我正在尝试在我的 xslt 渲染站点中显示一个 facebook 登录按钮。

我放

<fb:loginbutton></fb:login-button> 

在 xslt 但我的页面只是呈现

<login-button></login-button> 

为什么,我能做些什么呢?

4

1 回答 1

1

我假设 loginbutton 而不是 login-button 是错字?你有完整的例子吗?

当我有这个 xml 时:

<test>hi</test>

而这个 xslt:

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
                xmlns:fb="http://www.facebook.com/2008/fbml" version="1.0">
   <xsl:output method="html" indent="yes"/>

   <xsl:template match="test">
      <html>
         <body>
            <fb:login-button>
            test
            </fb:login-button>
         </body>
      </html>
   </xsl:template>
</xsl:stylesheet>

我会得到以下结果:

<html xmlns:fb="http://www.facebook.com/2008/fbml">
  <body>
    <fb:login-button>
      test
    </fb:login-button>
  </body>
</html>
于 2010-11-18T15:44:08.843 回答