Error in xforms:output

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Error in xforms:output

Taras Bahnyuk

I need to display some image and a hyperlink in xform.
For that purpose I was hoping to adapt a snippet from the examples code


<!-- Display the flag when a country is selected -->
                <xforms:group ref=".[country != '']">
                    <xforms:output mediatype="text/html" value="concat('<img src="/apps/xforms-controls/images/flags/', country, '-flag.gif"/>')"/>
                </xforms:group>

Which I had transformed into:

                    <xforms:output mediatype="text/html" value="concat('<img src="http://nlvdhy17:8080/exist/servlet/', @storagename"/>')"/>


But instead of the expected result receive an error:
        Fatal error: The value of attribute "value" associated with an element type "xforms:output" must not contain the '<' character.

Which I find fair but frustrating. Is there a way to solve this issue?

Thanks in advance for your help,

Taras


-- The information contained in this communication and any attachments is confidential and may be privileged, and is for the sole use of the intended recipient(s). Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please notify the sender immediately by replying to this message and destroy all copies of this message and any attachments. ASML is neither liable for the proper and complete transmission of the information contained in this communication, nor for any delay in its receipt.

--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Error in xforms:output

Daniel E. Renfer
Taras,

The answer is simple, yet annoying. You can't have the '<' due to XML
well-formedness issues, but you can replace it with &lt; It will be
properly decoded on output.

Once you do that, it'll probably start complaining about you "
characters. Replace those with &quot; and while you're at it, for
consistency, I would start using &gt; for > (although, I think that
one may be technically legal.)

Hope that helps.

--
Daniel E. Renfer
http://kronkltd.net/



On 7/12/07, Taras Bahnyuk <[hidden email]> wrote:

>
>
>
> I need to display some image and a hyperlink in xform.
> For that purpose I was hoping to adapt a snippet from the examples code
>
>
> <!-- Display the flag when a country is selected -->
>                 <xforms:group ref=".[country != '']">
>                     <xforms:output mediatype="text/html" value="concat('<img
> src="/apps/xforms-controls/images/flags/', country,
> '-flag.gif"/>')"/>
>                 </xforms:group>
>
> Which I had transformed into:
>
>                     <xforms:output mediatype="text/html" value="concat('<img
> src="http://nlvdhy17:8080/exist/servlet/',
> @storagename"/>')"/>
>
>
> But instead of the expected result receive an error:
>         Fatal error: The value of attribute "value" associated with an
> element type "xforms:output" must not contain the '<' character.
>
> Which I find fair but frustrating. Is there a way to solve this issue?
>
> Thanks in advance for your help,
>
> Taras
>  -- The information contained in this communication and any attachments is
> confidential and may be privileged, and is for the sole use of the intended
> recipient(s). Any unauthorized review, use, disclosure or distribution is
> prohibited. If you are not the intended recipient, please notify the sender
> immediately by replying to this message and destroy all copies of this
> message and any attachments. ASML is neither liable for the proper and
> complete transmission of the information contained in this communication,
> nor for any delay in its receipt.


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws