خرید بک لینک

Vote count: 0

I'm having a little issue with some XLST stripping out HTML tags in a podcast feed.

Can anyone suggest a way of doing this so that the field retus plain text data?

Here is my XSLT

<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" 
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
    xmlns:atom="http://www.w3.org/2005/Atom" 
    xmlns:cc="http://web.resource.org/cc/"
    xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"
    xmlns:libsyn="http://libsyn.com/rss-extension" 
    xmlns:media="http://search.yahoo.com/mrss/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 
    exclude-result-prefixes="atom cc itunes libsyn media rdf"
    xmlns:str="http://exslt.org/strings"
    extension-element-prefixes="str">       

    <xsl:output method="xml" encoding="UTF-8" indent="yes"/>
    <xsl:strip-space elements="*"/>
    <xsl:template match="/">
        <data>
            <entries>
                <xsl:apply-templates select="rss/chael/item"></xsl:apply-templates>
            </entries>
        </data>
    </xsl:template>

    <xsl:template match="item">
        <entry>
            <title><xsl:value-of select="title"/></title>
            <link><xsl:value-of select="link"/></link>
            <description><xsl:value-of select="description" disable-output-escaping="yes"/></description>
            <subtitle><xsl:value-of select="itunes:subtitle"/></subtitle>
            <originalpubDate><xsl:value-of select="pubDate"/></originalpubDate>
            <pubDate>
                <xsl:variable name="date-tokens" select="str:tokenize(pubDate, ' ' )" />
                <!-- year -->
                <xsl:value-of select="$date-tokens[4]" />
                <xsl:text>-</xsl:text>
                <!-- month -->
                <xsl:variable name="mmm" select="$date-tokens[3]" />
                <xsl:variable name="m" select="string-length(substring-before('JanFebMarAprMayJunJulAugSepOctNovDec', $mmm)) div 3 + 1" />
                <xsl:value-of select="format-number($m, '00')" />
                <xsl:text>-</xsl:text>  
                <!-- day -->
                <xsl:value-of select="format-number($date-tokens[2], '00')" />
                <xsl:text> </xsl:text>
                <!-- time -->
                <xsl:value-of select="$date-tokens[5]" />
            </pubDate>
            <explicit><xsl:value-of select="itunes:explicit"/></explicit>
            <podcastImage><xsl:value-of select="itunes:image/@href"/></podcastImage>
            <podcastURL><xsl:value-of select="enclosure/@url"/></podcastURL>
            <podcastLength><xsl:value-of select="enclosure/@length"/></podcastLength>
            <podcastDuration><xsl:value-of select="itunes:duration"/></podcastDuration>
            <premium>0</premium>
        </entry>
    </xsl:template>

</xsl:stylesheet>

Appreciate any guidance, I've got in a right muddle with it!

Simon

asked 1 min ago

برچسب: نویسنده: استخدام کار تاريخ: سه شنبه 31 فروردين 1395 ساعت: 0:34

صفحه بندی