944,144 Members | Top Members by Rank

Ad:
Oct 26th, 2009
0

Variable not working as expected?

Expand Post »
So I created a template for a simple link builder function.
Problem is, when I use it, I don't get the link, I get just the text.
Could anyone help me understand what I'm doing wrong?

Thanks!

XML, XSLT and XPATH Syntax (Toggle Plain Text)
  1. <xsl:variable name="ReadMore">
  2. <xsl:call-template name="linkBuilder" >
  3. <xsl:with-param name="linkID" select="format-number(@ID, '#,##0.#;-#,##0.#')" />
  4. </xsl:call-template>
  5. </xsl:variable>
  6. <xsl:value-of select="concat(substring(@Body,0,300),'...', $ReadMore)" disable-output-escaping="yes" />
And the function itself
XML, XSLT and XPATH Syntax (Toggle Plain Text)
  1. <xsl:template name="linkBuilder">
  2. <xsl:param name="linkID" />
  3. <a href="http://mysite.com/page_view.aspx?ID={$linkID}">[read more]</a>
  4. </xsl:template>
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
TeckniX is offline Offline
1 posts
since Oct 2009

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in XML, XSLT and XPATH Forum Timeline: Following XSLT Logic Not Working
Next Thread in XML, XSLT and XPATH Forum Timeline: Checking the date





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC