- From: Mark Birbeck <mark.birbeck@x-port.net>
- Date: Tue, 20 Sep 2005 14:34:03 +0100
- To: "'Catherine Poinsignon'" <catherine.poinsignon@lombard.lu>
- Cc: <www-forms@w3.org>
- Message-ID: <D75A9D48-1754-4E23-A5FA-0BAA1791DB5B@S009>
Catherine,
The technique you describe is formsPlayer only, as far as I know. It is also
quite old, and was a bit of a stop-gap; since then a much neater solution
has been proposed within the XForms Working Group, but since it involves a
change to xf:output it has been added to XForms 1.1.
The technique simply involves adding the @mediatype to xf:output:
<xf:output value="concat('resource/images/', projectstatus, '.gif')"
mediatype="image/*" />
This has been implemented in formsPlayer 2 -- which also allows you to
specify other media types, such as video -- and is used in the various
mapping demos (Google and Terraserver) that are described on the XForms
Wiki. A fuller description of the general technique is here:
<http://www.xforms-wiki.com/bin/view/Main/XformsDynamicUrls>
As you'll have noticed, the key thing about this approach is that it doesn't
rely on the HTML <img> tag, which the formsPlayer 1 'stop-gap' solution
does. However, whilst I can describe the whole approach for you, I'm afraid
I don't know which other processors have impemented this feature.
Regards,
Mark
Mark Birbeck
CEO
x-port.net Ltd.
e: Mark.Birbeck@x-port.net
t: +44 (0) 20 7689 9232
w: http://www.formsPlayer.com/
b: http://internet-apps.blogspot.com/
Download our XForms processor from
http://www.formsPlayer.com/
_____
From: www-forms-request@w3.org [mailto:www-forms-request@w3.org] On Behalf
Of Catherine Poinsignon
Sent: 20 September 2005 13:03
To: catherine.poinsignon@lombard.lu; www-forms@w3.org
Subject: Re: How to display an image depending on an intance data value
I have tried the following solution I've found on
http://www.codeproject.com/html/fP-and-weather-ws.asp (see step 4: Rendering
images)
but it does not work. I see on the screen the text <img
src="resource/images/green.gif"/>, not the image itself.
Could someone confirm that this only works with formsPlayer ?
.image
{
display: block;
}
...
<xforms:output class="image" value="concat('<img
src="resource/images/',projectstatus,'.gif"/>')">
</xforms:output>
I am working with Novell exteNd 5.2.1.
Thanks again,
Catherine
>>> "Catherine Poinsignon" <catherine.poinsignon@lombard.lu> 20/09/2005
11:24 >>>
Hi all,
I have a model that looks like this :
<xforms:model id="model_wsrp_rewrite_"
schema="resource/schema/schemadt.xsd">
<xforms:instance id="data_wsrp_rewrite_"
nweb:pageflow-replace-data="always"
nweb:primary-input-data="true">
<data xmlns="">
<record>
...
<projectstatus>green</projectstatus>
...
</record>
</data>
</xforms:instance>
</xforms:model>
Dependiing on the value of projectstatus, I want to display an image :
if projectstatus = "green", the image source is "images/green.gif"
if projectstatus = "red", the image source is "images/red.gif"
How can I do that in xFroms ?
Thanks in advance,
Catherine
Received on Tuesday, 20 September 2005 13:35:10 UTC