Re: [Xsltforms-support] HTML preview option
Brought to you by:
alain-couthures
From: Alain C. <ala...@ag...> - 2023-04-20 16:06:49
|
<!doctype html> <html> <head> <meta charset="UTF-8"> </head> <body> <div> Hi Winona, </div> <div class="default-style"> </div> <div class="default-style"> Because the HTTP request is processed with XMLHttpRequest, the Javascript part of XSLTForms is looking at the response for a possible processing instruction and an XSLT stylesheet to be applied. </div> <div class="default-style"> </div> <div class="default-style"> I always use the browser debugger to precisely look at responses and, eventually, to set a breakpoint. </div> <div class="default-style"> </div> <div class="default-style"> In this case, it would start with one at "resp = XsltForms_browser.transformText(resp, xslhref, false);". </div> <div class="default-style"> </div> <div class="default-style"> Can you try this? </div> <div class="default-style"> </div> <div class="default-style"> --Alain </div> <blockquote type="cite"> <div> Le 19/04/2023 01:28 CEST, Winona Salesky <wsa...@gm...> a écrit : </div> <div> </div> <div> </div> <div dir="ltr"> Hi All, <div> I am building a preview HTML page for my form by POSTing my data to an xquery, which runs the XML through an XSLT which outputs in a new window using the following submit: </div> <div> <p style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-kerning: auto; font-feature-settings: normal; font-stretch: normal; font-size: 12px; line-height: normal; font-family: Helvetica; color: #993300;"><span style="color: #000096;"><xf:submission</span><span style="color: #f5844c;"> id</span><span style="color: #ff8040;">=</span>"s-view-html"<span style="color: #f5844c;"> ref</span><span style="color: #ff8040;">=</span>"instance('i-rec')"<span style="color: #f5844c;"> show</span><span style="color: #ff8040;">=</span>"new"<span style="color: #f5844c;"> replace</span><span style="color: #ff8040;">=</span>"all"<span style="color: #f5844c;"> instance</span><span style="color: #ff8040;">=</span>"i-submission"<span style="color: #f5844c;"> method</span><span style="color: #ff8040;">=</span>"post"<span style="color: #f5844c;"> action</span><span style="color: #ff8040;">=</span>"services/submit.xql?type=previewHTML"<span style="color: #000096;">/></span></p> <p style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-kerning: auto; font-feature-settings: normal; font-stretch: normal; font-size: 12px; line-height: normal; font-family: Helvetica; color: #993300;"><span style="color: #000096;"> </span></p> This works almost as expected, except, my HTML comes back slightly mangled. By that I mean, some divs are nested in other sibling divs. (I can provide the screen shots if needed.) This XSLT is used by my main website to output HTML, so I have something to compare it to, and the version run through the form is coming out incorrectly. I assume this has something to do with the output being run through the XSLTforms processor, preprocessing my returned HTML. Is there any way I can turn that off just for this view, so it does not touch the returned HTML file? </div> <div> Thanks for the help, </div> <div> -Winona </div> </div> _______________________________________________ Xsltforms-support mailing list Xsl...@li... https://lists.sourceforge.net/lists/listinfo/xsltforms-support </blockquote> </body> </html> |