xsltforms-support Mailing List for XSLTForms (Page 99)
Brought to you by:
alain-couthures
You can subscribe to this list here.
2009 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
(6) |
Jun
(9) |
Jul
(16) |
Aug
(5) |
Sep
(43) |
Oct
(36) |
Nov
(58) |
Dec
(43) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2010 |
Jan
(79) |
Feb
(81) |
Mar
(107) |
Apr
(93) |
May
(85) |
Jun
(54) |
Jul
(64) |
Aug
(54) |
Sep
(45) |
Oct
(53) |
Nov
(34) |
Dec
(77) |
2011 |
Jan
(56) |
Feb
(53) |
Mar
(52) |
Apr
(66) |
May
(44) |
Jun
(16) |
Jul
(28) |
Aug
(5) |
Sep
(15) |
Oct
(21) |
Nov
(51) |
Dec
(46) |
2012 |
Jan
(16) |
Feb
(38) |
Mar
(47) |
Apr
(45) |
May
(41) |
Jun
(41) |
Jul
(72) |
Aug
(17) |
Sep
(10) |
Oct
(16) |
Nov
(29) |
Dec
(30) |
2013 |
Jan
(25) |
Feb
(13) |
Mar
(20) |
Apr
(25) |
May
(34) |
Jun
(8) |
Jul
(12) |
Aug
(9) |
Sep
(21) |
Oct
(19) |
Nov
(6) |
Dec
(2) |
2014 |
Jan
(14) |
Feb
(8) |
Mar
(7) |
Apr
(13) |
May
(33) |
Jun
(13) |
Jul
(6) |
Aug
(5) |
Sep
(5) |
Oct
(34) |
Nov
(7) |
Dec
|
2015 |
Jan
(1) |
Feb
(6) |
Mar
(17) |
Apr
(12) |
May
(10) |
Jun
(18) |
Jul
(31) |
Aug
(9) |
Sep
(3) |
Oct
(6) |
Nov
(19) |
Dec
(1) |
2016 |
Jan
(18) |
Feb
(4) |
Mar
(13) |
Apr
(19) |
May
|
Jun
(17) |
Jul
(7) |
Aug
|
Sep
(3) |
Oct
(6) |
Nov
(3) |
Dec
|
2017 |
Jan
(5) |
Feb
(17) |
Mar
(4) |
Apr
(8) |
May
(3) |
Jun
|
Jul
(8) |
Aug
(2) |
Sep
|
Oct
(5) |
Nov
(6) |
Dec
(4) |
2018 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(6) |
Nov
|
Dec
(1) |
2019 |
Jan
|
Feb
|
Mar
(4) |
Apr
(2) |
May
(4) |
Jun
|
Jul
|
Aug
(2) |
Sep
(7) |
Oct
|
Nov
|
Dec
|
2020 |
Jan
(13) |
Feb
(17) |
Mar
(8) |
Apr
(11) |
May
(15) |
Jun
(11) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(6) |
2021 |
Jan
(9) |
Feb
(26) |
Mar
(17) |
Apr
|
May
(7) |
Jun
(18) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(10) |
2022 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
(3) |
Jun
|
Jul
|
Aug
(2) |
Sep
(3) |
Oct
(2) |
Nov
(10) |
Dec
(1) |
2023 |
Jan
(10) |
Feb
|
Mar
(7) |
Apr
(8) |
May
(3) |
Jun
|
Jul
|
Aug
|
Sep
(8) |
Oct
(11) |
Nov
(8) |
Dec
(5) |
2024 |
Jan
(7) |
Feb
(3) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2025 |
Jan
(4) |
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Tambet M. <tam...@gm...> - 2010-01-25 08:48:06
|
Stephen Cameron wrote: > My aim is to replace the aatams:device_type node in the 'template' > instance with another aatams:device_type (node and children ) selected > by the user in the xf:select1 control. However this test case doesn't > work, the xf:output does not change its value. The xf:select1 control by > the Xforms standard has a "single-node-binding", it seems that by this > the standard actually means a single text node or an attribute if the > above test does not work. > Isn't the <xforms:copy> element meant for this case? See http://www.w3.org/TR/2003/REC-xforms-20031014/index-all.html#ui-adv-copy I don't know if XSLTForms supports the <xforms:copy> element. > So to clarify my ideal nodeset would be something like > > <xf:itemset > nodeset="instance('deployments')/gml:featureMember/aatams:receiver_deployment"> > <xf:value ref="." /> > <xf:label > ref="concatenate(aatams:installation/aatams:station/aatams:name,'-',aatams:receiver/aatams:code_name,'-',aatams:deployment_date > )"> > </xf:itemset> > I'm not sure if this works (or even should work) for <xf:itemset> labels, but it surely works for <xf:output> labels, at least in Chiba. <xf:label><xf:output value="concat(aatams:installation/aatams:station/aatams:name,'-',aatams:receiver/aatams:code_name,'-',aatams:deployment_date )"/></xf:label> Tambet |
From: Stephen C. <Ste...@ut...> - 2010-01-24 11:42:19
|
Hello, I have a couple of questions regarding the behaviour of select1 xforms controls. I'd appreciate it if someone could fill me in on what they should and should not be able to do. The following is a test case: <?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet href="forms/xsltforms/xsltforms.xsl" type="text/xsl"?> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:xf="http://www.w3.org/2002/xforms" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:aatams="http://www.imos.org.au/aatams" xmlns:wfs="http://www.opengis.net/wfs" xmlns:ogc="http://www.opengis.net/ogc" xmlns:ows="http://www.opengis.net/ows" xmlns:gml="http://www.opengis.net/gml" > <head> <xf:model id="m1"> <xf:instance id="template"> <wfs:Insert> <wfs:FeatureCollection> <gml:featureMember> <aatams:device> <aatams:name/> <aatams:device_type_ref> <aatams:device_type gml:id="aatams.device_type.2"> <aatams:name>TRANSMITTER</aatams:name> </aatams:device_type> </aatams:device_type_ref> </aatams:device> </gml:featureMember> </wfs:FeatureCollection> </wfs:Insert> </xf:instance> <xf:instance id="types" > <wfs:FeatureCollection> <gml:featureMember> <aatams:device_type gml:id="aatams.device_type.1"> <aatams:name>RECEIVER</aatams:name> </aatams:device_type> </gml:featureMember> <gml:featureMember> <aatams:device_type gml:id="aatams.device_type.2"> <aatams:name>TRANSMITTER</aatams:name> </aatams:device_type> </gml:featureMember> </wfs:FeatureCollection> </xf:instance> </xf:model> </head> <body> <xf:group ref="instance('template')//aatams:device"> <xf:input ref="aatams:name" > <xf:label>Device Name:</xf:label> </xf:input> <br/> <xf:select1 ref="aatams:device_type_ref/aatams:device_type"> <xf:label>Device Type: </xf:label> <xf:itemset nodeset="instance('types')/gml:featureMember/aatams:device_type"> <xf:value ref="." /> <xf:label ref="aatams:name" /> </xf:itemset> </xf:select1> </xf:group> <br/> <xf:output ref="instance('template')//aatams:device/aatams:device_type_ref/aatams:device_type/aatams:name" > <xf:label>Device Type Name:</xf:label> </xf:output> <div id="console" style="display:block;top:100px;" /> </body> </html> My aim is to replace the aatams:device_type node in the 'template' instance with another aatams:device_type (node and children ) selected by the user in the xf:select1 control. However this test case doesn't work, the xf:output does not change its value. The xf:select1 control by the Xforms standard has a "single-node-binding", it seems that by this the standard actually means a single text node or an attribute if the above test does not work. This is an important question as being not being able to replace a complex node in an instance complicates matter considerably. At the moment I am forced to build an instance at the time of submission using the ids of all the complex elements that the user has selected and which have been saved into another instance via bindings. This is not the correct way to be doing this I'm sure as it now prevents me from doing other things, like using templates, saving partly completed forms and retrieving them later, and creating new complex sub-elements. Particularly when you consider another issue as follows: If the nodes in nodeset that is used in the xf:select1 are more complex than the above example (which is nearly all the time for me) then it would be very desirable to be able to include a more complex 'compound' value in the xf:label of the xf:itemset. Here is an example. I have a list of receiver deployments. I want the user to be able to select a deployment from a list. The only way the user can tell which deployment is the correct one is to know 'where', 'what' and 'when', so the label needs to be a concatenation of three elements from each itemset node; where the deployment occurred (a 'station' name), what was deployed ( a receiver 'code-name') and the date of deployment. To get these three values strung together I currently have to have a view in my database that does the concatenation and use this extra 'feature' published as xml by my webservice to build my nodeset and then based on the xf:value value of the node selected by the user in the select1 itemlist, find the correct aatams:receiver_deployment 'single-node' and stick it into the template. So to clarify my ideal nodeset would be something like <xf:itemset nodeset="instance('deployments')/gml:featureMember/aatams:receiver_deployment"> <xf:value ref="." /> <xf:label ref="concatenate(aatams:installation/aatams:station/aatams:name,'-',aatams:receiver/aatams:code_name,'-',aatams:deployment_date )"> </xf:itemset> It would also be good to be able to sort the nodeset as well, in the same manner as XSLT perhaps. So hopefully from these two examples I have shown that what should be very simple has become quite complicated and definitely not what Xforms is supposed to be about! Thanks for your interest. -- Regards Stephen Cameron Data Programmer Integrated Marine Observing System (IMOS) eMarine Information Infrastructure Project University of Tasmania, Private Bag 21, Hobart, TAS 7001, Australia Tel: +61 3 6226 8507 Fax: +61 3 6226 2997 Email: ste...@ut... URL: http://www.imos.org.au/eM .html |
From: COUTHURES A. <ala...@ag...> - 2010-01-23 16:16:03
|
Christopher, > > I have been using xsltforms to create some complicated interfaces. > xsltforms performance appears to degrade significantly as the size of > the instance data increases. It does not seem to be impacted as > significantly by the number of input controls on the page. This means > that paging the items in my repeat element has almost no performance > impact. > Can you send me a link or the XForms document itself with its data ? > > > > Profiling tools report at least 13 seconds in IE 8 (2.5 seconds in > FF/Chrome) > Yes, IE is still very slower... > > to "tab" from one field to the next, regardless of whether the data in > the field was changed. > It's a good situation to check with a javascript debugger (focus is lost,...). > > As you can expect, this is not acceptable for my users. > There are different possibilities of optimization in XSLTForms: less generated HTML elements, less Javascript instructions executed,... Because this has not been done yet, I hope that a minimal effort could improve it significantly. > > > > What are the scalability limits of xsltforms? > This is not yet determined but there are many parameters involved: complexity, instance size, number of bindings, ... > > Do you have any suggestions on how to improve performance in my > xforms document? > Use of // in XPath expressions is surely to avoid. -Alain |
From: Christopher D. <cd...@vi...> - 2010-01-23 15:09:26
|
I have been using xsltforms to create some complicated interfaces. xsltforms performance appears to degrade significantly as the size of the instance data increases. It does not seem to be impacted as significantly by the number of input controls on the page. This means that paging the items in my repeat element has almost no performance impact. Profiling tools report at least 13 seconds in IE 8 (2.5 seconds in FF/Chrome) to "tab" from one field to the next, regardless of whether the data in the field was changed. As you can expect, this is not acceptable for my users. What are the scalability limits of xsltforms? Do you have any suggestions on how to improve performance in my xforms document? Thanks |
From: Micah D. <Mic...@ma...> - 2010-01-23 02:09:37
|
Hey Alain, Right now, triggers with appearance="minimal" use an <a href="#"> element, which has the undesirable effect of scrolling the page to the top. The responsible code looks like this: <xsl:template xmlns:xsl="http://www.w3.org/1999/XSL/Transform" match="xforms:trigger|xforms:submit"> <xsl:variable name="innerbody"> <xsl:apply-templates select="xforms:label"> <xsl:with-param name="appearance" select="'span'"/> </xsl:apply-templates> </xsl:variable> <xsl:call-template name="field"> <xsl:with-param name="appearance">none</xsl:with-param> <xsl:with-param name="body"> <xsl:choose> <xsl:when test="@appearance = 'minimal'"> <a href="#"> <xsl:copy-of select="$innerbody"/> </a> </xsl:when> ... Would it be possible to change the minimal trigger (or add a new appearance choice with some name other than 'minimal') to use an href of "javascript:void(0);" or something else that doesn't trigger the scroll effect? For example, adding a new choice like <xsl:choose> <xsl:when test="@appearance = 'minimal'"> <a href="javascript:void(0);"> <xsl:copy-of select="$innerbody"/> </a> </xsl:when> ... What do you think? -m |
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... > |
From: Franclin F. <f.f...@4c...> - 2010-01-22 13:11:30
|
Hi All, Has someone ever managed to add a Google Map in an XForms web page? Here is what I did but it did not work and I still do not understand why. <?xml-stylesheet href="xsltforms.xsl" type="text/xsl"?> <?xsltforms-options debug="yes"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:xf="http://www.w3.org/2002/xforms" xmlns:sample="http://www.agencexml.com/sample" xmlns:ev="http://www.w3.org/2001/xml-events"> <head> <title>Hello World in XForms</title> <xf:model> <xf:instance> <data xmlns=""/> </xf:instance> </xf:model> <script type="text/javascript" src="http://maps.google.com/maps?file=api&v=2&key=MYKEY"></script> <script type="text/javascript"> function initialize() { if (GBrowserIsCompatible()) { var map = new GMap2(document.getElementById("map_canvas")); map.setCenter(new GLatLng(37.4419, -122.1419), 13); map.setUIToDefault(); } } </script> </head> <body onload="initialize()"> <div id="map_canvas" style="width: 500px; height: 300px"></div> </body> </html> The page is saved as an XHTML file and when I tried to run it, the container is empty and when I look at the end console, I can see an error message saying that: * Error: uncaught exception: [Exception... "Operation is not supported" code: "9" nsresult: "0x80530009 (NS_ERROR_DOM_NOT_SUPPORTED_ERR)" location: "http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAVZubqDM1uNqBU_mrOtApzxT2yXp_ZAY8_ufC3CFXhHIE1NvwkxT6VPtEK1C-Bd6RZupKj3-67FexrQ Line: 1"]* *Error: GMap2 is not defined Source File: http://localhost:8080/xformjs/myform.xhtml Line: 3* Obviously when I removed all the XForms related content, the map appears normally. So what could be wrong here? Waiting for your reply. Franclin. |
From: Franclin F. <f.f...@4c...> - 2010-01-22 13:02:13
|
On 21/01/10 21:34, COUTHURES Alain wrote: > Hi Franclin, >> I am trying to call a javascript function from XForms but to no avail. >> Here is the issue : *How to pass some parameters to a Javascript >> function from XForms?* >> Let us consider the following JS function: >> /function myfunction(par1, par2){ >> alert('You have entered' + par1 + par2 ); >> //Display a Google Map by passing par1 to it. >> }/ >> Parameters par1 and par2 will be the result of an XPath expression >> computed by XForms. Ideally, it would be called from XForms like this: >> /<xf:trigger> >> <xf:load ref="link that contain the javascript function >> myfunction" ev:event="DOMActivate"> >> </xf:trigger>/ >> >> As far as I know (I may be wrong, though), the only way to call JS >> functions from XForms is by using the load method and call the JS >> function as an external resource. >> This topics has already been touched on in an article in IBM's >> DeveloperWorks that is located here: >> /http://www.ibm.com/developerworks/xml/library/x-xformstipcalljs/index.html/ >> The bottom line is that no parameter is passed to the function which >> is thus not of great help in my case. >> This problem has also been touched on here >> /http://wiki.orbeon.com/forms/projects/client-side-api-for-custom-javascript-widgets/ >> but again it is not implemented. >> So here are my questions: >> 1 - How to pass some parameters to a JS method from XForms? > Instead of @ref, the ressource sub element can be used to generate the > uri with an XPath expression so parameters can be passed using the > XPath concat() function. >> 2 - Is this feature implemented in XSLTForms? > Yes, it is implemented in XSLTForms. >> Finally it might be interesting to point that when I try to specify >> the name of the JS method directly in the ref attribute of the load >> element, XSLTForms raises an exception by saying that "*Function >> http://www.w3.org/2005/xpath-functions myfunction() not found*" which >> makes me think that XSLTForms considers the JS function as an XPath >> function. How to tell XSLTForms that it is actually a JS function? > With XSLTForms, it's also possible to define its own XPath functions > with Javascript. There is just a specific template to respect about > parameters and return value. > > -Alain Hi Alan, Thanks for your reply. Regarding point 1- I obviously tried to call the concat function to dynamically work out the URL of the resource but it did not work. Here is a pseudo-code: <xf:trigger> <xf:label>Call Js Function</xf:label> <xf:load value=concat('javascript:',link/@url) ev:event="DOMActivate" /> </xf:trigger> The model is: <xf:model> <xf:instance> <data xmlns=""> <link id="lnk" url="testJS()"/> <newlink/> </data> </xf:instance> </xf:model> Finally you said at the end of your mail that it is possible to define your own XPath function with JavaScript with XSLTForms. Do you have any example showing how thing can be achieved? Waiting for your reply. Regards, Franclin. |
From: COUTHURES A. <ala...@ag...> - 2010-01-21 21:33:58
|
Hi Franclin, > I am trying to call a javascript function from XForms but to no avail. > Here is the issue : *How to pass some parameters to a Javascript > function from XForms?* > Let us consider the following JS function: > /function myfunction(par1, par2){ > alert('You have entered' + par1 + par2 ); > //Display a Google Map by passing par1 to it. > }/ > Parameters par1 and par2 will be the result of an XPath expression > computed by XForms. Ideally, it would be called from XForms like this: > /<xf:trigger> > <xf:load ref="link that contain the javascript function myfunction" > ev:event="DOMActivate"> > </xf:trigger>/ > > As far as I know (I may be wrong, though), the only way to call JS > functions from XForms is by using the load method and call the JS > function as an external resource. > This topics has already been touched on in an article in IBM's > DeveloperWorks that is located here: > /http://www.ibm.com/developerworks/xml/library/x-xformstipcalljs/index.html/ > The bottom line is that no parameter is passed to the function which > is thus not of great help in my case. > This problem has also been touched on here > /http://wiki.orbeon.com/forms/projects/client-side-api-for-custom-javascript-widgets/ > but again it is not implemented. > So here are my questions: > 1 - How to pass some parameters to a JS method from XForms? Instead of @ref, the ressource sub element can be used to generate the uri with an XPath expression so parameters can be passed using the XPath concat() function. > 2 - Is this feature implemented in XSLTForms? Yes, it is implemented in XSLTForms. > Finally it might be interesting to point that when I try to specify > the name of the JS method directly in the ref attribute of the load > element, XSLTForms raises an exception by saying that "*Function > http://www.w3.org/2005/xpath-functions myfunction() not found*" which > makes me think that XSLTForms considers the JS function as an XPath > function. How to tell XSLTForms that it is actually a JS function? With XSLTForms, it's also possible to define its own XPath functions with Javascript. There is just a specific template to respect about parameters and return value. -Alain |
From: COUTHURES A. <ala...@ag...> - 2010-01-21 21:22:18
|
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... > |
From: Sandra B. <sb...@lo...> - 2010-01-20 21:30:00
|
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... |
From: Klotz, L. <Lei...@xe...> - 2010-01-20 17:07:47
|
You can always add one on load: <insert ev:event="xforms-model-construct-done" if="not(/root/format)" nodeset="..." context="..." /> -----Original Message----- From: Micah Dubinko [mailto:Mic...@ma...] Sent: Wednesday, January 20, 2010 12:42 AM To: Tambet Matiisen Cc: xsl...@li... Subject: Re: [Xsltforms-support] Binding to optional element Thanks Tambet, Looks like a good direction to pursue. In the case where the default selection (no element) gets saved and then the form is reopened, in other words when the instance is <root/> How do you make it work (since the binding to /root/format goes nowhere)? -m On Jan 20, 2010, at 12:34 AM, Tambet Matiisen wrote: > This is the same solution I have used in wsdl2xforms, but I used > xforms-submit event instead. > > <xforms:instance id="temp"> > <temp> > <relevant xsi:type="boolean">true</relevant> > </temp> > </xforms:instance> > <xforms:submission ...> > <xforms:setvalue ref="instance('temp')/relevant" value="false()" > events:event="xforms-submit"/> > <xforms:setvalue ref="instance('temp')/relevant" value="true()" > events:event="xforms-submit-done"/> > <xforms:setvalue ref="instance('temp')/relevant" value="true()" > events:event="xforms-submit-error"/> > </xforms:submission> > <xforms:bind nodeset="/root/format" relevant="(. != '' or > boolean-from-string(instance('temp')/relevant))"/> > > Works well enough in Chiba. OK, name could be more descriptive :). > > Tambet > > Klotz, Leigh wrote: >> You might be able to use the relevance-with-submission-flag hack: >> >> <bind nodeset="/root/format" >> relevant="instance('state')/aboutToSubmit = 'false' or . != ''" /> >> <instance id="state"><data >> xmlns=""><aboutToSubmit>false</aboutToSubmit></instance> >> <submit submission="save"> >> <setvalue ev:event="DOMActivate" >> ref="instance('state')/aboutToSubmit">true</setvalue> >> </submit> >> <submission id="save"> >> <setvalue ev:event="xforms-submit-done" >> ref="instance('state')/aboutToSubmit">false</setvalue> >> <setvalue ev:event="xforms-submit-error" >> ref="instance('state')/aboutToSubmit">false</setvalue> >> </submit> >> >> -----Original Message----- >> From: Micah Dubinko [mailto:Mic...@ma...] >> Sent: Tuesday, January 19, 2010 11:58 AM >> To: xsl...@li... >> Subject: [Xsltforms-support] Binding to optional element >> >> Hey everyone, >> >> This was difficult to do in XForms 1.0. What's the latest state of the art? >> >> Say I have an XML instance like this: >> <root> >> <format>xml</format> >> </root> >> >> Possible values for the format element are "xml", "text", "binary", or a default setting, indicated by a complete absence of the <format> element. I'd like this to attach to a select1 with four choices: >> >> <xf:select1 ref="format">... >> >> * xml >> * text >> * binary >> * default >> >> Where the first three set the value of the <format> element, and the fourth omits the element altogether. In XForms 1.0, the difficulty comes from binding to a nonexistent element. Are there features from 1.1, 1.2, or XSLTForms that make this case easier? Anyone have an example? >> >> Thanks! -m >> >> >> --------------------------------------------------------------------- >> --------- Throughout its 18-year history, RSA Conference consistently >> attracts the world's best and brightest in the field, creating opportunities for Conference attendees to learn about information security's most important issues through interactions with peers, luminaries and emerging and established companies. >> http://p.sf.net/sfu/rsaconf-dev2dev >> _______________________________________________ >> Xsltforms-support mailing list >> Xsl...@li... >> https://lists.sourceforge.net/lists/listinfo/xsltforms-support >> >> --------------------------------------------------------------------- >> --------- Throughout its 18-year history, RSA Conference consistently >> attracts the world's best and brightest in the field, creating >> opportunities for Conference attendees to learn about information >> security's most important issues through interactions with peers, >> luminaries and emerging and established companies. >> http://p.sf.net/sfu/rsaconf-dev2dev >> _______________________________________________ >> Xsltforms-support mailing list >> Xsl...@li... >> https://lists.sourceforge.net/lists/listinfo/xsltforms-support >> > > > ---------------------------------------------------------------------- > -------- Throughout its 18-year history, RSA Conference consistently > attracts the world's best and brightest in the field, creating > opportunities for Conference attendees to learn about information > security's most important issues through interactions with peers, > luminaries and emerging and established companies. > http://p.sf.net/sfu/rsaconf-dev2dev > _______________________________________________ > Xsltforms-support mailing list > Xsl...@li... > https://lists.sourceforge.net/lists/listinfo/xsltforms-support ------------------------------------------------------------------------------ Throughout its 18-year history, RSA Conference consistently attracts the world's best and brightest in the field, creating opportunities for Conference attendees to learn about information security's most important issues through interactions with peers, luminaries and emerging and established companies. http://p.sf.net/sfu/rsaconf-dev2dev _______________________________________________ Xsltforms-support mailing list Xsl...@li... https://lists.sourceforge.net/lists/listinfo/xsltforms-support |
From: Franclin F. <f.f...@4c...> - 2010-01-20 16:05:29
|
Hi All, I am trying to call a javascript function from XForms but to no avail. Here is the issue : *How to pass some parameters to a Javascript function from XForms?* Let us consider the following JS function: /function myfunction(par1, par2){ alert('You have entered' + par1 + par2 ); //Display a Google Map by passing par1 to it. }/ Parameters par1 and par2 will be the result of an XPath expression computed by XForms. Ideally, it would be called from XForms like this: /<xf:trigger> <xf:load ref="link that contain the javascript function myfunction" ev:event="DOMActivate"> </xf:trigger>/ As far as I know (I may be wrong, though), the only way to call JS functions from XForms is by using the load method and call the JS function as an external resource. This topics has already been touched on in an article in IBM's DeveloperWorks that is located here: /http://www.ibm.com/developerworks/xml/library/x-xformstipcalljs/index.html/ The bottom line is that no parameter is passed to the function which is thus not of great help in my case. This problem has also been touched on here /http://wiki.orbeon.com/forms/projects/client-side-api-for-custom-javascript-widgets/ but again it is not implemented. So here are my questions: 1 - How to pass some parameters to a JS method from XForms? 2 - Is this feature implemented in XSLTForms? Finally it might be interesting to point that when I try to specify the name of the JS method directly in the ref attribute of the load element, XSLTForms raises an exception by saying that "*Function http://www.w3.org/2005/xpath-functions myfunction() not found*" which makes me think that XSLTForms considers the JS function as an XPath function. How to tell XSLTForms that it is actually a JS function? In order to reproduce this case I did this: /<xf:load ref="javascript:myfunction(number(par1),string(par2))" ev:event="DOMActivate"/> / I am anxiously waiting for your reply. Regards, Franclin. |
From: Claudius T. <cla...@ya...> - 2010-01-20 15:38:32
|
Hi, There is now available a new version of . This version added a data instances viewer, which is used to inspect the data instances during runtime, at any moment, after any xforms action. The user can expand and collapse the viewer, and also to refresh the data (by pressing the button "Refresh data") after executing a certain xforms action. |
From: Tambet M. <tam...@gm...> - 2010-01-20 08:54:23
|
Micah Dubinko wrote: > Thanks Tambet, > > Looks like a good direction to pursue. > > In the case where the default selection (no element) gets saved and then the form is reopened, in other words when the instance is > <root/> > > How do you make it work (since the binding to /root/format goes nowhere)? > Good question. I don't have solution for that. In case of wsdl2xforms we submit the instance to web service and never retrieve it. Would xsi:nil attribute give you the same result? Something like this: <xf:instance> <root> <format xsi:nil="false">xml</format> </root> </xf:instance> <xf:bind nodeset="/root/format/@xsi:nil" calculate=".. = ''"/> If I'm correct, Chiba even sets xsi:nil automatically for you, if you happen to have that attribute. I understand, that this not exactly "missing element" feature that you needed, but maybe the target application handles the missing element and xsi:nil="true" element the same way? Tambet |
From: Micah D. <Mic...@ma...> - 2010-01-20 08:41:46
|
Thanks Tambet, Looks like a good direction to pursue. In the case where the default selection (no element) gets saved and then the form is reopened, in other words when the instance is <root/> How do you make it work (since the binding to /root/format goes nowhere)? -m On Jan 20, 2010, at 12:34 AM, Tambet Matiisen wrote: > This is the same solution I have used in wsdl2xforms, but I used > xforms-submit event instead. > > <xforms:instance id="temp"> > <temp> > <relevant xsi:type="boolean">true</relevant> > </temp> > </xforms:instance> > <xforms:submission ...> > <xforms:setvalue ref="instance('temp')/relevant" value="false()" > events:event="xforms-submit"/> > <xforms:setvalue ref="instance('temp')/relevant" value="true()" > events:event="xforms-submit-done"/> > <xforms:setvalue ref="instance('temp')/relevant" value="true()" > events:event="xforms-submit-error"/> > </xforms:submission> > <xforms:bind nodeset="/root/format" relevant="(. != '' or > boolean-from-string(instance('temp')/relevant))"/> > > Works well enough in Chiba. OK, name could be more descriptive :). > > Tambet > > Klotz, Leigh wrote: >> You might be able to use the relevance-with-submission-flag hack: >> >> <bind nodeset="/root/format" relevant="instance('state')/aboutToSubmit = 'false' or . != ''" /> >> <instance id="state"><data xmlns=""><aboutToSubmit>false</aboutToSubmit></instance> >> <submit submission="save"> >> <setvalue ev:event="DOMActivate" ref="instance('state')/aboutToSubmit">true</setvalue> >> </submit> >> <submission id="save"> >> <setvalue ev:event="xforms-submit-done" ref="instance('state')/aboutToSubmit">false</setvalue> >> <setvalue ev:event="xforms-submit-error" ref="instance('state')/aboutToSubmit">false</setvalue> >> </submit> >> >> -----Original Message----- >> From: Micah Dubinko [mailto:Mic...@ma...] >> Sent: Tuesday, January 19, 2010 11:58 AM >> To: xsl...@li... >> Subject: [Xsltforms-support] Binding to optional element >> >> Hey everyone, >> >> This was difficult to do in XForms 1.0. What's the latest state of the art? >> >> Say I have an XML instance like this: >> <root> >> <format>xml</format> >> </root> >> >> Possible values for the format element are "xml", "text", "binary", or a default setting, indicated by a complete absence of the <format> element. I'd like this to attach to a select1 with four choices: >> >> <xf:select1 ref="format">... >> >> * xml >> * text >> * binary >> * default >> >> Where the first three set the value of the <format> element, and the fourth omits the element altogether. In XForms 1.0, the difficulty comes from binding to a nonexistent element. Are there features from 1.1, 1.2, or XSLTForms that make this case easier? Anyone have an example? >> >> Thanks! -m >> >> >> ------------------------------------------------------------------------------ >> Throughout its 18-year history, RSA Conference consistently attracts the world's best and brightest in the field, creating opportunities for Conference attendees to learn about information security's most important issues through interactions with peers, luminaries and emerging and established companies. >> http://p.sf.net/sfu/rsaconf-dev2dev >> _______________________________________________ >> Xsltforms-support mailing list >> Xsl...@li... >> https://lists.sourceforge.net/lists/listinfo/xsltforms-support >> >> ------------------------------------------------------------------------------ >> Throughout its 18-year history, RSA Conference consistently attracts the >> world's best and brightest in the field, creating opportunities for Conference >> attendees to learn about information security's most important issues through >> interactions with peers, luminaries and emerging and established companies. >> http://p.sf.net/sfu/rsaconf-dev2dev >> _______________________________________________ >> Xsltforms-support mailing list >> Xsl...@li... >> https://lists.sourceforge.net/lists/listinfo/xsltforms-support >> > > > ------------------------------------------------------------------------------ > Throughout its 18-year history, RSA Conference consistently attracts the > world's best and brightest in the field, creating opportunities for Conference > attendees to learn about information security's most important issues through > interactions with peers, luminaries and emerging and established companies. > http://p.sf.net/sfu/rsaconf-dev2dev > _______________________________________________ > Xsltforms-support mailing list > Xsl...@li... > https://lists.sourceforge.net/lists/listinfo/xsltforms-support |
From: Tambet M. <tam...@gm...> - 2010-01-20 08:34:22
|
This is the same solution I have used in wsdl2xforms, but I used xforms-submit event instead. <xforms:instance id="temp"> <temp> <relevant xsi:type="boolean">true</relevant> </temp> </xforms:instance> <xforms:submission ...> <xforms:setvalue ref="instance('temp')/relevant" value="false()" events:event="xforms-submit"/> <xforms:setvalue ref="instance('temp')/relevant" value="true()" events:event="xforms-submit-done"/> <xforms:setvalue ref="instance('temp')/relevant" value="true()" events:event="xforms-submit-error"/> </xforms:submission> <xforms:bind nodeset="/root/format" relevant="(. != '' or boolean-from-string(instance('temp')/relevant))"/> Works well enough in Chiba. OK, name could be more descriptive :). Tambet Klotz, Leigh wrote: > You might be able to use the relevance-with-submission-flag hack: > > <bind nodeset="/root/format" relevant="instance('state')/aboutToSubmit = 'false' or . != ''" /> > <instance id="state"><data xmlns=""><aboutToSubmit>false</aboutToSubmit></instance> > <submit submission="save"> > <setvalue ev:event="DOMActivate" ref="instance('state')/aboutToSubmit">true</setvalue> > </submit> > <submission id="save"> > <setvalue ev:event="xforms-submit-done" ref="instance('state')/aboutToSubmit">false</setvalue> > <setvalue ev:event="xforms-submit-error" ref="instance('state')/aboutToSubmit">false</setvalue> > </submit> > > -----Original Message----- > From: Micah Dubinko [mailto:Mic...@ma...] > Sent: Tuesday, January 19, 2010 11:58 AM > To: xsl...@li... > Subject: [Xsltforms-support] Binding to optional element > > Hey everyone, > > This was difficult to do in XForms 1.0. What's the latest state of the art? > > Say I have an XML instance like this: > <root> > <format>xml</format> > </root> > > Possible values for the format element are "xml", "text", "binary", or a default setting, indicated by a complete absence of the <format> element. I'd like this to attach to a select1 with four choices: > > <xf:select1 ref="format">... > > * xml > * text > * binary > * default > > Where the first three set the value of the <format> element, and the fourth omits the element altogether. In XForms 1.0, the difficulty comes from binding to a nonexistent element. Are there features from 1.1, 1.2, or XSLTForms that make this case easier? Anyone have an example? > > Thanks! -m > > > ------------------------------------------------------------------------------ > Throughout its 18-year history, RSA Conference consistently attracts the world's best and brightest in the field, creating opportunities for Conference attendees to learn about information security's most important issues through interactions with peers, luminaries and emerging and established companies. > http://p.sf.net/sfu/rsaconf-dev2dev > _______________________________________________ > Xsltforms-support mailing list > Xsl...@li... > https://lists.sourceforge.net/lists/listinfo/xsltforms-support > > ------------------------------------------------------------------------------ > Throughout its 18-year history, RSA Conference consistently attracts the > world's best and brightest in the field, creating opportunities for Conference > attendees to learn about information security's most important issues through > interactions with peers, luminaries and emerging and established companies. > http://p.sf.net/sfu/rsaconf-dev2dev > _______________________________________________ > Xsltforms-support mailing list > Xsl...@li... > https://lists.sourceforge.net/lists/listinfo/xsltforms-support > |
From: Klotz, L. <Lei...@xe...> - 2010-01-19 21:34:53
|
Another option, though with UI ramifications. It uses a select1 for the named cases and a button for the default case. And the new insert/delete attributes in XForms 1.1. I've not tested this, but it's from http://www.w3.org/TR/xforms/#data-mutation-patterns <instance id="data"> <data xmlns=""><format>XML</format></data> </instance> <instance id="prototypes"> <data xmlns=""><format>XML</format></data> </instance> <group ref="/root/format"> <select1 ref="."> <label>Format: </label> <item><label>XML</label><value>xml</value></item> <item><label>Text</label><value>text</value></item> <item><label>Binary</label><value>binary</value></item> <item><label>Default</label><value /></item> <delete ev:event="xforms-value-changed" if=". = ''" nodeset="." /> </select1> </group> <trigger ref="/root[not(format)]"> <label>Set Format</label> <insert ev:event="DOMActivate" context="/root" nodeset="format" origin="instance('prototypes')/format" /> </trigger> -----Original Message----- From: Micah Dubinko [mailto:Mic...@ma...] Sent: Tuesday, January 19, 2010 11:58 AM To: xsl...@li... Subject: [Xsltforms-support] Binding to optional element Hey everyone, This was difficult to do in XForms 1.0. What's the latest state of the art? Say I have an XML instance like this: <root> <format>xml</format> </root> Possible values for the format element are "xml", "text", "binary", or a default setting, indicated by a complete absence of the <format> element. I'd like this to attach to a select1 with four choices: <xf:select1 ref="format">... * xml * text * binary * default Where the first three set the value of the <format> element, and the fourth omits the element altogether. In XForms 1.0, the difficulty comes from binding to a nonexistent element. Are there features from 1.1, 1.2, or XSLTForms that make this case easier? Anyone have an example? Thanks! -m ------------------------------------------------------------------------------ Throughout its 18-year history, RSA Conference consistently attracts the world's best and brightest in the field, creating opportunities for Conference attendees to learn about information security's most important issues through interactions with peers, luminaries and emerging and established companies. http://p.sf.net/sfu/rsaconf-dev2dev _______________________________________________ Xsltforms-support mailing list Xsl...@li... https://lists.sourceforge.net/lists/listinfo/xsltforms-support |
From: Klotz, L. <Lei...@xe...> - 2010-01-19 21:25:14
|
You might be able to use the relevance-with-submission-flag hack: <bind nodeset="/root/format" relevant="instance('state')/aboutToSubmit = 'false' or . != ''" /> <instance id="state"><data xmlns=""><aboutToSubmit>false</aboutToSubmit></instance> <submit submission="save"> <setvalue ev:event="DOMActivate" ref="instance('state')/aboutToSubmit">true</setvalue> </submit> <submission id="save"> <setvalue ev:event="xforms-submit-done" ref="instance('state')/aboutToSubmit">false</setvalue> <setvalue ev:event="xforms-submit-error" ref="instance('state')/aboutToSubmit">false</setvalue> </submit> -----Original Message----- From: Micah Dubinko [mailto:Mic...@ma...] Sent: Tuesday, January 19, 2010 11:58 AM To: xsl...@li... Subject: [Xsltforms-support] Binding to optional element Hey everyone, This was difficult to do in XForms 1.0. What's the latest state of the art? Say I have an XML instance like this: <root> <format>xml</format> </root> Possible values for the format element are "xml", "text", "binary", or a default setting, indicated by a complete absence of the <format> element. I'd like this to attach to a select1 with four choices: <xf:select1 ref="format">... * xml * text * binary * default Where the first three set the value of the <format> element, and the fourth omits the element altogether. In XForms 1.0, the difficulty comes from binding to a nonexistent element. Are there features from 1.1, 1.2, or XSLTForms that make this case easier? Anyone have an example? Thanks! -m ------------------------------------------------------------------------------ Throughout its 18-year history, RSA Conference consistently attracts the world's best and brightest in the field, creating opportunities for Conference attendees to learn about information security's most important issues through interactions with peers, luminaries and emerging and established companies. http://p.sf.net/sfu/rsaconf-dev2dev _______________________________________________ Xsltforms-support mailing list Xsl...@li... https://lists.sourceforge.net/lists/listinfo/xsltforms-support |
From: COUTHURES A. <ala...@ag...> - 2010-01-19 21:22:07
|
Hey Micah, > This was difficult to do in XForms 1.0. What's the latest state of the art? > > Say I have an XML instance like this: > <root> > <format>xml</format> > </root> > > Possible values for the format element are "xml", "text", "binary", or a default setting, indicated by a complete absence of the <format> element. I'd like this to attach to a select1 with four choices: > > <xf:select1 ref="format">... > > * xml > * text > * binary > * default > > Where the first three set the value of the <format> element, and the fourth omits the element altogether. In XForms 1.0, the difficulty comes from binding to a nonexistent element. Are there features from 1.1, 1.2, or XSLTForms that make this case easier? Anyone have an example? This is clearly a real world situation: the lack of an XML element has its own meaning in the XML world. The problem with XForms 1.1 is that an instance has two purposes: to act as a sort of schema and to represent the initial values. Being a sort of elementary schema, every element has to be present, even without a value. Lacks of element will disable corresponding bindings. Within a repeat, it's not possible to delete the very last item and then insert it again because there is no node to copy anymore... I think this should be in XForms 2.0 to separate this without confusion: one schema and one instance with initial values. XSLTForms doesn't support it yet but it's a very interesting feature because of this current restriction. Using an extra work instance in XForms 1.1 is, usually, a possible workaround, with some actions (depending on @if probably) to synchronize instances. Sorry, I haven't develop one yet myself for this kind of situation. -Alain |
From: Micah D. <Mic...@ma...> - 2010-01-19 20:10:58
|
Hey everyone, This was difficult to do in XForms 1.0. What's the latest state of the art? Say I have an XML instance like this: <root> <format>xml</format> </root> Possible values for the format element are "xml", "text", "binary", or a default setting, indicated by a complete absence of the <format> element. I'd like this to attach to a select1 with four choices: <xf:select1 ref="format">... * xml * text * binary * default Where the first three set the value of the <format> element, and the fourth omits the element altogether. In XForms 1.0, the difficulty comes from binding to a nonexistent element. Are there features from 1.1, 1.2, or XSLTForms that make this case easier? Anyone have an example? Thanks! -m |
From: Klotz, L. <Lei...@xe...> - 2010-01-14 19:34:02
|
Javier, submission/@show is an experimental feature I requested. It's from a proposal for XForms 1.2. You can read more about XForms 1.2 here: http://www.w3.org/MarkUp/Forms/wiki/XForms_Future_Features Leigh. ________________________________ From: Javier Díaz [mailto:jd...@ge...] Sent: Thursday, January 14, 2010 11:30 AM To: COUTHURES Alain; XSLTForms support Subject: [Xsltforms-support] Error when submitting from xform withreplace="all" Hello, When I have an xform with a submission like this: <xf:submission id="enviar_seleccion" method="get" replace="all" action="pruebas/javi/xforms/pai-ip.xml"> <xf:message ev:event="xforms-submit-error" level="modeless">Error al enviar, compruebe los datos introducidos</xf:message> </xf:submission> When the submision is done, this error appears: "this.data is null" in the following code (---> is the point of execution when error appeared): function run(action, element, evt, synch, propagate) { xforms.openAction(); if (synch) { Dialog.show("statusPanel", null, false); setTimeout(function() { action.execute(IdManager.find(element), null, evt); --> Dialog.hide("statusPanel", false); if (!propagate) { evt.stopPropagation(); } xforms.closeAction(); -------------------------- hide : function(div, modal) { if (modal) { this.depth--; if (this.depth == 0) { $('xforms-dialog-surround').style.display = "none"; } else { $('xforms-dialog-surround').style.zIndex = (this.depth+this.initzindex)*2-2; } } this.showSelects(div, true, modal); if (typeof div != "string") { var divid = div.getAttribute("id"); if (divid != null && divid != "") { div = IdManager.find(divid); } } else { ---> div = IdManager.find(div); } if (div) { div.style.display = "none"; } } -------------------------- find : function(id) { --> var ids = this.data[id]; if (ids) { for (var i = 0; i < ids.length; i++) { I think the problem is that it seems xforms document is closed and some elements destroyed before execution finishes. When using replace="instance" instead "all", no error appears. This problem doesn't affect to the execution of the following page, and only appears in firefox error console. I have find also a curious thing, submission template accepts a "show" atributte, but in xforms 1.1 specification (http://www.w3.org/TR/xforms11/#action-load), I only see it in load element. Is there a newer specification of xforms? Do you support extra functionality in xsltforms? If yes, how can I know about them without reading all xsltforms.xsl code? Best Regards, Javier |
From: Javier D. <jd...@ge...> - 2010-01-14 19:30:45
|
Hello, When I have an xform with a submission like this: <xf:submission id="enviar_seleccion" method="get" replace="all" action="pruebas/javi/xforms/pai-ip.xml"> <xf:message ev:event="xforms-submit-error" level="modeless">Error al enviar, compruebe los datos introducidos</xf:message> </xf:submission> When the submision is done, this error appears: "this.data is null" in the following code (---> is the point of execution when error appeared): function run(action, element, evt, synch, propagate) { xforms.openAction(); if (synch) { Dialog.show("statusPanel", null, false); setTimeout(function() { action.execute(IdManager.find(element), null, evt); --> Dialog.hide("statusPanel", false); if (!propagate) { evt.stopPropagation(); } xforms.closeAction(); -------------------------- hide : function(div, modal) { if (modal) { this.depth--; if (this.depth == 0) { $('xforms-dialog-surround').style.display = "none"; } else { $('xforms-dialog-surround').style.zIndex = (this.depth+this.initzindex)*2-2; } } this.showSelects(div, true, modal); if (typeof div != "string") { var divid = div.getAttribute("id"); if (divid != null && divid != "") { div = IdManager.find(divid); } } else { ---> div = IdManager.find(div); } if (div) { div.style.display = "none"; } } -------------------------- find : function(id) { *--> var ids = this.data[id];* if (ids) { for (var i = 0; i < ids.length; i++) { I think the problem is that it seems xforms document is closed and some elements destroyed before execution finishes. When using replace="instance" instead "all", no error appears. This problem doesn't affect to the execution of the following page, and only appears in firefox error console. I have find also a curious thing, submission template accepts a "show" atributte, but in xforms 1.1 specification (http://www.w3.org/TR/xforms11/#action-load), I only see it in load element. Is there a newer specification of xforms? Do you support extra functionality in xsltforms? If yes, how can I know about them without reading all xsltforms.xsl code? Best Regards, Javier |
From: COUTHURES A. <ala...@ag...> - 2010-01-13 21:09:02
|
Stephen, During the XSLT step, there is no possibility to display anything... But instances are not externally loaded at the XSLT step but at the Javascript initialization step. So you should see the status panel with the now famous "... Loading ..." message. Can you please provide a link to test this ? Thanks! -Alain > Hello, > > I have noticed that XSLTForms is quite a lot slower in IE than Firefox > or Chrome. > > Its still useable in IE for me but only just, there is a significant > pause before anything shows on the screen when the data model has to be > loaded from outside the form. > > I'm wondering if it would be simple to add an animated gif appear > before the GUI displays to make people think something is happening in > the wait period. > > |
From: COUTHURES A. <ala...@ag...> - 2010-01-13 21:02:14
|
Hello Stephen, This has been fixed and commited. Now, all controls are disabled before evaluation to prevent temporary rendering at loading step. That's why different parts of XSLTForms have been changed and not yet fully tested... Thanks! -Alain > Hello Alain, > > There is a bug in the current build when you have an xforms:itemset with > a @nodeset of size=1. > > An exception is thrown it seems. > > The following code demonstrates the effect: > > <?xml version="1.0" encoding="UTF-8"?> > <?xml-stylesheet href="xsltforms/xsltforms.xsl" type="text/xsl"?><html > xmlns:aatams="http://www.imos.org.au/aatams" > xmlns:xf="http://www.w3.org/2002/xforms" > xmlns:ev="http://www.w3.org/2001/xml-events" > xmlns:wfs="http://www.opengis.net/wfs" > xmlns:ogc="http://www.opengis.net/ogc" > xmlns:ows="http://www.opengis.net/ows" > xmlns="http://www.w3.org/1999/xhtml" > xmlns:gml="http://www.opengis.net/gml"> > <head> > <title>AATAMS Web Interface</title> > <link href="aatams.css" rel="stylesheet" type="text/css"/> > <xf:model id="model1"> > <xf:instance id="inst_implant_type"> > <wfs:FeatureCollection> > <gml:featureMember> > <aatams:implant_type gml:id="aatams.implant_type.1"> > <aatams:name>INTERNAL</aatams:name> > </aatams:implant_type> > </gml:featureMember> > </wfs:FeatureCollection> > </xf:instance> > <xf:instance id="inst_subfeatures"> > <dummy xmlns=""> > <implant_type_id/> > </dummy> > </xf:instance> > <xf:bind id="implant_type" > nodeset="instance('inst_subfeatures')//implant_type_id" > type="xsd:string" > required="false()"/> > </xf:model> > </head> > <body> > <div class="form"> > <label>ADD TAG RELEASE</label> > <div class="form-contents"> > <div class="xfselect1"> > <xf:select1 bind="implant_type" appearance="minimal" > incremental="true()"> > <xf:label>implant type</xf:label> > <xf:itemset > nodeset="instance('inst_implant_type')/gml:featureMember/aatams:implant_type"> > <xf:value ref="@gml:id"/> > <xf:label ref="aatams:name"/> > </xf:itemset> > </xf:select1> > </div> > </div> > </div> > <br/> > <div id="console"/> > </body> > </html> > > > |