Variable not working as expected?

Please support our XML, XSLT and XPATH advertiser: Intel Parallel Studio Home
Reply

Join Date: Oct 2009
Posts: 1
Reputation: TeckniX is an unknown quantity at this point 
Solved Threads: 0
TeckniX TeckniX is offline Offline
Newbie Poster

Variable not working as expected?

 
0
  #1
31 Days Ago
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>
Reply With Quote Quick reply to this message  
Reply

Tags
link, template, variable, xslt

Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC