Subject: Re: [xsl] url query works with mozilla; not IE From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx> Date: Fri, 4 Jul 2003 12:07:29 +0100 |
Hi Bill, > I am trying all sorts of variations. Here is one that will not, but > not sure why? Am I making an obvious mistake/assumption? > > <img text="foo" alt="foo" src="translate('display.php?theimage={$myvar}','  	 ','')"></img> I don't know what $myvar is but the result of this is going to produce something that looks like: <img text="foo" alt="foo" src="translate('display.php?theimage=myvarvalue','  	 ','')" /> I think it's unlikely to give you what you want, since the URL in the src attribute isn't a valid URL. Probably you want the {}s around the call to the translate() function, which means that you have to concatenate the literal string 'display.php?theimage=' with the value of $myvar: <img text="foo" alt="foo" src="{translate(concat('display.php?theimage=', $myvar),'  	 ','')}"></img> Or, since you know that the string 'display.php?theimage=' doesn't contain any of the characters that you want to delete from the string, you may as well do what Jim suggested: <img text="foo" alt="foo" src="display.php?theimage={translate($myvar,'  	 ','')}"></img> Cheers, Jeni --- Jeni Tennison http://www.jenitennison.com/ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] url query works with mozi, David Carlisle | Thread | re: [xsl] url query works with mozi, "Braumüller, Hans" |
Re: [xsl] url query works with mozi, David Carlisle | Date | RE: [xsl] select in the <xsl:param , Américo Albuquerque |
Month |