[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: url query works with mozilla; not IE

Subject: Re: url query works with mozilla; not IE
From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx>
Date: Fri, 4 Jul 2003 12:07:29 +0100
url query php
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}','&#32;&#13;&#9;&#10;','')"></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','&#32;&#13;&#9;&#10;','')" />

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),'&#32;&#13;&#9;&#10;','')}"></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,'&#32;&#13;&#9;&#10;','')}"></img>

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.