Re: [Xsltforms-support] using xsltforms inside eXist-db
Brought to you by:
alain-couthures
From: peter w. <p....@in...> - 2013-04-24 21:17:53
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD><META http-equiv=Content-Type content="text/html; charset=utf-8"><META content="INBOX.COM" name=GENERATOR></HEAD> <BODY> Hi Ingrid<br>I use XQuery to serve up my (x)html Xforms pages using XSLTForms as follows<br> <div><br>1/ prevent the built in Betterform using<br>xquery version "3.0";<br>declare option exist:serialize "method=xhtml media-type=text/xml indent=yes process-xsl-pi=no";<br>let $attribute := request:set-attribute("betterform.filter.ignoreResponseBody", "true") <br><br>2/ prepare the xhtml xform<br>let $form :=<br><html xmlns="http://www.w3.org/1999/xhtml"<br> xmlns:xf="http://www.w3.org/2002/xforms" <br> xmlns:xs="http://www.w3.org/2001/XMLSchema" <br> xmlns:ev="http://www.w3.org/2001/xml-events" <br>etc .....<br><br>3/ set the processing instructions and the location of the stylesheet<br><br>let $xslt-pi := processing-instruction xml-stylesheet {'type="text/xsl" href="/exist/rest/db/apps/stats21/resources/xsltforms/xsltforms.xsl"'}<br>let $xslt-debug := processing-instruction xsltforms-options {'debug="no"'} <br><br>4/ output the xform preceded by the PI<br><br>return ($xslt-pi, $xslt-debug, $form)<br><br><br><br>Hope this helps<br><br>Cheers<br><br>Peter<br></div><br><br><blockquote style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px"><div class="msgHeaders">-----Original Message-----<br><b>From:</b> ala...@ag...<br><b>Sent:</b> Tue, 23 Apr 2013 12:29:53 +0200<br><b>To:</b> if...@un...<br><b>Subject:</b> Re: [Xsltforms-support] using xsltforms inside eXist-db<br><br></div><div class="oldBody"><div> <div _class="moz-cite-prefix"><br> </div> <blockquote cite="mid:517...@un..." type="cite"><br> Yes, I did something similar to what you showed in the screenshot and could GET config.xsl and transform.xsl manually. <br> <br> However I noticed that on your screenshot the xhtml file is in the same directory as xsltforms.xsl and config.xsl. <br> </blockquote> No, they are not. With IE debugger:<br> <br> <img src="cid:b1fe046a@9f11-46ba-8162-85567a42f264" alt=""><br> <blockquote cite="mid:517...@un..." type="cite"> <br> In the eXist-db setting I could not put my xhtml file into the same directory (application) as xsltforms.xsl - I suppose it would work, if I could. <br> </blockquote> I am convince it should work even if they are not in the same folder.<br> <br> -Alain<br> </div></div></blockquote> <hr size="1px" noshade style="clear:both;margin-top:10px;height:1px;"> <div style="font:12px Verdana,sans-serif;color:Black;background:white;padding:3px;line-height:1.3em"> <a href="http://www.inbox.com/smileys"><img src="http://my.inbox.com/img/ftrs/smileys.jpg" width="438" hight="73" alt="Smileys Preview" border="0" style="margin-bottom:10px" /></a><br> <nobr><strong><font color="2086c3">Get Free Smileys for Your IM & Email</font></strong> - Learn more at <a href="http://www.crawler.com/smileys">www.crawler.com/smileys</a></nobr><br> <nobr>Works with AIM<font size="-1"><sup>®</sup></font>, MSN<font size="-1"><sup>®</sup></font> Messenger, Yahoo!<font size="-1"><sup>®</sup></font> Messenger, ICQ<font size="-1"><sup>®</sup></font>, Google Talk<font size="-1"><sup>™</sup></font> and most webmails</nobr></div> </BODY> </HTML> |