xsltforms-support Mailing List for XSLTForms (Page 101)
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: COUTHURES A. <ala...@ag...> - 2010-01-02 21:53:26
|
Leigh, Thank you for those two improvements. I have tested them successfully with latest Test 5.2.1.a of W3C XForms Test Suite after removing "xforms:" within @type. -Alain > In XSLTForms if I use > <xf:bind nodeset="foo" type="anyURI" /> > I get a popup error that says "Schema undefined not defined." > > I believe there are two possible things to fix here: > > 1. The error message could be better. > 2. XForms says that NCNames are considered to be in the XForms namespace, which means for anyURI that it's the xforms:anyURI type (union of empty string and xsd:anyURI). > > Here are some possible fixes. > Other fixes may be better, for example changing Schena.prototype.getType, but this is what I found. > Possible fix for #1: > > Schema.getTypeNS = function(ns, name) { > var schema = Schema.all[ns]; > > if (!schema) { > alert("Schema for namespace " + ns + " not defined; type " + type); > throw "Error"; > } > > var type = schema.types[name]; > > if (!type) { > alert("Type " + name + " not defined in namespace " + namespace); > throw "Error"; > } > > return type; > }; > > > Possible fix for #2: > Schema.getType = function(name) { > var res = name.split(":"); > if (typeof(res[1]) == "undefined") { > return Schema.getTypeNS(Schema.prefixes["xforms"], res[0]); > } else { > return Schema.getTypeNS(Schema.prefixes[res[0]], res[1]); > } > }; > > This supposes that the xforms:anyURI type is properly implemented, which is a separate issue I didn't explore. > > > Leigh. > ------------------------------------------------------------------------------ > This SF.Net email is sponsored by the Verizon Developer Community > Take advantage of Verizon's best-in-class app development support > A streamlined, 14 day to market process makes app distribution fast and easy > Join now and get one step closer to millions of Verizon customers > http://p.sf.net/sfu/verizon-dev2dev > _______________________________________________ > Xsltforms-support mailing list > Xsl...@li... > https://lists.sourceforge.net/lists/listinfo/xsltforms-support > > |
From: COUTHURES A. <ala...@ag...> - 2010-01-02 18:09:17
|
David, I have finally found a trick for xsf:dialog support inside of an xf:repeat so the test case you sent is now working for me with the latest SVN version. BTW, I have also added nested xsf:dialog support, with a workaround for IE6 bug about select and z-index. xsf:dialog is now richer than AJAXForms ajx:dialog (there is also, in AJAXForms, ajx:confirm which allows Javascript confirm() use for aborting an action processing but it's not supported in XSLTForms). When comparing xsf:dialog and xf:message, it appears to me that xf:message can just contain constant text strings and text output controls whereas controls of any kind can be in xsf:dialog. So xsf:dialog is a sort of extension of xf:message but with a different syntax. I now think it would be interesting to allow any kind of controls in xf:message without defining any new element with its own syntax. The first step for XSLTForms should be to render xf:message as a specific xsf:dialog (not anymore with Javascript alert()...). Suggestions and points of view are welcome in this mailing list. Happy New Year! -Alain |
From: Jesper T. <je...@tv...> - 2010-01-01 20:30:45
|
I am testing the DOM interface to the instance document using getInstanceDocument(), and I have no problems updating simpleContent of an element. But I have failed so far updating an attribute or creating new attributes and new elements from JavaScript using getInstanceDocument(). Is this failure due to lack of implementation in XSLTForms or haven't I been experimenting hard enough? Cheers, Jesper Tverskov http://www.xmlkurser.dk http://www.xmlplease.com |
From: David A. <am...@gm...> - 2009-12-30 18:30:43
|
Alain, That sounds great. Please keep me posted on how things go. A full test case is attached to this email. I am also pasting it below. <?xml version="1.0" encoding="iso-8859-1"?> <?xml-stylesheet href="../trunk/build/xsltforms.xsl" type="text/xsl"?> <?xsltforms-options debug="yes"?> <html menu="samples" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xf="http://www.w3.org/2002/xforms" xmlns:xsf="http://www.agencexml.com/xsltforms" xmlns="http://www.w3.org/1999/xhtml" > <head> <title>Dialog</title> <xf:model> <xf:instance> <root> <my-item> <value>0</value> </my-item> <my-item> <value>0</value> </my-item> <my-item> <value>0</value> </my-item> </root> </xf:instance> </xf:model> </head> <body> <xf:repeat nodeset="my-item"> <xsf:dialog id="dialog"> <xf:trigger> <xf:label>Close</xf:label> <xsf:hide ev:event="DOMActivate" dialog="dialog"/> </xf:trigger> <br/> <xf:select1 ref="value"> <xf:item> <xf:label>A</xf:label> <xf:value>0</xf:value> </xf:item> <xf:item> <xf:label>B</xf:label> <xf:value>1</xf:value> </xf:item> </xf:select1> </xsf:dialog> <xf:input ref="value"> <xf:label>Value=</xf:label> </xf:input> <xf:output ref="value"> <xf:label>Value=</xf:label> </xf:output> <xf:trigger> <xf:label>Modify</xf:label> <xsf:show ev:event="DOMActivate" dialog="dialog"/> </xf:trigger> </xf:repeat> </body> </html> Thanks, David On Wed, Dec 30, 2009 at 12:54 AM, COUTHURES Alain <ala...@ag...> wrote: > David, >> >> I would like to create multiple dialogs with an xf:repeat and have >> them open/close with multiple triggers. >> >> Because I am using the attribute 'id="dialog"' for the xsf:dialog >> element and that xf:dialog element is inside an xf:repeat, the divs >> generated by the xsf:dialog will all have the same "id" attribute >> value, so only the first generated div gets an "id" attribute of >> "dialog" and the rest all get marked as clones. >> >> Because only the first generated div gets an "id" attribute of >> "dialog", all the triggers open the same overlay dialog (which is the >> first generated div). >> > > In AJAXForms, ajx:dialog couldn't be cloned. To enable this with xsf:dialog, > a new Javascript class has to be created. Probably, required components are > already present, IdManager for example, but I have to perform some tests to > find the best way. > > Can you please send me a full test case? > > Thanks! > > -Alain > |
From: COUTHURES A. <ala...@ag...> - 2009-12-30 08:54:03
|
David, > I would like to create multiple dialogs with an xf:repeat and have > them open/close with multiple triggers. > > Because I am using the attribute 'id="dialog"' for the xsf:dialog > element and that xf:dialog element is inside an xf:repeat, the divs > generated by the xsf:dialog will all have the same "id" attribute > value, so only the first generated div gets an "id" attribute of > "dialog" and the rest all get marked as clones. > > Because only the first generated div gets an "id" attribute of > "dialog", all the triggers open the same overlay dialog (which is the > first generated div). > In AJAXForms, ajx:dialog couldn't be cloned. To enable this with xsf:dialog, a new Javascript class has to be created. Probably, required components are already present, IdManager for example, but I have to perform some tests to find the best way. Can you please send me a full test case? Thanks! -Alain |
From: David A. <am...@gm...> - 2009-12-30 02:11:35
|
I've been playing with the new xsf:dialog feature. I would like to create multiple dialogs with an xf:repeat and have them open/close with multiple triggers. Because I am using the attribute 'id="dialog"' for the xsf:dialog element and that xf:dialog element is inside an xf:repeat, the divs generated by the xsf:dialog will all have the same "id" attribute value, so only the first generated div gets an "id" attribute of "dialog" and the rest all get marked as clones. Because only the first generated div gets an "id" attribute of "dialog", all the triggers open the same overlay dialog (which is the first generated div). Here is an example: <xf:repeat nodeset="my-item" appearance="full"> <xf:trigger appearance="minimal"> <xf:label>Modify</xf:label> <xsf:show ev:event="DOMActivate" dialog="dialog"/> </xf:trigger> <xsf:dialog id="dialog"> <xf:trigger> <xf:label>Close</xf:label> <xsf:hide ev:event="DOMActivate" dialog="dialog"/> </xf:trigger> <span>This field value appears in the overlay: <xf:output ref="my-field"/></span> </xsf:dialog> </xf:repeat> Thank you, David |
From: COUTHURES A. <ala...@ag...> - 2009-12-29 14:31:38
|
Jesper, > Any news about support of AVT, Attribute Value Templates? I consider AVT support to be the next most important feature to add in XSLTForms but there are other candidates such as xf:range and xf:upload... > I really > need a way to make alternating colors in Select1 radio controls and in > XHTML table output when using xf:itemset or xf:repeat. > Extra CSS classes such as xforms-odd and xforms-even might also solve this. Would you be interested in ? > Any suggestions of what to do at the moment, for such an indispensable > basic feature? > No, sorry > Is my clumsy CSS solution, below, really the only way? > > xf|item {background-color:green} > xf|item + xf|item {background-color:red} > xf|item + xf|item + xf|item {background-color:green} > xf|item + xf|item + xf|item + xf|item {background-color:red} > xf|item + xf|item + xf|item + xf|item + xf|item {background-color:green} > etc. > > Thank you for suggesting this as a CSS workaround. Best regards, -Alain |
From: Claudius T. <cla...@ya...> - 2009-12-29 12:57:16
|
Download from here: http://sourceforge.net/projects/extxsltforms |
From: Jesper T. <je...@tv...> - 2009-12-29 12:56:23
|
Any news about support of AVT, Attribute Value Templates? I really need a way to make alternating colors in Select1 radio controls and in XHTML table output when using xf:itemset or xf:repeat. Any suggestions of what to do at the moment, for such an indispensable basic feature? Is my clumsy CSS solution, below, really the only way? xf|item {background-color:green} xf|item + xf|item {background-color:red} xf|item + xf|item + xf|item {background-color:green} xf|item + xf|item + xf|item + xf|item {background-color:red} xf|item + xf|item + xf|item + xf|item + xf|item {background-color:green} etc. Cheers Jesper Tverskov -- Jesper Tverskov http://www.xmlkurser.dk http://www.xmlplease.com |
From: Claudius T. <cla...@ya...> - 2009-12-29 11:43:40
|
Hi, Due to the kind nelp of Alain Couthures, we have now an extension element for xforms, which realizes an xsl transformstion. This extension can be downloaded from here https://sourceforge.net/project/admin/explorer.php?group_id=295393. Claudius Teodorescu |
From: COUTHURES A. <ala...@ag...> - 2009-12-28 13:58:50
|
Hello, Extensibility is now to be considered for XSLTForms. That's why, with the latest SVN version, it is now possible for other projects to integrate their own sources files without modifying XSLTForms files. The "messages_??.properties" files called from Javascript instructions mechanism is replaced by a similar mechanism, a "config.xsl" file called, of course, from XSLT instructions. XSLT templates can be added in the "config.xsl" file: for matching templates, priority use permits to replace XSLTForms genuine templates. Because named templates cannot be replaced, calling templates have to be changed too, but it would also be possible to test whether a similar named template, "ext-*" for example, is present in the "config.xsl" file. In the "config.xsl" file, the "config" named template allows to define options (<debug/>, <nocss/>) and localization values. It also allows to specify elements, such as <script> or <link> elements, to be added, in the HTML head element, just after xsltforms.js and xsltforms.css calls. Localization can now easily be based on a server-side treatment according to HTTP Accept-Language parameter but, as before, specifying "navigator" in the "config.xsl" file, will ask the Javascript part to, as before, load localization values according to the Javascript "navigator.language" value. Localization values are now stored in a dedicated instance, itself in a dedicated model: they can also be read with XPath and, eventually set by XForms actions or controls. These new features should be very useful for other projects (such as exsltforms : http://sourceforge.net/projects/exsltforms). Don't hesitate to contact me if this is causing problems with already operational use of XSLTForms. Thanks! -Alain |
From: Klotz, L. <Lei...@xe...> - 2009-12-23 00:10:42
|
In XSLTForms if I use <xf:bind nodeset="foo" type="anyURI" /> I get a popup error that says "Schema undefined not defined." I believe there are two possible things to fix here: 1. The error message could be better. 2. XForms says that NCNames are considered to be in the XForms namespace, which means for anyURI that it's the xforms:anyURI type (union of empty string and xsd:anyURI). Here are some possible fixes. Other fixes may be better, for example changing Schena.prototype.getType, but this is what I found. Possible fix for #1: Schema.getTypeNS = function(ns, name) { var schema = Schema.all[ns]; if (!schema) { alert("Schema for namespace " + ns + " not defined; type " + type); throw "Error"; } var type = schema.types[name]; if (!type) { alert("Type " + name + " not defined in namespace " + namespace); throw "Error"; } return type; }; Possible fix for #2: Schema.getType = function(name) { var res = name.split(":"); if (typeof(res[1]) == "undefined") { return Schema.getTypeNS(Schema.prefixes["xforms"], res[0]); } else { return Schema.getTypeNS(Schema.prefixes[res[0]], res[1]); } }; This supposes that the xforms:anyURI type is properly implemented, which is a separate issue I didn't explore. Leigh. |
From: Claudius T. <cla...@ya...> - 2009-12-15 13:12:07
|
With kind help and patience of Alain Couthures, we have now an elegant manner to send instances from a XForms page generated using xproc to another XForms page generated using xproc. This approach fills a gap and I guess is a temporary one, until XProc in eXist will use request object (see other topics <a href="http://old.nabble.com/XProc%3A-%22No-request-object-found-in-the-current-XQuery-context.%22-when-using-%22request%3Aget-parameter-names%28%29%22-ts25921906.html#a26533936">here</a>). For this, it is enough that one inserts the next JS script into the respective page: <script type="text/javascript"> <![CDATA[ XPathCoreFunctions["http://www.w3.org/2005/xpath-functions serialize"] = new XPathFunction(false, XPathFunction.DEFAULT_NONE, false, function(nodeSet) { return nodeSet.length === 0? "" : Writer.toString(nodeSet[0]); }); ]]> </script> And call the JS function like this: <xf:setvalue ref="instance('standardParametersInstance')/serializedInstanceString" value="serialize(instance('connectionParametersInstance'))"/> My suggestion is to have a dedicated instance for submission, as follows: <xf:instance id="submissionInstance"> <bindings> <binding port="connectionParameters"> <test/> </binding> </bindings> </xf:instance> And to fill and serialize this instance upon xforms-submit event of the respective submission. The serialized instance should be used within the resource element of the respective submission, as follows: <xf:resource value="instance('standardParametersInstance')/serializedInstanceString"/> <xf:action ev:event="xforms-submit"> <xf:setvalue ref="instance('standardParametersInstance')/serializedInstanceString" value="concat('nextXFormsPage.xproc?bindings=', serialize(instance('submissionInstance')))"/> </xf:action> Claudius Teodorescu |
From: Klotz, L. <Lei...@xe...> - 2009-12-14 22:09:07
|
The XForms Recommendation doesn't limit it to the attribute version. That would be up to an integration of XHTML and XForms to decide. Since XSLTForms is such an integration, it can decide to allow xf:repeat as child elements of table. Leigh. -----Original Message----- From: ala...@ag... [mailto:ala...@ag...] Sent: Monday, December 14, 2009 1:22 PM To: xsl...@li...; cd...@vi... Subject: Re: [Xsltforms-support] repeat table cells Hello Chris, xf:repeat doesn't add HTML elements by itself but you can specify any element inside, even TR and TD with XSLTForms (XForms specification considers it's not possible so attributes have to be used but there is no good reason for such a limitation). Thank you for testing XSLTForms! -Alain I noticed there is a way to create a repeat inside an HTML table creating a number of rows within a table. Is there a way to repeat within a row to create table cells (<td>)? I would like to create a grid. For example: <table> <tbody> <xf:repeat nodeset="rows/row"> <!-- CREATES TR --> <xf:repeat nodeset="../../columndata/data[@rowId = current()/@id]"> <!-- CREATES TD --> <xf:input ref="value" /> </xf:repeat> </xf:repeat> </tbody> </table> Thanks, Chris ------------------------------------------------------------------------------ Return on Information: Google Enterprise Search pays you back Get the facts. http://p.sf.net/sfu/google-dev2dev _______________________________________________ Xsltforms-support mailing list Xsl...@li... https://lists.sourceforge.net/lists/listinfo/xsltforms-support ------------------------------------------------------------------------------ Return on Information: Google Enterprise Search pays you back Get the facts. http://p.sf.net/sfu/google-dev2dev _______________________________________________ Xsltforms-support mailing list Xsl...@li... https://lists.sourceforge.net/lists/listinfo/xsltforms-support |
From: <ala...@ag...> - 2009-12-14 21:22:30
|
Hello Chris, xf:repeat doesn't add HTML elements by itself but you can specify any element inside, even TR and TD with XSLTForms (XForms specification considers it's not possible so attributes have to be used but there is no good reason for such a limitation). Thank you for testing XSLTForms! -Alain I noticed there is a way to create a repeat inside an HTML table creating a number of rows within a table. Is there a way to repeat within a row to create table cells (<td>)? I would like to create a grid. For example: <table> <tbody> <xf:repeat nodeset="rows/row"> <!-- CREATES TR --> <xf:repeat nodeset="../../columndata/data[@rowId = current()/@id]"> <!-- CREATES TD --> <xf:input ref="value" /> </xf:repeat> </xf:repeat> </tbody> </table> Thanks, Chris ------------------------------------------------------------------------------ Return on Information: Google Enterprise Search pays you back Get the facts. http://p.sf.net/sfu/google-dev2dev _______________________________________________ Xsltforms-support mailing list Xsl...@li... https://lists.sourceforge.net/lists/listinfo/xsltforms-support |
From: Jason K. <ja...@bi...> - 2009-12-14 20:47:23
|
Ok, ... is that not working? Seems like it should. Jason On Mon, Dec 14, 2009 at 8:06 AM, Christopher Dedels <cd...@vi...>wrote: > I noticed there is a way to create a repeat inside an HTML table creating a > number of rows within a table. Is there a way to repeat within a row to > create table cells (<td>)? > > I would like to create a grid. For example: > > <table> > <tbody> > <xf:repeat nodeset="rows/row"> <!-- CREATES TR --> > <xf:repeat nodeset="../../columndata/data[@rowId = current()/@id]"> > <!-- CREATES TD --> > <xf:input ref="value" /> > </xf:repeat> > </xf:repeat> > </tbody> > </table> > > Thanks, > > Chris > > > ------------------------------------------------------------------------------ > Return on Information: > Google Enterprise Search pays you back > Get the facts. > http://p.sf.net/sfu/google-dev2dev > _______________________________________________ > Xsltforms-support mailing list > Xsl...@li... > https://lists.sourceforge.net/lists/listinfo/xsltforms-support > |
From: Christopher D. <cd...@vi...> - 2009-12-14 16:19:06
|
I noticed there is a way to create a repeat inside an HTML table creating a number of rows within a table. Is there a way to repeat within a row to create table cells (<td>)? I would like to create a grid. For example: <table> <tbody> <xf:repeat nodeset="rows/row"> <!-- CREATES TR --> <xf:repeat nodeset="../../columndata/data[@rowId = current()/@id]"> <!-- CREATES TD --> <xf:input ref="value" /> </xf:repeat> </xf:repeat> </tbody> </table> Thanks, Chris |
From: Klotz, L. <Lei...@xe...> - 2009-12-08 18:28:36
|
Just offhand, maybe <group ref="instance('primary')/view[.='Special']">...</group> Leigh. ________________________________ From: Jason Kleban [mailto:ja...@bi...] Sent: Monday, December 07, 2009 10:13 PM To: xsl...@li... Subject: [Xsltforms-support] Nested switch/case Hi, Are nested switch/cases supported? It seems to me that they're not - no errors rendering but all cases are displayed. If not, how can this behavior be emulated? Upon load, I have a <view /> field in my model that should dictate the display of some elements within a switch-paged form. I've tried using <group ref="instance('primary')/[view = 'Special']" > ... </group> but this and variations results in a javascript error. (This is not within a repeat, but I've tried that too, just to try, but that didn't work either) Thanks, Jason |
From: Jason K. <ja...@bi...> - 2009-12-08 06:12:45
|
Hi, Are nested switch/cases supported? It seems to me that they're not - no errors rendering but all cases are displayed. If not, how can this behavior be emulated? Upon load, I have a <view /> field in my model that should dictate the display of some elements within a switch-paged form. I've tried using <group ref="instance('primary')/[view = 'Special']" > ... </group> but this and variations results in a javascript error. (This is not within a repeat, but I've tried that too, just to try, but that didn't work either) Thanks, Jason |
From: Jason K. <ja...@bi...> - 2009-12-07 22:20:50
|
xf:submission's validate parameter doesn't seem to work when = 'false()' or 'false'. Anyone know why/how to fix it? Also, what is the best way to differentiate between a data validation error and a submission error? Also, for a method='post', is there a way to handle this as an actual post in the browser rather than an ajax page replace? The best I've found is <xf:submission id="s02" method="post" replace="all" action="SubmissionHandler.aspx"> Thanks, Jason |
From: Klotz, L. <Lei...@xe...> - 2009-12-07 16:50:20
|
It's not xf:variable, but xf:setvalue and instance() function: <xf:instance id="positions"> <data xmlns=""> <position /> </data </xf:instance> ... <xf:setvalue ref="instance('positions')/position">1</xf:setvalue> <xf:setvalue ref="instance('positions')/position value="count(instance('main')/path/to/things/thing)-1" /> etc. Then to use them: <xf:input ref="path/to/things/thing[instance('positions')/position]"> ... Leigh. ________________________________ From: Jason Kleban [mailto:ja...@bi...] Sent: Saturday, December 05, 2009 8:42 AM To: COUTHURES Alain Cc: xsl...@li... Subject: Re: [Xsltforms-support] XForms,data in a repeat from a parallel instance nodeset Good to know about the axes support. What I've done instead is to make a new attribute for each node in my answers model, @index, and bind it to position. Then, I can reference that value with current()/@index from with the xpath to the question's index. One downside, potentially is the addition of the @index. How are we to reference xf:variables from within xpath or otherwise? I have been unsuccessful. The xsltforms parser doesn't like the '$'. Can you give examples? Thanks, Jason On Dec 5, 2009, at 5:38 AM, COUTHURES Alain <ala...@ag...> wrote: Jason, Axes such as "preceding-sibling::" are not yet supported by the XPath analyzer of XSLTForms, which is written with XSLT 1.0. About variables, you can create a work instance for them and use "xf:setvalue" to change their values. Thank you for testing XSLTForms! -Alain I'm still stuck on this. I've tried: <xf:output ref="instance('questions')/question[position() = (count(current()/preceding-sibling::*) + 1)]/@text"></xf:output> but xsltforms keeps complaining about the preceding-sibling::* Since I need instance('questions')/question[position() = (count(current()/preceding-sibling::*) + 1)] for several things, I'd like to be able to store this in a variable and use it throughout my repeater - however, I'm not sure how xsltforms supports this. Thanks, Jason On Fri, Dec 4, 2009 at 11:18 AM, Jason Kleban < <mailto:ja...@bi...> ja...@bi...> wrote: I have an XForm survey. I'd like to keep the survey questions in a separate xf:instance of the same model from the xf:instance that collects the answers. In one instance, a group containing 10 questions. In a second instance, a group to hold the 10 answers. The second instance will be submitted. I've tried using logic like the following: <xf:output ref="instance('questions')/question[position()]/@text"></xf:output> but that position() is always returning 1, because the context is of the questions xf:instance. Using the index('current-repeater') updates all 10 displayed questions to be the question at the index of the most recently focused repeat iteration. Is there a way to use a temporary variable in the xpath to accomplish this? Thanks, Jason ________________________________ ------------------------------------------------------------------------------ Join us December 9, 2009 for the Red Hat Virtual Experience, a free event focused on virtualization and cloud computing. Attend in-depth sessions from your desk. Your couch. Anywhere. <http://p.sf.net/sfu/redhat-sfdev2dev> http://p.sf.net/sfu/redhat-sfdev2dev ________________________________ _______________________________________________ Xsltforms-support mailing list <mailto:Xsl...@li...> Xsl...@li... <https://lists.sourceforge.net/lists/listinfo/xsltforms-support> https://lists.sourceforge.net/lists/listinfo/xsltforms-support |
From: COUTHURES A. <ala...@ag...> - 2009-12-06 19:10:14
|
Hello, > Hello, > > Where: > > xmlns:xs="http://www.w3.org/2001/XMLSchema" > > ...and... > > <xf:bind nodeset="date" type="xs:date" /> > > This: > > <xf:input ref="date"> > <xf:label>Date: </xf:label> > </xf:input> > > ...using XsltForms of course, is rendered in the browser as a date in > the American date format (MM/DD/YYYY). My locale is European (Slovenian). > > How do I change this? Can you provide a Slovenian messages.properties file please ? Thanks! -Alain |
From: Jure S. <Dus...@gm...> - 2009-12-06 17:07:40
|
Hello, Where: xmlns:xs="http://www.w3.org/2001/XMLSchema" ...and... <xf:bind nodeset="date" type="xs:date" /> This: <xf:input ref="date"> <xf:label>Date: </xf:label> </xf:input> ...using XsltForms of course, is rendered in the browser as a date in the American date format (MM/DD/YYYY). My locale is European (Slovenian). How do I change this? Thanks! LP, Jure |
From: Jason K. <ja...@bi...> - 2009-12-05 16:42:05
|
Good to know about the axes support. What I've done instead is to make a new attribute for each node in my answers model, @index, and bind it to position. Then, I can reference that value with current()/@index from with the xpath to the question's index. One downside, potentially is the addition of the @index. How are we to reference xf:variables from within xpath or otherwise? I have been unsuccessful. The xsltforms parser doesn't like the '$'. Can you give examples? Thanks, Jason On Dec 5, 2009, at 5:38 AM, COUTHURES Alain <ala...@ag...> wrote: Jason, Axes such as "preceding-sibling::" are not yet supported by the XPath analyzer of XSLTForms, which is written with XSLT 1.0. About variables, you can create a work instance for them and use "xf:setvalue" to change their values. Thank you for testing XSLTForms! -Alain I'm still stuck on this. I've tried: <xf:output ref="instance('questions')/question[position() = (count(current()/preceding-sibling::*) + 1)]/@text"></xf:output> but xsltforms keeps complaining about the preceding-sibling::* Since I need instance('questions')/question[position() = (count(current()/preceding-sibling::*) + 1)] for several things, I'd like to be able to store this in a variable and use it throughout my repeater - however, I'm not sure how xsltforms supports this. Thanks, Jason On Fri, Dec 4, 2009 at 11:18 AM, Jason Kleban <ja...@bi...> wrote: > I have an XForm survey. I'd like to keep the survey questions in a > separate xf:instance of the same model from the xf:instance that collects > the answers. In one instance, a group containing 10 questions. In a second > instance, a group to hold the 10 answers. The second instance will be > submitted. > > I've tried using logic like the following: > > <xf:output ref="instance('questions')/question[position()]/@text"></xf:output> > > but that position() is always returning 1, because the context is of the > questions xf:instance. Using the index('current-repeater') updates all 10 > displayed questions to be the question at the index of the most recently > focused repeat iteration. > > Is there a way to use a temporary variable in the xpath to accomplish this? > > Thanks, > > Jason > ------------------------------ ------------------------------------------------------------------------------ Join us December 9, 2009 for the Red Hat Virtual Experience, a free event focused on virtualization and cloud computing. Attend in-depth sessions from your desk. Your couch. Anywhere.http://p.sf.net/sfu/redhat-sfdev2dev ------------------------------ _______________________________________________ Xsltforms-support mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/xsltforms-support |
From: COUTHURES A. <ala...@ag...> - 2009-12-05 13:50:57
|
Jason, Axes such as "preceding-sibling::" are not yet supported by the XPath analyzer of XSLTForms, which is written with XSLT 1.0. About variables, you can create a work instance for them and use "xf:setvalue" to change their values. Thank you for testing XSLTForms! -Alain > > I'm still stuck on this. I've tried: > |<xf:output ref="instance('questions')/question[position() = (count(current()/preceding-sibling::*) + 1)]/@text"></xf:output> > > | > but xsltforms keeps complaining about the| preceding-sibling::*| > > Since I need| instance('questions')/question[position() = > (count(current()/preceding-sibling::*) + 1)]| for several things, I'd > like to be able to store this in a variable and use it throughout my > repeater - however, I'm not sure how xsltforms supports this. > > Thanks, > > Jason > > > On Fri, Dec 4, 2009 at 11:18 AM, Jason Kleban <ja...@bi... > <mailto:ja...@bi...>> wrote: > > I have an XForm survey. I'd like to keep the survey questions in a > separate xf:instance of the same model from the xf:instance that > collects the answers. In one instance, a group containing 10 > questions. In a second instance, a group to hold the 10 answers. > The second instance will be submitted. > > I've tried using logic like the following: > > |<xf:output ref="instance('questions')/question[position()]/@text"></xf:output> > > | > > but that position() is always returning 1, because the context is > of the questions xf:instance. Using the index('current-repeater') > updates all 10 displayed questions to be the question at the index > of the most recently focused repeat iteration. > > Is there a way to use a temporary variable in the xpath to > accomplish this? > > Thanks, > > Jason > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------------ > Join us December 9, 2009 for the Red Hat Virtual Experience, > a free event focused on virtualization and cloud computing. > Attend in-depth sessions from your desk. Your couch. Anywhere. > http://p.sf.net/sfu/redhat-sfdev2dev > ------------------------------------------------------------------------ > > _______________________________________________ > Xsltforms-support mailing list > Xsl...@li... > https://lists.sourceforge.net/lists/listinfo/xsltforms-support > |