I am able to create a regex to find and replace the a href link very easily; however, using regex in combination with a find and replace in XSL i am extremly novice.
I am wanting to replace the <description> a href:
Expand|Select|Wrap|Line Numbers
- a href='http://www.kyte.tv/ch/39174-flocam/185592-live-mobile-show'
Expand|Select|Wrap|Line Numbers
- a href='javascript:void(kyteplayer.setURI('{$URIVal}'))'
Expand|Select|Wrap|Line Numbers
- <item>
- <title>New Show: Live Mobile Show</title>
- <link>http://www.kyte.tv/ch/39174-flocam/185592-live-mobile-show</link>
- <guid>http://www.kyte.tv/ch/39174-flocam/185592-live-mobile-show</guid>
- <description><a href='http://www.kyte.tv/ch/39174-flocam/185592-live-mobile-show'><img src='http://media08.kyte.tv/store/005/08/crr/0808/02/23/689407-0-47639mobile_689407_120_90-tom-5000.jpg?aid=21808&h=44fade2ef70a4df7e890f5f77c87f5d9' title='Live Mobile Show' width='120' height='90' alt='Live Mobile Show' border='0'/></a><br>produced by tenofquad.</description>
- <pubDate>Sat, 02 Aug 2008 23:18:20 +0000</pubDate>
- <media:content url="http://www.kyte.tv/flash.swf?appKey=MarbachViewerEmbedded&uri=channels/39174/185592&layoutMode=default" fileSize="30" type="application/x-shockwave-flash" height="425" width="425" duration="1"/>
- <enclosure url="http://www.kyte.tv/flash.swf?appKey=MarbachViewerEmbedded&uri=channels/39174/185592&layoutMode=default" length="30" type="application/x-shockwave-flash"/>
- </item>
Expand|Select|Wrap|Line Numbers
- <xsl:template match="item">
- <xsl:variable name="item_link" select="link"/>
- <xsl:variable name="item_enclosure" select="enclosure/@url"/>
- <xsl:variable name="item_title" select="description"/>
- <xsl:variable name="item_media" select="media"/>
- <xsl:variable name="afterURI">
- <xsl:value-of select = "substring-after($item_enclosure, '&uri=')" />
- </xsl:variable>
- <xsl:variable name="URIVal">
- <xsl:choose>
- <xsl:when test="contains($afterURI, '&')">
- <xsl:value-of select="substring-before($afterURI, '&')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$afterURI"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <div class="subHead" style="width:500px;">
- <a href="javascript:void(kyteplayer.setURI('{$URIVal}'))"><xsl:value-of select="title" disable-output-escaping="yes"/></a></div>
- <div style="width:500px;">
- <xsl:value-of select="description" disable-output-escaping="yes"/><br/></div>
- (<xsl:value-of select="pubDate"/>)<br/> <hr/>
- </xsl:template>