I have one file xhtml that I want display on text area but before i must translate the xhtml tag to text, for example <xhtml:boby> must become </xhtml:body> for see it on text area.
I have two problem: The first is that I have try to do this submission <xforms:submission id="conversion" method="post" action="run" ref="instance('instance-xhtm2')" replace="instance" instance="instance-xhtm1"/> that should call one xpl that translate and put the result on instance-xhtm1 but don't work good The second is that with other example I have see that this xpl don't convert < or > to < or > don't know why becouse I have put some debug tag and the result was ok from this tag however I have post one example about my problem for expain me better problem1.zip |
Administrator
|
Try the saxon:serialize() function:
saxon:serialize(instance('instance-xhtm2'), 'html') -Erik On Sep 1, 2008, at 6:46 AM, simone123456 wrote: > > I have one file xhtml that I want display on text area but before i > must > translate the xhtml tag to text, for example <xhtml:boby> must become > &lt;/xhtml:body&gt; for see it on text area. > I have two problem: > The first is that I have try to do this submission <xforms:submission > id="conversion" method="post" action="run" ref="instance('instance- > xhtm2')" > replace="instance" instance="instance-xhtm1"/> that should call one > xpl that > translate and put the result on > instance-xhtm1 but don't work good > The second is that with other example I have see that this xpl don't > convert > < or > to &lt or &gt > don't know why becouse I have put some debug tag and the result was > ok from > this tag > > however I have post one example about my problem for expain me better > > > http://www.nabble.com/file/p19254993/problem1.zip problem1.zip > -- > View this message in context: http://www.nabble.com/convert-from-xhtml-to-text-tp19254993p19254993.html > Sent from the ObjectWeb OPS - Users mailing list archive at > Nabble.com. > > > -- > 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 > OW2 mailing lists service home page: http://www.ow2.org/wws Orbeon Forms - Web Forms for the Enterprise Done the Right Way http://www.orbeon.com/ -- 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 OW2 mailing lists service home page: http://www.ow2.org/wws |
thanks but <xforms:output value="saxon:serialize(instance('instance-xhtm2'), 'xhtml')" /> it's ok but if I have (my work) <xforms:textarea ref="saxon:serialize(instance('instance-xhtm2'), 'xhtml')" appearance="xxforms:autosize" incremental="false" > <xforms:label> </xforms:label> </xforms:textarea> give me this error A reference to a node (such as text, element, or attribute) is required in a binding. Attempted to bind to the invalid item type: class java.lang.String Simone -------- |
simone123456,
> thanks but <xforms:output > value="saxon:serialize(instance('instance-xhtm2'), 'xhtml')" /> it's > ok but if I have (my work) <xforms:textarea > ref="saxon:serialize(instance('instance-xhtm2'), 'xhtml')" > appearance="xxforms:autosize" incremental="false" > > <xforms:label> </xforms:label> > </xforms:textarea> > give me this error > A reference to a node (such as text, element, or attribute) is required in a > binding. Attempted to bind to the invalid item type: class java.lang.String As the error says - if you use ref="" to set the control content, you have to reference a node. The saxon:serialize function returns a String, so you can't ref that result. Does value="saxon:serialize(...)" instead of ref="" work? HTH florian -- 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 OW2 mailing lists service home page: http://www.ow2.org/wws |
Administrator
|
>> thanks but <xforms:output
No, you have to store the value into the node using xforms:setvalue or
>> value="saxon:serialize(instance('instance-xhtm2'), 'xhtml')" /> >> it's >> ok but if I have (my work) <xforms:textarea >> ref="saxon:serialize(instance('instance-xhtm2'), 'xhtml')" >> appearance="xxforms:autosize" incremental="false" > >> <xforms:label> </xforms:label> >> </xforms:textarea> >> give me this error > >> A reference to a node (such as text, element, or attribute) is >> required in a >> binding. Attempted to bind to the invalid item type: class >> java.lang.String > > As the error says - if you use ref="" to set the control content, you > have to reference a node. The saxon:serialize function returns a > String, > so you can't ref that result. Does value="saxon:serialize(...)" > instead > of ref="" work? xforms:bind/@calculate, and ref that node from the control. -Erik -- Orbeon Forms - Web Forms for the Enterprise Done the Right Way http://www.orbeon.com/ -- 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 OW2 mailing lists service home page: http://www.ow2.org/wws |
right now work, thanks |
Free forum by Nabble | Edit this page |