Hi Peter,

On 26/04/13 07:43, peter winstanley wrote:
> 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
> ]

That's exactly what I was trying to do, but I get the error I was 
describing in my first post.

In fact when I take the exact same form I served in the xquery (where it 
worked) preceded by the processing instruction like so:

   <?xml-stylesheet type="text/xsl" href="../xsltforms/xsltforms.xsl"?>

<!-- the path to xsltforms.xsl is the same as in the xquery -->

<!-- what follows is the xform, also as in the xquery -->

   <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"; >

      ....

and everything is in a file (in the database) xforms_example.xhtml
then I always get the error I described in my first post when I point 
the browser to this file.

I also disabled betterforms, as described in the wiki.

However your solution is a useful workaround - but it probably should 
work this way too :(

Ingrid


>> -----Original Message----- From: [email protected] Sent: Thu, 25 Apr
>> 2013 14:38:14 +0200 To: [email protected] 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:* [email protected]
>>> *Sent:* Tue, 23 Apr 2013 12:29:53 +0200 *To:* [email protected]
>>> *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
>
>


-- 
Ingrid Falk
Ingénieur de Recherche
Logoscope @ LiLPa (Linguistique, Langue, Paroles)
Université de Strasbourg

------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr
_______________________________________________
Xsltforms-support mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xsltforms-support

Reply via email to