Putting an image URL in an image reference

I'm using Oxygen 10.x I have image urls that our users use that look like this: " https://www.mysite.com/image/button?color=orange&OwnerId=JoeSmith&size=large&background=white " When these URLs are opened, they pull in the right button based upon the owner, color, size, and background. If I try to use this image URL as-is in the image tag, I get an error because the "&" means the following word is treated as an HTML entity name such as © or &trade. So I changed the "&" in the URL to "&" Now I don't get an error, but I also don't get an image. Is there a way to modify this URL so it retrieves the right image using the syntax I'm using? I can't point to an image without using these parameters. -- Steve Matlock http://nohomeformyblog.blogspot.com/

On Fri, 29 Jan 2010 10:59:38 -0800, Steve Matlock <stephenmatlock@gmail.com> wrote:
I'm using Oxygen 10.x
I have image urls that our users use that look like this: " https://www.mysite.com/image/button?color=orange&OwnerId=JoeSmith&size=large&background=white "
When these URLs are opened, they pull in the right button based upon the owner, color, size, and background.
If I try to use this image URL as-is in the image tag, I get an error because the "&" means the following word is treated as an HTML entity name such as © or &trade.
So I changed the "&" in the URL to "&"
Now I don't get an error, but I also don't get an image.
Is there a way to modify this URL so it retrieves the right image using the syntax I'm using? I can't point to an image without using these parameters.
Try URL escaping instead of an entity. The ampersand is %26 in that scheme, the question mark is %3F, and the equals %3D. It's the hex value of the character, which you can always get from the Windows char utility. HTH! -- Jeremy H. Griffith, at Omni Systems Inc. <jeremy@omsys.com> http://www.omsys.com/

Hi Steve, The correct way to edit the image reference is with "&"'s escaped as "&" or "%26"'s so that the resulting XML is well formed. Oxygen relies very much on the image extension to see if an image is supported or not. In your case the image URL is just a PHP or CGI script delivering an image content so Oxygen cannot use the extension information and reports the image as unknown content type. The web browser probably applies an automatic detection process to know what type the embedded image belongs so that is probably why the DITA Open Toolkit XHTML transformation works. On the other hand, the PDF transformation which also seems to rely on file extensions does not process the image either. We'll try in the future to improve the image type detection in the Oxygen Author page. In the meantime there is a workaround, in the image URL add an additional parameter with an image extension based on the returned image content type. Example (if the image is JPEG): https://www.mysite.com/image/button?color=orange&OwnerId=JoeSmith&si... <https://www.mysite.com/image/button?color=orange&OwnerId=JoeSmith&size=large&background=white>&extension=.jpg Oxygen will use the last part of the URL to determine the extension and should display the image in the Author. At the same type the script which interprets the GET parameters should not mind an extra parameter. Regards, Radu -- Radu Coravu <oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger http://www.oxygenxml.com On 1/29/2010 8:59 PM, Steve Matlock wrote:
I'm using Oxygen 10.x
I have image urls that our users use that look like this: "https://www.mysite.com/image/button?color=orange&OwnerId=JoeSmith&size=large&background=white <https://www.mysite.com/image/button?color=orange&OwnerId=JoeSmith&size=large&background=white>"
When these URLs are opened, they pull in the right button based upon the owner, color, size, and background.
If I try to use this image URL as-is in the image tag, I get an error because the "&" means the following word is treated as an HTML entity name such as © or &trade.
So I changed the "&" in the URL to "&"
Now I don't get an error, but I also don't get an image.
Is there a way to modify this URL so it retrieves the right image using the syntax I'm using? I can't point to an image without using these parameters.
-- Steve Matlock http://nohomeformyblog.blogspot.com/
_______________________________________________ oXygen-user mailing list oXygen-user@oxygenxml.com http://www.oxygenxml.com/mailman/listinfo/oxygen-user
participants (3)
-
Jeremy H. Griffith
-
Radu Coravu
-
Steve Matlock