我使用XSLT轉換某些RSS XML供稿。基本上有兩種類型我編輯:XSLT樣式表修改以獲取轉換後消失的一些標籤
1. <rss><channel>some tags about the RSS<item></item></channel></rss>
2. <feed>some tags about the RSS<entry></entry></feed>
使用此樣式表。 (它從paths.xml文件中獲取一些文件)
<xsl:stylesheet version="1.0" xmlns:f="http://www.w3.org/2005/Atom" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/*">
<NEWrss>
<xsl:for-each select="file">
<xsl:apply-templates
select="document(.)/*//channel | document(.)/f:feed/f:entry">
<xsl:with-param name="file" select="."/>
</xsl:apply-templates>
</xsl:for-each>
</NEWrss>
</xsl:template>
在第一RSS我得到正確地<channel>
和第一<item>
之間標籤的輸出。這些是一些包含博客信息的標籤,如標題。
然而,第二個,這些標籤(在<feed>
和第一個<entry>
之間找到的博客的標題)在轉換後不見了。標籤正確顯示。
我的問題是我怎樣才能得到這些標籤呢?
像第二結構的送樣是http://feeds.feedburner.com/EFENPRESS-
謝謝。
那麼,每個源XML文檔是什麼,以及需要的確切輸出結果是什麼?其他的一切都只是噪音... –