Connecting Tech Pros Worldwide Help | Site Map

XSLT concat what is wrong w/ the following

Newbie
 
Join Date: Aug 2009
Posts: 6
#1: Aug 5 '09
Expand|Select|Wrap|Line Numbers
  1. <xsl:param name="foostart" select=(xsl:value-of select="startdate")/>
  2.            <xsl:param name="fooend" select =(xsl:value-of select= "enddate")/>
  3.            <xs:param name="startend select=("concat($foostart,'-',$fooend)" />

and

Expand|Select|Wrap|Line Numbers
  1. <td><xsl:value-of select="concat(xsl:value-of select ="starttime","-", xsl:value-of select="endtime")"/></td>
Dormilich's Avatar
Moderator
 
Join Date: Aug 2008
Location: Leipzig, Germany
Posts: 3,629
#2: Aug 6 '09

re: XSLT concat what is wrong w/ the following


you didn’t quote properly.

the first 2 lines (resp. the attribute values) are not quoted at all, the 3rd one misses 1 and has a ( too much, the 4th one is not correctly nested (the attribute value goes from the first " to the next ")
Newbie
 
Join Date: Aug 2009
Posts: 6
#3: Aug 6 '09

re: XSLT concat what is wrong w/ the following


what would the correct lines be?

these aren't attributes ....but elements
Dormilich's Avatar
Moderator
 
Join Date: Aug 2008
Location: Leipzig, Germany
Posts: 3,629
#4: Aug 7 '09

re: XSLT concat what is wrong w/ the following


to give you an example
Expand|Select|Wrap|Line Numbers
  1. <xsl:param name="foostart" select="xsl:value-of select='startdate'"/>
this would be valid (though I don’t know, whether it’s what you want)
Newbie
 
Join Date: Aug 2009
Posts: 6
#5: Aug 13 '09

re: XSLT concat what is wrong w/ the following


<xsl:param name="startend" select=("concat($foostart,'-',$fooend))" />

what is the matter w/ this...and should this be a param or a variable?
Dormilich's Avatar
Moderator
 
Join Date: Aug 2008
Location: Leipzig, Germany
Posts: 3,629
#6: Aug 13 '09

re: XSLT concat what is wrong w/ the following


still not valid, omit the outmost parentheses.

whether this should be a variable or parameter depends on its use, refer to the specs for that.
Reply