logo       
Google Custom Search
    AddThis Social Bookmark Button

Re: Generating links in UI?: msg#00008

Subject: Re: Generating links in UI?
hello,

no instant solution here ( sure its important) but logically should be a xforms:trigger with a load action as child. then we have to find a way to transform this into target markup.

i hope we can slowly approach these details and fill the gaps in control support (itemset,copy,range,upload...) - til now we were more concentrated on the processing model.

any suggestions welcome.

Joern


Andrzej Jan Taramina wrote:
I've run into a problem trying to do something simple with XForms and Chiba.
I'm trying to create a link in the generated UI HTML, based on data coming from an instance document.

For example, if the instance document looks like this:

        <my>
                <doc>
                <name>doc1</name>
                <url>http://www.somedomain.com/document1.pdf</url>
                 </doc>
        </my>

I want to be able to generate the following HTML in the output sent to the browser:

        <a href="http://www.somedomain.com/document1.pdf";>doc1</a>

where the url and text came from the instance document.

I tried something like this in my XForms UI section:

        &lt;a href=&quot;
        <xforms:output xforms:ref="/my/doc/url">
        &quot;&gt;
        <xforms:output xforms:ref="/my/doc/name">
        &lt;/a&gt;

But the entities (&lt; etc) appear in the final html sent to the browser without being translated into the actual characters, and so does not produce the effect I need. Using CDATA sections does exactly the same thing, with the special characters showing up as the entities instead of the actual characters.

You can't do the simple thing of
                        <a href="<xforms:output 
xforms:ref='/my/doc/url'>">text</a>

Cause the XML parser croaks on that.

Is there a simple way of doing what I want using Chiba? Am I just being stunned and not seeing an obvious solution? I would think that this would be a common thing that many XForms based applications would want to do.

Thanks for any advice/assistance with this problem!





        
Andrzej Jan Taramina
Chaeron Corporation: Enterprise System Solutions
http://www.chaeron.com



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Chiba-developer mailing list
Chiba-developer-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@xxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/chiba-developer





-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf



Try Searching:
servers, voip, java, networking, microsoft ...
<Prev in Thread] Current Thread [Next in Thread>