Forum Moderators: open

Message Too Old, No Replies

xpath stylesheet

         

laura2k

11:59 am on Jan 20, 2004 (gmt 0)



hello,

i have the following xpath stylesheet that prints news headlines like this:

<a href="link.com" target="_blank">headline</a>

can anyone please tell me how i can replace the " character with a ' character instead or just remove the character totally so that it prints like this:

<a href=link.com target=_blank>headline</a>

or

<a href='link.com' target='_blank'>headline</a>

<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
<xsl:template match="/">
<xsl:for-each select="moreovernews/article">
<xsl:choose>
<xsl:when expr="childNumber(this) > 5"></xsl:when>
<xsl:otherwise><A><xsl:attribute name="href"><xsl:value-of select="url"/></xsl:attribute><xsl:attribute name="target">_blank</xsl:attribute><xsl:value-of select="headline_text"/></A>,
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>

any help would be very much appreciated.

thanx in advanced.

Birdman

1:20 pm on Jan 24, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'm not much on XSL, but at first glance it looks like there is no way to change the quotes.

Just wondering, why do you need this change?

More info may help turn up an answer.