【发布时间】:2011-05-03 22:10:37
【问题描述】:
对此非常感谢。
我想从外部 xml 文件的提要中删除某些节点,该文件已使用 xslt 设置样式。这是提要:http://www.wcwg.info/feeds/localevents.aspx?a=00392&p=CM159EH&m=20。
我要删除的节点是:
本地活动发布到 WhereCanWeGo.com.00392CM15 9EH31/10/1007/11/101000111111111111111111031 十月 2010http://www.wherecanwego.com/events/signin.aspxww.wherecanwego.com/events/signin.aspx
谁能指导我如何删除这些初始节点(参数)?它们是邮政编码、帐号、Feed URL 等。
我很想完成这件事,但这是最后的障碍!非常感谢任何回复的人......
样式表(片段)
<xsl:template match="/">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="item">
<div class="local_events">
<xsl:apply-templates select="title"/>
<xsl:apply-templates select="Venue"/>
<xsl:apply-templates select="Times"/>
<xsl:apply-templates select="Dates"/>
<xsl:apply-templates select="DetailsURL"/>
</div><div style="height:1px;border-bottom:1px dotted #cfcfcf;"></div>
</xsl:template>
<xsl:template match="title">
<h2><a class="title" target="_blank" rel="nofollow" href="{../DetailsURL}"><xsl:value-of select="."/></a></h2>
</xsl:template>
<xsl:template match="Venue">
<span>Location: </span>
<xsl:value-of select="."/>
<br />
</xsl:template>
<xsl:template match="Times">
<span>Details: </span>
<xsl:value-of select="."/>
<br />
</xsl:template>
<xsl:template match="Dates">
<span>Dates: </span>
<xsl:value-of select="."/>
</xsl:template>
<xsl:template match="DetailsURL">
<a style="font-weight:normal;margin-left:0.5em;" target="_blank" rel="nofollow" href="{.}"><xsl:text>Full details...</xsl:text></a>
</xsl:template>
【问题讨论】: