Jump to content

XSL modifiying <head> tag


TheJoey

Recommended Posts

	<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"

 

 

Link to comment
Share on other sites

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>

 

Link to comment
Share on other sites

	

  
  
  
    
    
    
  

 

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.