xsltforms-support Mailing List for XSLTForms (Page 66)
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: Efraim F. <efr...@gm...> - 2011-02-22 16:14:37
|
xquery version "1.0"; declare default element namespace "http://www.w3.org/1999/xhtml"; declare namespace xf="http://www.w3.org/2002/xforms"; declare namespace ev="http://www.w3.org/2001/xml-events"; declare option exist:serialize "method=xhtml media-type=text/xml indent=yes omit-xml-declaration=no process-xsl-pi=no doctype-public=-//W3C//DTD XHTML 1.1//EN doctype-system=http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"; processing-instruction {'xml-stylesheet'}{'type="text/xsl" href="/xforms/xsltforms/xsltforms.xsl"'}, processing-instruction {'xsltforms-options'}{'debug="yes"'}, <html> <head> <title>Make error</title> <xf:model> <xf:instance id="blank"> <blank xmlns=""/> </xf:instance> <xf:submission ref="instance('blank')" id="error-submit" method="get" action="do-error.xql" replace="none"> <xf:action ev:event="xforms-submit-error"> <xf:message> An error occurred. type: <xf:output value="event('error-type')"/> code: <xf:output value="event('response-status-code')"/> headers: <xf:output value="event('response-headers')"/> body: <!--xf:output value="event('response-body')"/--> </xf:message> </xf:action> </xf:submission> </xf:model> </head> <body> <div> <xf:submit submission="error-submit"> <xf:label>Error</xf:label> </xf:submit> </div> </body> </html> |
From: Claudius T. <cla...@ya...> - 2011-02-21 10:06:44
|
Hi, Fred, Solved, thank you for pointing out. Instead of kuberam.ro, one can check the link below. Claudius Teodorescu http://extxsltforms.sourceforge.net/sitKubera/index/index.xml |
From: <fr...@fl...> - 2011-02-21 06:25:21
|
Claudius, > Version 1.0.6 - 2010-02-22 I assume you mean 2011-02-22 > http://kuberam.ro The link doesn't work. Regards, Fred van Blommestein |
From: Claudius T. <cla...@ya...> - 2011-02-20 23:07:12
|
Hi, A new version of eXSLTForms is out. Changelog: Version 1.0.6 - 2010-02-22 1. This version of eXSLTForms works with the version of XSLTForms as of 2010-05-14. 2. This version contains a first approach of the integration of YUI2 DatTable widget in eXSLTForms. This first approach allows usage of various column attributes, data formatter and paginator. Claudius Teodorescu http://kuberam.ro |
From: COUTHURES A. <ala...@ag...> - 2011-02-18 21:40:14
|
Hello, I have added "file://" support in submission allowing users to save and restore data instances on local disk with regular files. This is based on a Java applet. There are some integrated security restrictions such as forbidden file extensions (.exe,...) and maximum size (100 Mo). BOM is not yet supported. Each time, a Java file dialog is displayed to allow the user to select the folder and to enter the file shortname. This dialog is initialized with the path after "file://", if any. I have tested this successfully on Windows with FireFox, IE and Chrome (there were some errors before accepting the applet, maybe wait instructions (1 or 2 seconds) might help...) but it doesn't work yet with Opera. Please find my test case below. Thank you for your feedbacks! -Alain ------------------------------------------------------------------------ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:xf="http://www.w3.org/2002/xforms"> <head> <title>Address Form</title> <xf:model> <xf:instance> <Address xmlns=""> <LocationStreetFullText/> <LocationCityName/> <LocationStateName/> <LocationPostalID/> </Address> </xf:instance> <xf:submission id="save" method="put" replace="none" action="file://"> <xf:message level="modeless" ev:event="xforms-submit-error">Submit error.</xf:message> </xf:submission> <xf:submission id="load" method="get" serialization="none" replace="instance" action="file://"> <xf:message level="modeless" ev:event="xforms-submit-error">Submit error.</xf:message> </xf:submission> </xf:model> </head> <body> <xf:group ref="/Address"> <fieldset> <legend>Mailing Address</legend> <xf:input ref="LocationStreetFullText"> <xf:label>Street: </xf:label> </xf:input> <br/> <xf:input ref="LocationCityName"> <xf:label>City: </xf:label> </xf:input> <br/> <xf:input ref="LocationStateName"> <xf:label>State: </xf:label> </xf:input> <br/> <xf:input ref="LocationPostalID"> <xf:label>Postal Code: </xf:label> </xf:input> </fieldset> </xf:group> <xf:submit submission="save"> <xf:label>Save to local disk</xf:label> </xf:submit> <xf:submit submission="load"> <xf:label>Restore from local disk</xf:label> </xf:submit> </body> </html> |
From: Efraim F. <efr...@gm...> - 2011-02-18 21:02:14
|
On 02/18/2011 03:00 PM, COUTHURES Alain wrote: >> Is xf:submission/includenamespaceprefixes implemented in XSLTForms? > @includenamespaceprefixes is not yet supported in the dataisland > branch. This shouldn't be difficult to add because an XSLT > transformation is used to serialize data, if browsers natively can. > > Do you need it urgently? No, not urgently. Thanks, -- --- Efraim Feinstein Lead Developer Open Siddur Project http://opensiddur.net http://wiki.jewishliturgy.org |
From: COUTHURES A. <ala...@fr...> - 2011-02-18 20:13:09
|
Hi, > Is xf:submission/includenamespaceprefixes implemented in XSLTForms? @includenamespaceprefixes is not yet supported in the dataisland branch. This shouldn't be difficult to add because an XSLT transformation is used to serialize data, if browsers natively can. Do you need it urgently? Thanks! -Alain |
From: Efraim F. <efr...@gm...> - 2011-02-17 18:42:49
|
Hi, Is xf:submission/includenamespaceprefixes implemented in XSLTForms? I see some references to it in the source code, but it's not clear to me if it's supposed to work. Thanks, -- --- Efraim Feinstein Lead Developer Open Siddur Project http://opensiddur.net http://wiki.jewishliturgy.org |
From: Leigh L K. Jr <lei...@xe...> - 2011-02-14 20:13:19
|
Calling the XPath extension function serialize(x) if x is an empty nodeset. In Firefox, it fails with a popup about a component failure. For example: <group ref="/path/to/parent"> <output value="serialize(x)" /> </group> This will fail if x doesn't exist, or even if parent doesn't exist. The only workaround I've found is a an instance with an empty element: <instance id="empty"><data xmlns=""><empty /></data></instance> <group ref="/path/to/parent"> <output value="serialize(instance('empty')/empty | x)" /> </group> Here's a proposed change to the serialize function which makes serialize return an empty string if there is no nodeset. Changes from xsltforms-dataisland-478.zip =================================================================== --- xsltforms.js (xsltforms-dataisland-478) +++ xsltforms.js (working copy) @@ -9241,6 +9241,7 @@ if (arguments.length == 0) { throw XPathCoreFunctionsExceptions.serializeNoContext; } + if (!nodeSet[0]) return ""; return Core.saveXML(nodeSet[0]); } ), |
From: Grégoire C. <gco...@gm...> - 2011-02-14 19:59:54
|
Hi Alain, Le 14/02/2011 20:55, COUTHURES Alain a écrit : > Hi Grégoire, > > I don't know Xalan much. I just read that its conformance was not full. > > XPath.create instructions are generated using *:node-set() function. > Apparently, old versions of Xalan define nodeset() instead. There > might be compatibility tricks to be added for Xalan... > > Can you get the version number of Xalan you're using? Yes of course: $ xalan -v Xalan version 1.10.0 Xerces version 2.8.0 This comes from the "xalan" package which is installed by Ubuntu 10.10. Thanks! Grégoire |
From: COUTHURES A. <ala...@ag...> - 2011-02-14 19:55:12
|
Hi Grégoire, I don't know Xalan much. I just read that its conformance was not full. XPath.create instructions are generated using *:node-set() function. Apparently, old versions of Xalan define nodeset() instead. There might be compatibility tricks to be added for Xalan... Can you get the version number of Xalan you're using? Thanks! -Alain Le 14/02/2011 20:28, Grégoire COLBERT a écrit : > Hi! > > Following Evgeny Gazdovsky's idea, I try to do a server-side transformation of my XSLTForm, to bypass a Google Maps limitation (see http://code.google.com/p/gmaps-api-issues/issues/detail?id=2820). > > There are two news about this server-side XSL transformation : > > - The good news is that server-side XSLT works fine with XSLTProc; > - The bad news is that it doesn't work with Xalan (and I must use Xalan because NetKernel's "active:xslt" accessor uses Xalan). > > When I "diff" the results, I notice that Xalan's output has two differences : > > - the lines beginning with "XPath.create" are missing (ouch!); > - the< and> characters are escaped to< and>. > > Are these known issues? If yes, are there some work-arounds? > > * Attachments : > > - test-wrong-order.xml : the source XSLTForm > - test-wrong-order-xalan.html : the file generated by Xalan > - test-wrong-order-xsltproc.html : the file generated by "xsltproc" > > * Commands to generate the files : > > xalan -out test-wrong-order-xalan.html -xsl xsltforms/branches/dataisland/build/xsltforms.xsl< test-wrong-order.xml > > xsltproc -o test-wrong-order-xsltproc.html --path xsltforms/branches/dataisland/build/ xsltforms/branches/dataisland/build/xsltforms.xsl test-wrong-order.xml > > Any help would be very appreciated! > > Thanks! > Grégoire > > > > ------------------------------------------------------------------------------ > The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: > Pinpoint memory and threading errors before they happen. > Find and fix more than 250 security defects in the development cycle. > Locate bottlenecks in serial and parallel code that limit performance. > http://p.sf.net/sfu/intel-dev2devfeb > > > _______________________________________________ > Xsltforms-support mailing list > Xsl...@li... > https://lists.sourceforge.net/lists/listinfo/xsltforms-support |
From: Leigh L K. Jr <lei...@xe...> - 2011-02-14 19:45:05
|
As long as XSLTForms restricts bindings to one bind per node, it would be nice to have some debugging support. Of course, it would be better to remove the restriction, but if not, here's a simple thing to do which gives you more info: if (bindid && this.element.id != bindid) { XFProcessor.error(el, "xforms-binding-exception", "Two binds affect one node: " + bindid + ", " + this.element.id); You'll see something like "xf-bind-8, xf-bind-9". Search for the 8th and 9th binds in your file and add unique id attributes to them, and you'll see those new names show up in the error message. Then you can be sure you've found the right ones. Leigh. |
From: Grégoire C. <gco...@gm...> - 2011-02-14 19:28:51
|
Hi! Following Evgeny Gazdovsky's idea, I try to do a server-side transformation of my XSLTForm, to bypass a Google Maps limitation (see http://code.google.com/p/gmaps-api-issues/issues/detail?id=2820). There are two news about this server-side XSL transformation : - The good news is that server-side XSLT works fine with XSLTProc; - The bad news is that it doesn't work with Xalan (and I must use Xalan because NetKernel's "active:xslt" accessor uses Xalan). When I "diff" the results, I notice that Xalan's output has two differences : - the lines beginning with "XPath.create" are missing (ouch!); - the < and > characters are escaped to < and >. Are these known issues? If yes, are there some work-arounds? * Attachments : - test-wrong-order.xml : the source XSLTForm - test-wrong-order-xalan.html : the file generated by Xalan - test-wrong-order-xsltproc.html : the file generated by "xsltproc" * Commands to generate the files : xalan -out test-wrong-order-xalan.html -xsl xsltforms/branches/dataisland/build/xsltforms.xsl < test-wrong-order.xml xsltproc -o test-wrong-order-xsltproc.html --path xsltforms/branches/dataisland/build/ xsltforms/branches/dataisland/build/xsltforms.xsl test-wrong-order.xml Any help would be very appreciated! Thanks! Grégoire |
From: Grégoire C. <gco...@gm...> - 2011-02-13 17:36:45
|
Hi! Le 13/02/2011 04:30, Efraim Feinstein a écrit : > Hi, > Never mind. I see that r480 has some new code in it for response > headers. I tried it with the attached code. I'm finding that it does > give the correct 404 error message when you press the button, but it > also returns a long error message in a popup dialog when the page is > first loaded. > > The text of the error is: > XSLTForms Exception > -------------------------- > (...) I get the same initialization error, but I don't get any output (the pop-up is not displayed and no JS error is raised). I use: <xf:action ev:event="xforms-submit-done"> <xf:message><xf:output value="event('response-status-code')"/></xf:message> </xf:action> This is based on the example at : http://www.w3.org/TR/xforms11/#submit-evt-submit-done Anyway, thank you Alain for your very quick answer! Best regards, Grégoire |
From: Efraim F. <efr...@gm...> - 2011-02-13 03:30:40
|
xquery version "1.0"; (: demo of bug where an initially out-of-range selection goes in-range : but the UI still shows it's out of range :) declare default element namespace "http://www.w3.org/1999/xhtml"; declare namespace xf="http://www.w3.org/2002/xforms"; declare namespace ev="http://www.w3.org/2001/xml-events"; declare option exist:serialize "method=xhtml media-type=text/xml indent=yes omit-xml-declaration=no process-xsl-pi=no doctype-public=-//W3C//DTD XHTML 1.1//EN doctype-system=http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"; processing-instruction {'xml-stylesheet'}{'type="text/xsl" href="/xforms/xsltforms/xsltforms.xsl"'}, processing-instruction {'xsltforms-options'}{'debug="yes"'}, <html> <head> <title>Bug demo</title> <xf:model> <xf:instance id="test"> <result xmlns=""> <something>tosend</something> </result> </xf:instance> <xf:submission ref="instance('test')" id="submit" method="get" action="event-submit.xql" instance="test" replace="instance"> <xf:message ev:event="xforms-submit-error"> An error has happened! type: <xf:output value="event('response-status-code')"/> reason: <xf:output value="event('response-reason-phrase')"/> </xf:message> </xf:submission> </xf:model> </head> <body> <div> <xf:submit submission="submit"> <xf:label>Get an error</xf:label> </xf:submit> </div> </body> </html> |
From: Efraim F. <efr...@gm...> - 2011-02-12 23:04:50
|
On 02/12/2011 02:16 PM, COUTHURES Alain wrote: > Grégoire, Efraim, > > I have extended excellent Kostis' implementation of event contexts to > support response headers and response code for both xforms-submit-done > and xforms-submit-error. > In which branch? -- --- Efraim Feinstein Lead Developer Open Siddur Project http://opensiddur.net http://wiki.jewishliturgy.org |
From: COUTHURES A. <ala...@ag...> - 2011-02-12 19:16:02
|
Grégoire, Efraim, I have extended excellent Kostis' implementation of event contexts to support response headers and response code for both xforms-submit-done and xforms-submit-error. Thank you for your feedbacks! -Alain Le 11/02/2011 17:52, Grégoire COLBERT a écrit : > Hi! > > Le 11/02/2011 16:58, Efraim Feinstein a écrit : >> To get response codes, the XForms spec says that you should be able >> to catch xf:submit-done or xf:submit-error and use the event() >> function to get the response codes and reasons, as described in >> http://www.w3.org/TR/xforms11/#submit . As far as I could tell, it >> doesn't work in XSLTForms. > > Very bad news! Alain, is this something that will be implemented > someday? Is it difficult to read the HTTP status code from JavaScript? > >> One way to work around the latter issue is to catch the error in your >> server side script before it returns and send back some XML >> describing the error/error code to the client, which can then handle >> xforms-submit-done differently if it receives the error code (the >> conditional xf:action/@if is helpful here). It's ugly, but it does work. > > Well, using XML error codes is what I do at the moment. But as I got a > better understanding of REST > <http://library.dzone.com/sites/all/files/refcardz/rc129-010d-rest_1.pdf>, > I want to make my server RESTful level 2 and this requires the use of > HTTP status codes. > > Thank you for your answer Efraim! > > Best regards, > Grégoire > > > ------------------------------------------------------------------------------ > The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: > Pinpoint memory and threading errors before they happen. > Find and fix more than 250 security defects in the development cycle. > Locate bottlenecks in serial and parallel code that limit performance. > http://p.sf.net/sfu/intel-dev2devfeb > > > _______________________________________________ > Xsltforms-support mailing list > Xsl...@li... > https://lists.sourceforge.net/lists/listinfo/xsltforms-support |
From: Grégoire C. <gco...@gm...> - 2011-02-11 19:22:20
|
Hi! I looked at the "svg.xq" file sent by Raja and was wondering if there had been progress about supporting external SVGs through the use of xs:anyURI, as in : <xf:model id="Dash-board"> <xf:instance id="svg-graph" xmlns=""> <svg-data xmlns=""> <graph xsi:type="xs:anyURI">http://localhost:8080/exist/rest/db/chart.svg</graph> </svg-data> </xf:instance> <xf:bind nodeset="instance('svg-graph')/graph" type="xs:anyURI"/> </xf:model> and : <xf:output ref="instance('svg-graph')/graph" mediatype="image/svg+xml"/> As a work-around, I use "image/*" instead of "image/svg+xml" to be able to use the "ref" attribute as a URI (instead of giving it an SVG instance's id). It's just : <xf:output mediatype="image/*" ref="concat('/services/svg/' , instance('some-instance')/some-value-for-the-svg)" model="some-model"/> Hope this helps! Grégoire Le 24/01/2011 07:31, Raja a écrit : > Hi Alain !!! > With this mail attached the sample svg file and xq file for display. > By > Rajamani marimuthu > XRX Team(Lead) > > > On 01/22/11, *COUTHURES Alain * <ala...@ag...> wrote: >> Hi Raja, >> >> >The Output with media type "image/svg+xml" not loading the image . >> Is there any problem in this type or no support? >> Yes, SVG support is still experimental, especially for Internet Explorer. >> >> Could you please send me an SVG test file? >> >> Thanks! >> >> -Alain >> > > -- > Rajamani Marimuthu > Junior Research Fellow-JRF > NIC -Open Technology Centre > Rajaji Bhavan > Besant Nagar, > Chennai - 90 > Cell : 9791125383 > > > ------------------------------------------------------------------------------ > Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! > Finally, a world-class log management solution at an even better price-free! > Download using promo code Free_Logger_4_Dev2Dev. Offer expires > February 28th, so secure your free ArcSight Logger TODAY! > http://p.sf.net/sfu/arcsight-sfd2d > > > _______________________________________________ > Xsltforms-support mailing list > Xsl...@li... > https://lists.sourceforge.net/lists/listinfo/xsltforms-support |
From: Grégoire C. <gco...@gm...> - 2011-02-11 16:53:16
|
Hi! Le 11/02/2011 16:58, Efraim Feinstein a écrit : > To get response codes, the XForms spec says that you should be able to > catch xf:submit-done or xf:submit-error and use the event() function > to get the response codes and reasons, as described in > http://www.w3.org/TR/xforms11/#submit . As far as I could tell, it > doesn't work in XSLTForms. Very bad news! Alain, is this something that will be implemented someday? Is it difficult to read the HTTP status code from JavaScript? > One way to work around the latter issue is to catch the error in your > server side script before it returns and send back some XML describing > the error/error code to the client, which can then handle > xforms-submit-done differently if it receives the error code (the > conditional xf:action/@if is helpful here). It's ugly, but it does work. Well, using XML error codes is what I do at the moment. But as I got a better understanding of REST <http://library.dzone.com/sites/all/files/refcardz/rc129-010d-rest_1.pdf>, I want to make my server RESTful level 2 and this requires the use of HTTP status codes. Thank you for your answer Efraim! Best regards, Grégoire |
From: Efraim F. <efr...@gm...> - 2011-02-11 15:59:05
|
Hi, On 02/11/2011 08:06 AM, Grégoire COLBERT wrote: > Le 05/01/2011 23:38, Stephen Cameron a écrit : >> >> Hello All, >> >> I have been reading up on REST, there is quite a bit more to it than >> I first imagined. >> >> Its essential to be able to read and set header information in the >> client, such as to read the "Location" header in a POST response to >> extract a newly generated resource id. >> >> I'm wondering if anyone has looked at this in respect of XSLTForms? >> > > Hi Stephen! > > I'm facing the same question! I would like to read the HTTP status > code from XSLTForms. Have you succeeded in doing this? There are essentially 2 ways (that I know of) to set headers: One of them is to set a session cookie, which is passed back in the response header and automatically passed in the request header of subsequent HTTP requests. It's somewhat un-REST-like in the strict sense, but you can use a REST-like design on the server side and treat the information in it like any other header-based information. The advantage of them is that your client side web application doesn't have to pass internal variables between pages. The second is the xf:header element as a child of the xf:submission element. It does work in XSLTForms. To get response codes, the XForms spec says that you should be able to catch xf:submit-done or xf:submit-error and use the event() function to get the response codes and reasons, as described in http://www.w3.org/TR/xforms11/#submit . As far as I could tell, it doesn't work in XSLTForms. One way to work around the latter issue is to catch the error in your server side script before it returns and send back some XML describing the error/error code to the client, which can then handle xforms-submit-done differently if it receives the error code (the conditional xf:action/@if is helpful here). It's ugly, but it does work. Hope this helps, -- --- Efraim Feinstein Lead Developer Open Siddur Project http://opensiddur.net http://wiki.jewishliturgy.org |
From: Grégoire C. <gco...@gm...> - 2011-02-11 15:32:17
|
Le 05/01/2011 23:38, Stephen Cameron a écrit : > > Hello All, > > > > I have been reading up on REST, there is quite a bit more to it than I > first imagined. > > > > Its essential to be able to read and set header information in the > client, such as to read the "Location" header in a POST response to > extract a newly generated resource id. > > > > I'm wondering if anyone has looked at this in respect of XSLTForms? > Hi Stephen! I'm facing the same question! I would like to read the HTTP status code from XSLTForms. Have you succeeded in doing this? Thanks! Grégoire |
From: Efraim F. <efr...@gm...> - 2011-02-10 17:46:59
|
Hi, The attached XForms document demonstrates a bug that occurs in a rare set of conditions. (1) The instance "result" holds a value controlled by an XForms control. It may be invalid when the XForms document is loaded (in the MWE, it is forced to be invalid). (2) Its invalidity causes an xforms-out-of-range exception on its select1 control. (3) The xforms-out-of-range exception causes a submission event, which loads a temporary instance with a default value (4) after the submission, the default value is copied into the result instance. That should make the result instance valid. Step (4) is the actual bug I'm trying to diagnose but I can't find an MWE that reproduces it exactly. This minimum working example shows a slightly different, but possibly related bug: In this case, step (3) happens and the setvalue occurs but the control is not updated to reflect the change in value of instance('result')/id Directly loading the value using xf:setvalue without a submission in between works as expected. In the latter case, the xforms-recalculate, xforms-revalidate, and xforms-in-range events are sent after the xf:setvalue; in the former case, they are not. (In the bug I'm really aiming at, xforms-in-range occurs and the control's state is updated, but the control remains invalid until another control is updated). It does not matter whether the xf:setvalue is in a handler for xforms-out-of-range or the submission's xforms-submit-done I'm using XSLTForms dataisland branch r479, running under eXist 1.5. I've tried this on Firefox 3.6 and Google Chrome 9.0 under Linux. Thanks, -- --- Efraim Feinstein Lead Developer Open Siddur Project http://opensiddur.net http://wiki.jewishliturgy.org |
From: Grégoire C. <gco...@gm...> - 2011-02-09 10:38:29
|
Le 09/02/2011 01:54, Leigh L Klotz Jr a écrit : > On 05/27/2010 03:09 PM, Grégoire Colbert wrote: >> Hi, >> >> The XForms 1.1 recommentation says that when multiple values from a >> <xf:select> are sent, they are separated with spaces. Is it possible >> to modify this to get underscore instead of spaces? If so, how? >> >> Thank you, >> Grégoire >> > You can use translate, like this, which does a GET of > /path/to/server?properties=a,b,c > <submission id="lookup" method="get" > ref="instance('main')" serialization="none" > replace="instance" instance="results"> > <resource value="concat('/path/to/server?properties=', > translate(instance('main')/properties, ' ', ','))" /> > </submission> > > You could also get value=a;value=b;value=c with select/itemset/copy and > the default serialization for method="get", but XSLTForms doesn't yet > implement select/itemset/copy. > > If you just want to put in underscores but leave the data in XML > instance data submitted, you can bind the select to a separate instance > and use bind/@calculate to use the same XPath translate() function to > place the data format you want into the submitted instance. > > Leigh. Thank you Leigh for answering this, but it was posted in May 2010! :-) For the records, I now use fn:string-join in the "resource" element of the submission element. It gives something like this: <xf:submission id="here-is-a-great-id" method="get" serialization="none" replace="instance" instance="instance-response-id"> <xf:resource value="concat('/some/service/' , fn:string-join(instance('instance-request-id')/someressource/key,'_'))"/> </xf:submission> That's almost the same as using "translate", obviously. Thanks! Grégoire |
From: Leigh L K. Jr <lei...@xe...> - 2011-02-09 00:54:17
|
On 05/27/2010 03:09 PM, Grégoire Colbert wrote: > Hi, > > The XForms 1.1 recommentation says that when multiple values from a > <xf:select> are sent, they are separated with spaces. Is it possible > to modify this to get underscore instead of spaces? If so, how? > > Thank you, > Grégoire > You can use translate, like this, which does a GET of /path/to/server?properties=a,b,c <submission id="lookup" method="get" ref="instance('main')" serialization="none" replace="instance" instance="results"> <resource value="concat('/path/to/server?properties=', translate(instance('main')/properties, ' ', ','))" /> </submission> You could also get value=a;value=b;value=c with select/itemset/copy and the default serialization for method="get", but XSLTForms doesn't yet implement select/itemset/copy. If you just want to put in underscores but leave the data in XML instance data submitted, you can bind the select to a separate instance and use bind/@calculate to use the same XPath translate() function to place the data format you want into the submitted instance. Leigh. |
From: Leigh L K. Jr <lei...@xe...> - 2011-02-09 00:38:04
|
On 01/25/2011 01:24 AM, srinivasan krishnamoorthy wrote: > > Hi, > > Here i used *copy element *with in multiple selection control. > Initially am checked this in xforms it working properly. when am > checked same query with xsltforms multiple option not working > properly..... > > i ll give you my xforms code will you try this with eXistdb and > convert into xsltforms(i need .xq format) and send me solution ..... > > > -- > - yours > > *Srinivasan Krishnamoorthy* > I believe select/itemset/copy is not implemented in xsltforms. I don't know if Alain has plans. There's well-specified semantics for it. - when a value becomes de-selected, the matching value is removed as if with delete. - when a value becomes selected, the value is inserted as if with insert. - other values in the select/@ref node children are not touched. Leigh. |