【问题标题】:Apply XSL to RSS Feed将 XSL 应用于 RSS 源
【发布时间】:2009-09-30 18:28:23
【问题描述】:

我想在我的网站上显示来自 Feedburner 的 RSS 提要,但我也希望能够对其应用 XSLT。

是否可以在 XSLT 中获取 URL 而不是将链接添加到 XML 中的样式?

【问题讨论】:

    标签: xslt rss


    【解决方案1】:

    您可以使用 document 函数在样式表中加载外部 xml 文件。

    (评论后编辑)

    <xsl:template match="/">
      <xsl:apply-templates select="document("myurl.xml")/root" mode="extern"/>
    </xsl:template>
    
    <xsl:template match="root" mode="extern">
    Hello world
    </xsl:template>
    

    【讨论】:

    • 你能提供一个如何使用它来获取 url 的例子吗?
    猜你喜欢
    • 1970-01-01
    • 2011-08-16
    • 1970-01-01
    • 2023-03-23
    • 2011-08-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多