TheJoey Posted April 21, 2010 Share Posted April 21, 2010 <head> <xsl:variable name="var1" select="var1"/> <xsl:variable name="var2" select="var2"/> <title><xsl:value-of select="$var1,$var2" /></title> </head> it only seems to show var1 .. also if it would be possible to display vars we have are "var1" "var2" Quote Link to comment https://forums.phpfreaks.com/topic/199274-xsl-modifiying-tag/ Share on other sites More sharing options...
broseph Posted April 21, 2010 Share Posted April 21, 2010 one value of, one variable or concat <head> <xsl:variable name="var1" select="var1"/> <xsl:variable name="var2" select="var2"/> <title><xsl:value-of select="$var1" /><xsl:value-of select="$var2" /></title> </head> or <head> <xsl:variable name="var1" select="var1"/> <xsl:variable name="var2" select="var2"/> <title><xsl:value-of select="concat($var1,$var2)" /></title> <!-- or if you want the comma, you can add it to concat. concat takes an unlimited number of arguments <xsl:value-of select="concat($var1,',',$var2)" /> --> </head> Quote Link to comment https://forums.phpfreaks.com/topic/199274-xsl-modifiying-tag/#findComment-1045925 Share on other sites More sharing options...
Maq Posted April 21, 2010 Share Posted April 21, 2010 You have to use two separate value-of statements. Not sure if you literally wanted the comma between the two value, but if you do then uncomment the 'text' line. Not sure if you're using these variables anywhere else, in which case you would keep them in variables, but if not you can just use the value-of and select the var elements. Quote Link to comment https://forums.phpfreaks.com/topic/199274-xsl-modifiying-tag/#findComment-1045926 Share on other sites More sharing options...
TheJoey Posted April 21, 2010 Author Share Posted April 21, 2010 concat is a nice little trick thank you so much! Quote Link to comment https://forums.phpfreaks.com/topic/199274-xsl-modifiying-tag/#findComment-1045945 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.