Re: [Xsltforms-support] saving to dynamic file name
Brought to you by:
alain-couthures
|
From: Sandra B. <sb...@lo...> - 2010-01-22 16:13:16
|
Alain,
I'm using the version of XSLTforms that comes with eXist in their 1.4 download. I don't have an external link because I was trying to put together a desktop form but I'll try to email it to you directly. I've also added Firebug. Thank you for the tips.
Sandy
>>> COUTHURES Alain <ala...@ag...> 1/21/2010 4:22:42 PM >>>
Sandy,
xf:resource is well supported in SVN build version (bugs have been fixed
about relative path support): is it the version you're using ?
Activating the debug mode (by <options><debug/></options> in config.xsl
in latest versions) can help you to see the effective uri for submission.
I usually use a browser debugger (such as FireBug) to locate in
Javascript instructions where the problem is (in XFSubmission class). Do
you have an external link to allow me to diagnose it ?
Thanks!
-Alain
> I'm trying to save my instance data into an XML file in Exist using the identifier field as filled out in the form. It works if I hard code the file name but if I try to use xf:resource to generate the file name, the form just gets stuck after I submit. I'd appreciate any suggestions. I'm new to this and not really a programmer so apologies if this is obvious.
>
> Thanks,
> Sandy
>
> hard coded:
> <!-- Saves the data to a file-->
> <xf:submission id="save-to-file" method="put" action="../webdav/db/nlu_test/test2.xml" replace="instance">
> <xf:toggle case="case-busy" ev:event="xforms-submit"/>
> <xf:toggle case="case-submit-done" ev:event="xforms-submit-done"/>
> <xf:toggle case="case-submit-error" ev:event="xforms-submit-error"/>
> </xf:submission>
>
> not hard coded:
> <!-- Saves the data to a file-->
> <xf:submission id="save-to-file" method="put" replace="instance">
> <xf:resource value="concat('http://localhost:8080/exist/webdav/db/nlu_test/', instance('mods-data')/identifier,'.xml')"/>
> <xf:toggle case="case-busy" ev:event="xforms-submit"/>
> <xf:toggle case="case-submit-done" ev:event="xforms-submit-done"/>
> <xf:toggle case="case-submit-error" ev:event="xforms-submit-error"/>
> </xf:submission>
>
> control in body:
> <!--Save to a File-->
> <xf:submit class="store" submission="save-to-file">
> <xf:label>Save</xf:label>
> <xf:action ev:event="DOMActivate">
> <xf:setvalue ref="instance('mods-data')/recordInfo/recordChangeDate" value="now()"/>
> </xf:action>
> </xf:submit>
>
> Sandy Bostian
> Content Manager, World Digital Library
> Library of Congress
> 101 Independence Ave., SE
> Washington, DC 20540
> 202.707.2342
> sb...@lo...
>
|