Welcome to WebmasterWorld Guest from 54.234.8.146

Forum Moderators: bill & werty

Message Too Old, No Replies

editing link attributes in xsl

     

billygg

3:07 pm on Feb 11, 2005 (gmt 0)

10+ Year Member



hey guys, i have a question for someone out there, i did a search here for xsl, and couldnt find what i was looking for. recenty i became familiar with xsl. i have an xml reader that pulls feeds into html. within the script for this reader, it uses an xsl sheet to pull in the link, edit it (formating wise, font, color, spacing) then it pushes it out to the page. this is my question, being new to the xsl format. how do i change the link attributes in xsl before it gets pushed to the html page. here is a snippet of code.

<xsl:template match="/">
<xsl:for-each select="rss/channel/item">
<p>
<a href="{link}"><strong><xsl:value-of select="title" /></strong></a>
<xsl:value-of disable-output-escaping="yes" select="description" />
</p>
</xsl:for-each>
</xsl:template>

u can see where the link is pulled in, how do i edit the attributes on that link?

eurotrash

2:13 pm on Feb 13, 2005 (gmt 0)

10+ Year Member



Maybe look here [webmasterworld.com]. if that doesn't answer the question - or even help, try posting your question in that forum.

Sorry I can't be more help. I think all of us in this forum are just a bit thick - or maybe thats just me.

teaperson

5:06 pm on Feb 17, 2005 (gmt 0)

10+ Year Member



What do you mean by "attributes of the link?" I think what you mean is you want to add some sort of parameter to the href. You can do that by just adding it as static text.

For instance: <a href="{link}?from=xsl">

On the other hand, if you mean something else, please clarify.

I've been borrowing from [csmonitor.com...] to figure out XSL stuff.

 

Featured Threads

Hot Threads This Week

Hot Threads This Month