Hi list,
there is a bug when calling xxforms:serialize with the html method: An instance filled with <div>This<br/>is<br/>a<br/>test</div> is printed as <div>This<br><br>is<br><br>a<br><br>test </div> resulting in way too much space between two lines. A test XForms document demonstrating the issue is attached. The same happens when putting such a structure into the HTML converter. Kind regards, Ralf -- 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 bug-demo.xhtml (505 bytes) Download Attachment |
Ralf,
it works with the xml or xhtml serialization method - not sure why, but it does :) fs -- 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 |
Hi Florian,
wow, weird - last time I tried these methods, they would output empty tags as, e.g., <a name="x"/>, and most browser would miss the closing tag. But now this really seems to work. Thanks a lot for the hint! Is there any difference between xhtml and xml? I chose the former now, since the page is written in the xhtml namespace, but on my test page I could not see any difference. Kind regards, Ralf Am Sonntag 24 Juli 2011, um 10:57:12 schrieb Florian Schmitt: > Ralf, > > it works with the xml or xhtml serialization method - not sure why, > but it does :) > > fs -- 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
|
There is a similar issue which we fixed a while back:
http://forge.ow2.org/tracker/index.php?func=detail&aid=315544&group_id=168&atid=350207 -Erik On Sun, Jul 24, 2011 at 2:14 AM, Ralf Jung <[hidden email]> wrote: > Hi Florian, > > wow, weird - last time I tried these methods, they would output empty tags as, > e.g., <a name="x"/>, and most browser would miss the closing tag. But now this > really seems to work. Thanks a lot for the hint! > Is there any difference between xhtml and xml? I chose the former now, since > the page is written in the xhtml namespace, but on my test page I could not > see any difference. > > Kind regards, > Ralf > > Am Sonntag 24 Juli 2011, um 10:57:12 schrieb Florian Schmitt: >> Ralf, >> >> it works with the xml or xhtml serialization method - not sure why, >> but it does :) >> >> fs > > > -- > 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 > > -- 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 |
In reply to this post by Ralf Jung
Hi again,
I had to switch the output method from xhtml to xml, without really knowing why - I am using this for the output of five different XSLT transformations, and for one of them, "xhtml" would again print double-br-tags. Then I got fed up with it and tried to understand what's actually happening. I changed the xforms:output and removed the serialize call there, instead using replace="text" in the submission. This worked fine, except for - you guess it - the handling of closing tags. All was fine when the content was initially loaded and sent with the initial HTML, but when it was loaded dynamically, closing tags would be omitted in cases where this is not allowed, e.g. for <a>-Tags. While digging through the Orbeon source code I was confronted with quite a mess of different serializers and whatnot, but I think I found the right place to fix the problem. With attached patch, everything seems to work fine here. I also understood why initially, I had these problems only when a link was present in the source code: The bug was not in xxforms:serialize, but in XFormsControl.getEscapedHTMLValue, which only works if it finds a "href" (or "src") attribute. But that one has been fixed in the mean time. This would all be so much easier if XML would be used everywhere, instead of innerHTML and whatnot... Kind regards, Ralf On Sunday 24 July 2011 11:14:31 Ralf Jung wrote: > Hi Florian, > > wow, weird - last time I tried these methods, they would output empty tags > as, e.g., <a name="x"/>, and most browser would miss the closing tag. But > now this really seems to work. Thanks a lot for the hint! > Is there any difference between xhtml and xml? I chose the former now, > since the page is written in the xhtml namespace, but on my test page I > could not see any difference. > > Kind regards, > Ralf > > Am Sonntag 24 Juli 2011, um 10:57:12 schrieb Florian Schmitt: > > Ralf, > > > > it works with the xml or xhtml serialization method - not sure why, > > but it does :) > > > > fs -- 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 0001-fix-closing-tags-in-xforms-output-a-has-to-be-printe.patch (6K) Download Attachment |
Hi list,
any feedback or comments for this problem/patch? Kind regards, Ralf On Sunday 21 August 2011 14:36:02 Ralf Jung wrote: > Hi again, > > I had to switch the output method from xhtml to xml, without really knowing > why - I am using this for the output of five different XSLT > transformations, and for one of them, "xhtml" would again print > double-br-tags. > > Then I got fed up with it and tried to understand what's actually > happening. I changed the xforms:output and removed the serialize call > there, instead using replace="text" in the submission. This worked fine, > except for - you guess it - the handling of closing tags. All was fine > when the content was initially loaded and sent with the initial HTML, but > when it was loaded dynamically, closing tags would be omitted in cases > where this is not allowed, e.g. for <a>-Tags. While digging through the > Orbeon source code I was confronted with quite a mess of different > serializers and whatnot, but I think I found the right place to fix the > problem. With attached patch, everything seems to work fine here. > I also understood why initially, I had these problems only when a link was > present in the source code: The bug was not in xxforms:serialize, but in > XFormsControl.getEscapedHTMLValue, which only works if it finds a "href" > (or "src") attribute. But that one has been fixed in the mean time. > > This would all be so much easier if XML would be used everywhere, instead > of innerHTML and whatnot... > > Kind regards, > Ralf > > On Sunday 24 July 2011 11:14:31 Ralf Jung wrote: > > Hi Florian, > > > > wow, weird - last time I tried these methods, they would output empty > > tags as, e.g., <a name="x"/>, and most browser would miss the closing > > tag. But now this really seems to work. Thanks a lot for the hint! > > Is there any difference between xhtml and xml? I chose the former now, > > since the page is written in the xhtml namespace, but on my test page I > > could not see any difference. > > > > Kind regards, > > Ralf > > > > Am Sonntag 24 Juli 2011, um 10:57:12 schrieb Florian Schmitt: > > > Ralf, > > > > > > it works with the xml or xhtml serialization method - not sure why, > > > but it does :) > > > > > > fs -- 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
|
Ralf,
Sorry we haven't looked at it yet. Do you have a workaround? -Erik On Sat, Sep 17, 2011 at 10:54 AM, Ralf Jung <[hidden email]> wrote: > Hi list, > > any feedback or comments for this problem/patch? > > Kind regards, > Ralf > > On Sunday 21 August 2011 14:36:02 Ralf Jung wrote: >> Hi again, >> >> I had to switch the output method from xhtml to xml, without really knowing >> why - I am using this for the output of five different XSLT >> transformations, and for one of them, "xhtml" would again print >> double-br-tags. >> >> Then I got fed up with it and tried to understand what's actually >> happening. I changed the xforms:output and removed the serialize call >> there, instead using replace="text" in the submission. This worked fine, >> except for - you guess it - the handling of closing tags. All was fine >> when the content was initially loaded and sent with the initial HTML, but >> when it was loaded dynamically, closing tags would be omitted in cases >> where this is not allowed, e.g. for <a>-Tags. While digging through the >> Orbeon source code I was confronted with quite a mess of different >> serializers and whatnot, but I think I found the right place to fix the >> problem. With attached patch, everything seems to work fine here. >> I also understood why initially, I had these problems only when a link was >> present in the source code: The bug was not in xxforms:serialize, but in >> XFormsControl.getEscapedHTMLValue, which only works if it finds a "href" >> (or "src") attribute. But that one has been fixed in the mean time. >> >> This would all be so much easier if XML would be used everywhere, instead >> of innerHTML and whatnot... >> >> Kind regards, >> Ralf >> >> On Sunday 24 July 2011 11:14:31 Ralf Jung wrote: >> > Hi Florian, >> > >> > wow, weird - last time I tried these methods, they would output empty >> > tags as, e.g., <a name="x"/>, and most browser would miss the closing >> > tag. But now this really seems to work. Thanks a lot for the hint! >> > Is there any difference between xhtml and xml? I chose the former now, >> > since the page is written in the xhtml namespace, but on my test page I >> > could not see any difference. >> > >> > Kind regards, >> > Ralf >> > >> > Am Sonntag 24 Juli 2011, um 10:57:12 schrieb Florian Schmitt: >> > > Ralf, >> > > >> > > it works with the xml or xhtml serialization method - not sure why, >> > > but it does :) >> > > >> > > fs > > > -- > 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 > > -- 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 |
Hi Erik,
yeah, the patch I attached to my original email. I attached it to this one as well. It fixes dynamic (AJAX) updates for xforms:output with a html mediatype: If the value of the control is, e.g., <a href="bla"/>, it will send a source code of <a href="bla"></a>. And for <br/>, it will send <br>. This is the same behaviour as for the initial content for that control, which is sent with the HTML markup, not as AJAX update. Kind regards, Ralf On Wednesday 21 September 2011 06:36:07 Erik Bruchez wrote: > Ralf, > > Sorry we haven't looked at it yet. Do you have a workaround? > > -Erik > > On Sat, Sep 17, 2011 at 10:54 AM, Ralf Jung <[hidden email]> wrote: > > Hi list, > > > > any feedback or comments for this problem/patch? > > > > Kind regards, > > Ralf > > > > On Sunday 21 August 2011 14:36:02 Ralf Jung wrote: > >> Hi again, > >> > >> I had to switch the output method from xhtml to xml, without really > >> knowing why - I am using this for the output of five different XSLT > >> transformations, and for one of them, "xhtml" would again print > >> double-br-tags. > >> > >> Then I got fed up with it and tried to understand what's actually > >> happening. I changed the xforms:output and removed the serialize call > >> there, instead using replace="text" in the submission. This worked fine, > >> except for - you guess it - the handling of closing tags. All was fine > >> when the content was initially loaded and sent with the initial HTML, > >> but when it was loaded dynamically, closing tags would be omitted in > >> cases where this is not allowed, e.g. for <a>-Tags. While digging > >> through the Orbeon source code I was confronted with quite a mess of > >> different serializers and whatnot, but I think I found the right place > >> to fix the problem. With attached patch, everything seems to work fine > >> here. I also understood why initially, I had these problems only when a > >> link was present in the source code: The bug was not in > >> xxforms:serialize, but in XFormsControl.getEscapedHTMLValue, which only > >> works if it finds a "href" (or "src") attribute. But that one has been > >> fixed in the mean time. > >> > >> This would all be so much easier if XML would be used everywhere, > >> instead of innerHTML and whatnot... > >> > >> Kind regards, > >> Ralf > >> > >> On Sunday 24 July 2011 11:14:31 Ralf Jung wrote: > >> > Hi Florian, > >> > > >> > wow, weird - last time I tried these methods, they would output empty > >> > tags as, e.g., <a name="x"/>, and most browser would miss the closing > >> > tag. But now this really seems to work. Thanks a lot for the hint! > >> > Is there any difference between xhtml and xml? I chose the former now, > >> > since the page is written in the xhtml namespace, but on my test page > >> > I could not see any difference. > >> > > >> > Kind regards, > >> > Ralf > >> > > >> > Am Sonntag 24 Juli 2011, um 10:57:12 schrieb Florian Schmitt: > >> > > Ralf, > >> > > > >> > > it works with the xml or xhtml serialization method - not sure why, > >> > > but it does :) > >> > > > >> > > fs > > > > -- > > 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 -- 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 0001-fix-closing-tags-in-xforms-output-a-has-to-be-printe.patch (6K) Download Attachment |
Free forum by Nabble | Edit this page |