Re: [Xsltforms-support] using xsltforms inside eXist-db
Brought to you by:
alain-couthures
From: peter w. <p....@in...> - 2013-04-26 05:43:45
|
Hi Ingrid You can also just create an XForm as an XML file and include the mapping to the xsltforms (/exist/apps/xsltforms/xsltforms.xsl in the default installation of eXist 2.0 with xsltforms installed with the package manager) but because Betterforms is installed by default you will need to make some global change to prevent that from intercepting the XForms tags. [see http://en.wikibooks.org/wiki/XRX/XSLTForms_and_eXist#Disabling_betterFORM_on_eXist_2.0_and_2.1 ] Hope this helps Peter > -----Original Message----- > From: if...@un... > Sent: Thu, 25 Apr 2013 14:38:14 +0200 > To: p....@in... > Subject: Re: [Xsltforms-support] using xsltforms inside eXist-db > > Thanks Peter, this way it worked for me too. > > Only I was trying to avoid having to learn the xquery language. > > How did you build the xform (the thing you put into the $form variable)? > Do you use xquery for that? > > If I would build the xform using Perl, I would need to build the xquery > wrapper around it (as in your example) and load it into eXist, is that > right? > > Thanks anyway, > > Ingrid > > On 24/04/13 23:17, peter winstanley wrote: >> Hi Ingrid >> I use XQuery to serve up my (x)html Xforms pages using XSLTForms as >> follows >> >> 1/ prevent the built in Betterform using >> xquery version "3.0"; >> declare option exist:serialize "method=xhtml media-type=text/xml >> indent=yes process-xsl-pi=no"; >> let $attribute := >> request:set-attribute("betterform.filter.ignoreResponseBody", "true") >> >> 2/ prepare the xhtml xform >> let $form := >> <html xmlns="http://www.w3.org/1999/xhtml" >> xmlns:xf="http://www.w3.org/2002/xforms" >> xmlns:xs="http://www.w3.org/2001/XMLSchema" >> xmlns:ev="http://www.w3.org/2001/xml-events" >> etc ..... >> >> 3/ set the processing instructions and the location of the stylesheet >> >> let $xslt-pi := processing-instruction xml-stylesheet {'type="text/xsl" >> href="/exist/rest/db/apps/stats21/resources/xsltforms/xsltforms.xsl"'} >> let $xslt-debug := processing-instruction xsltforms-options >> {'debug="no"'} >> >> 4/ output the xform preceded by the PI >> >> return ($xslt-pi, $xslt-debug, $form) >> >> >> >> Hope this helps >> >> Cheers >> >> Peter >> >> >> -----Original Message----- >> *From:* ala...@ag... >> *Sent:* Tue, 23 Apr 2013 12:29:53 +0200 >> *To:* if...@un... >> *Subject:* Re: [Xsltforms-support] using xsltforms inside eXist-db >> >> >>> >>> Yes, I did something similar to what you showed in the screenshot >>> and could GET config.xsl and transform.xsl manually. >>> >>> However I noticed that on your screenshot the xhtml file is in the >>> same directory as xsltforms.xsl and config.xsl. >> No, they are not. With IE debugger: >> >> >>> >>> 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. >> I am convince it should work even if they are not in the same >> folder. >> >> -Alain >> >> ------------------------------------------------------------------------ >> Smileys Preview <http://www.inbox.com/smileys> >> *Get Free Smileys for Your IM & Email* - Learn more at >> www.crawler.com/smileys <http://www.crawler.com/smileys> >> Works with AIM^® , MSN^® Messenger, Yahoo!^® Messenger, ICQ^® , Google >> Talk^™ and most webmails > > > -- > Ingrid Falk > Ingénieur de Recherche > Logoscope @ LiLPa (Linguistique, Langue, Paroles) > Université de Strasbourg ____________________________________________________________ GET FREE SMILEYS FOR YOUR IM & EMAIL - Learn more at http://www.inbox.com/smileys Works with AIM®, MSN® Messenger, Yahoo!® Messenger, ICQ®, Google Talk™ and most webmails |