xsltforms-support Mailing List for XSLTForms (Page 15)
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: Tim T. <tim...@gm...> - 2016-11-10 18:31:21
|
Alain, all, Is it possible to group output using variables and nested repeats in XSLTForms? See this SO question for an example using Orbeon: http://stackoverflow.com/questions/5938064/sorted-and-grouped-data-table-in-xforms When I try to implement this pattern in XSLTForms, using fn:distinct-values, I get a "too much recursion" error. Thanks, Tim -- Tim A. Thompson Metadata Librarian (Spanish/Portuguese Specialty) Princeton University Library |
From: <bc...@sh...> - 2016-10-31 22:02:48
|
Hello Alain - thank you for taking the time to reply. I haven't tried anything as yet as I did not have any clue as to how to proceed. With your suggestion, please could you provide me with a quick example of what you mean to get me underway ? Regards Habs On 31 October 2016 at 21:17, Alain Couthures <ala...@ag...> wrote: > Hello Habs, > > Because "xsd:string" is the default type, did you try to define a dummy > schema with every complex type considered as atomic string so XSLTForms > cannot complain about missing type declarations? > > Thank you for your feedback! > > --Alain > > > Le 31/10/2016 à 10:01, bc...@sh... a écrit : > > Good morning everyone > > I am looking for clarification on how XSLTForms handles instance documents > where elements may contain xsi:type attributes (see snippet below), with > regards to the requirement for and location of schemas. > > Currently I pull in an instance document where this is the case and > XSLTForms is throwing up the error: "Schema for namespace undefined not > defined for type co" > > - followed by an exception: "Error dispatching event > 'xforms-model-construct' :" > > Which has a check box to prevent creating additional dialogues. > > > If the error dialogue is closed etc, then it goes away the form continues > to load, however if any other action is taken (in my case I noticed it when > moving amongst a repeated set), then the error occurs again and again. If > I check the box to prevent creating additional dialogues the form stops > responding. > > (Please accept that I have all the namespaces present and correct.) > > Now this error is most likely due to the fact that the instance document > does not refer to a schema and neither does the xform have a scheme > attribute on the 'model' element (or have an inline schema reference for > that matter). > > I believe, though I am not sure, that in any case complex types (elements > with child elements etc) are not checked when referring to schemas in > xforms. Only simple types are validated. > > For my use it does not matter to check and in any case they are complex > types I am referring to, so I would like to know if the XSLTForms behaviour > allows for 'turning off' schema checking and if so how to do it please? and > if not, what may I try to remove the error messages at least for complex > types ? > > Thank you for the insight and comments. > Regards > Habs > > Snippet of xml in an instance document: > > <catalogue> > . > . > <products> > <product xsi:type="co:book"/> > <uid>2344</uid> > <isbn>432432</isbn> > . > . > </product> > <product xsi:type="co:magazine"/> > <uid>9999</uid> > <author>432432</isbn> > . > . > </product> > </products> > . > . > </catalogue> > > > ------------------------------------------------------------------------------ > The Command Line: Reinvented for Modern Developers > Did the resurgence of CLI tooling catch you by surprise? > Reconnect with the command line and become more productive. > Learn the new .NET and ASP.NET CLI. Get your free copy!http://sdm.link/telerik > > > > _______________________________________________ > Xsltforms-support mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/xsltforms-support > > > |
From: Alain C. <ala...@ag...> - 2016-10-31 21:31:15
|
Hello Habs, Because "xsd:string" is the default type, did you try to define a dummy schema with every complex type considered as atomic string so XSLTForms cannot complain about missing type declarations? Thank you for your feedback! --Alain Le 31/10/2016 à 10:01, bc...@sh... a écrit : > Good morning everyone > > I am looking for clarification on how XSLTForms handles instance > documents where elements may contain xsi:type attributes (see snippet > below), with regards to the requirement for and location of schemas. > > Currently I pull in an instance document where this is the case and > XSLTForms is throwing up the error: "Schema for namespace undefined > not defined for type co" > > - followed by an exception: "Error dispatching event > 'xforms-model-construct' :" > > Which has a check box to prevent creating additional dialogues. > > > If the error dialogue is closed etc, then it goes away the form > continues to load, however if any other action is taken (in my case I > noticed it when moving amongst a repeated set), then the error occurs > again and again. If I check the box to prevent creating additional > dialogues the form stops responding. > > (Please accept that I have all the namespaces present and correct.) > > Now this error is most likely due to the fact that the instance > document does not refer to a schema and neither does the xform have a > scheme attribute on the 'model' element (or have an inline schema > reference for that matter). > > I believe, though I am not sure, that in any case complex types > (elements with child elements etc) are not checked when referring to > schemas in xforms. Only simple types are validated. > > For my use it does not matter to check and in any case they are > complex types I am referring to, so I would like to know if the > XSLTForms behaviour allows for 'turning off' schema checking and if so > how to do it please? and if not, what may I try to remove the error > messages at least for complex types ? > > Thank you for the insight and comments. > Regards > Habs > > Snippet of xml in an instance document: > > <catalogue> > . > . > <products> > <product xsi:type="co:book"/> > <uid>2344</uid> > <isbn>432432</isbn> > . > . > </product> > <product xsi:type="co:magazine"/> > <uid>9999</uid> > <author>432432</isbn> > . > . > </product> > </products> > . > . > </catalogue> > > > ------------------------------------------------------------------------------ > The Command Line: Reinvented for Modern Developers > Did the resurgence of CLI tooling catch you by surprise? > Reconnect with the command line and become more productive. > Learn the new .NET and ASP.NET CLI. Get your free copy! > http://sdm.link/telerik > > > _______________________________________________ > Xsltforms-support mailing list > Xsl...@li... > https://lists.sourceforge.net/lists/listinfo/xsltforms-support |
From: <bc...@sh...> - 2016-10-31 09:02:09
|
Good morning everyone I am looking for clarification on how XSLTForms handles instance documents where elements may contain xsi:type attributes (see snippet below), with regards to the requirement for and location of schemas. Currently I pull in an instance document where this is the case and XSLTForms is throwing up the error: "Schema for namespace undefined not defined for type co" - followed by an exception: "Error dispatching event 'xforms-model-construct' :" Which has a check box to prevent creating additional dialogues. If the error dialogue is closed etc, then it goes away the form continues to load, however if any other action is taken (in my case I noticed it when moving amongst a repeated set), then the error occurs again and again. If I check the box to prevent creating additional dialogues the form stops responding. (Please accept that I have all the namespaces present and correct.) Now this error is most likely due to the fact that the instance document does not refer to a schema and neither does the xform have a scheme attribute on the 'model' element (or have an inline schema reference for that matter). I believe, though I am not sure, that in any case complex types (elements with child elements etc) are not checked when referring to schemas in xforms. Only simple types are validated. For my use it does not matter to check and in any case they are complex types I am referring to, so I would like to know if the XSLTForms behaviour allows for 'turning off' schema checking and if so how to do it please? and if not, what may I try to remove the error messages at least for complex types ? Thank you for the insight and comments. Regards Habs Snippet of xml in an instance document: <catalogue> . . <products> <product xsi:type="co:book"/> <uid>2344</uid> <isbn>432432</isbn> . . </product> <product xsi:type="co:magazine"/> <uid>9999</uid> <author>432432</isbn> . . </product> </products> . . </catalogue> |
From: C. M. Sperberg-M. <cm...@bl...> - 2016-10-11 08:40:41
|
> On Oct 10, 2016, at 6:23 AM, bc...@sh... wrote: > > Hello xsltforms-support@ > > I think I understand correctly that it is not allowed to POST/PUT a resource to a domain other than the one the xform was loaded from. > > Is it possible to GET a resource from a different domain to the one the xform was loaded from please? If it is, I haven’t figured out how. (There may be ways to set the browser configuration to allow it, but I haven’t figured out how to do it for myself, let alone explain to users what they would have to do. You may have better luck in that regard.) In my experience, dealing with the Same-Origin policy in the browser is one of the most challenging issues in deploying XForms solutions. (Challenging in part because it seems to be hard to get clear accurate information about what exactly browsers do and don’t allow, and challenging because for those not actively engaged in security work the restrictions often appear arbitrary, capricious, and unmotivated. I have been told on good authority that they really aren’t, but it’s hard to believe that, given that the browser vendors don’t enforce similar constraints against Javascript.) What I end up doing is configuring Apache on my server to work as a proxy server, and specifying in the .htaccess configuration file for a particular directory that if the user requests resource XYZ/W/VU.xml from that directory, the server should fetch http://ww.otherserver.example.com/W/XYZ/VU.xml (or whatever) and send it to the client. In shared hosting environments, the service provider sometimes won’t allow using Apache as a proxy; in that case, I write a simple bash or PHP script to do essentially the same thing (taking care to serve a clearly identified set of URIs from a clearly identified originating host, to try to minimize whatever security exposure there is in such a proxy service). I hope this helps. ******************************************** C. M. Sperberg-McQueen Black Mesa Technologies LLC cm...@bl... http://www.blackmesatech.com ******************************************** |
From: <bc...@sh...> - 2016-10-11 08:17:33
|
Hi Thank you for the response and the food for though it has provided regarding the use of a proxy of some sort as a 'get around'. After all this time, I would have thought that some progress would have been made to allow cross-domain resource access that respects a balance of functionality requirement and security. Perhaps it is a little more risky and troublesome than I can imagine. I will give your suggestion some thought. Thank you again. Habs On 10 October 2016 at 21:38, C. M. Sperberg-McQueen < cm...@bl...> wrote: > > > On Oct 10, 2016, at 6:23 AM, bc...@sh... wrote: > > > > Hello xsltforms-support@ > > > > I think I understand correctly that it is not allowed to POST/PUT a > resource to a domain other than the one the xform was loaded from. > > > > Is it possible to GET a resource from a different domain to the one the > xform was loaded from please? > > If it is, I haven’t figured out how. (There may be ways to set the > browser configuration to allow it, but I haven’t figured out how to do > it for myself, let alone explain to users what they would have to do. > You may have better luck in that regard.) > > In my experience, dealing with the Same-Origin policy in the > browser is one of the most challenging issues in deploying XForms > solutions. (Challenging in part because it seems to be hard to > get clear accurate information about what exactly browsers do > and don’t allow, and challenging because for those not actively > engaged in security work the restrictions often appear arbitrary, > capricious, and unmotivated. I have been told on good authority > that they really aren’t, but it’s hard to believe that, given that the > browser vendors don’t enforce similar constraints against > Javascript.) > > What I end up doing is configuring Apache on my server to work > as a proxy server, and specifying in the .htaccess configuration > file for a particular directory that if the user requests resource > XYZ/W/VU.xml from that directory, the server should fetch > http://ww.otherserver.example.com/W/XYZ/VU.xml (or whatever) > and send it to the client. > > In shared hosting environments, the service provider sometimes > won’t allow using Apache as a proxy; in that case, I write a simple > bash or PHP script to do essentially the same thing (taking care to > serve a clearly identified set of URIs from a clearly identified > originating host, to try to minimize whatever security exposure there > is in such a proxy service). > > I hope this helps. > > ******************************************** > C. M. Sperberg-McQueen > Black Mesa Technologies LLC > cm...@bl... > http://www.blackmesatech.com > ******************************************** > > |
From: <bc...@sh...> - 2016-10-10 12:46:30
|
Hello xsltforms-support@ I think I understand correctly that it is not allowed to POST/PUT a resource to a domain other than the one the xform was loaded from. Is it possible to GET a resource from a different domain to the one the xform was loaded from please? Thank you for some advice. Regards to everyone Habs |
From: Mark S. <m_s...@ma...> - 2016-09-19 11:18:56
|
Hi, My form contains a select1 populated by an itemset. Sometimes the itemset has only one member. In this case I am unable to actually select the value shown in the select1 unless I set appearance=“full”. Is there anyway round this that I am missing? Best wishes Mark |
From: Alain C. <ala...@ag...> - 2016-09-04 18:02:26
|
Please have a look at https://stackoverflow.com/questions/36005795/wrap-text-in-element-using-xforms Mixing such XSLTForms extensions for getting and setting the cursor position and the possibly selection content should help you. You should keep in mind that XForms engines can just edit leaves content which means that the textarea control can just edit a serialization of a subtree. Supporting binding of a subtree for a textarea control might be another extension to avoid serializing into an intermediate node... Because those extensions have not been specified by the XForms Work Group, your suggestions are, of course, welcome to improve them according to your requirements. Thank you for your feedback! --Alain Le 03/09/2016 à 05:04, C. M. Sperberg-McQueen a écrit : > When displaying nodes in input widgets or text widgets, is there > a way to insert an XML element at the user's current cursor > position, if they press a button? > > What I have in mind is similar to the buttons labeled 'ul', 'ol', > 'li', 'b' in some in-browser HTML editors, which insert the indicated > tag into a text box at the user's current cursor position in that box. > > I am not at the moment trying to allow the user to edit mixed > content (so I don't think TinyMCE is what I want); what I want > is to display an element which needs to be split in two and allow > the user to tell me where to split it. > > For example, I might have a program that guesses where sentence > boundaries occur in a text, and want to build an XForm to allow > a user to correct the sentence tagging. > > The automatic sentence tagger can make two kinds of mistakes: > > 1) False positive: It can place a sentence boundary where it > shouldn't. > > So in front of every sentence element except the first in a paragraph, > I'll want a button saying "merge", meaning "merge this sentence > element with the preceding sentence element", to correct this > error. > > 2) False negative: it can fail to place a sentence boundary where > it should. > > So I'd like to be able to allow the user to click within a single > sentence element to place the cursor, then click a button which > means "split this sentence element here." Ideally, I don't want > them to be able to change the text, only to indicate a place and > say "split here." > > As another example: if my project is marking boundaries between > the morphemes in a word, I want to handle transcription of the > document in one step, and in a second step ask the users to > segment each word into morphemes. The same two operations are > needed: split this element here, and (to undo mistakes) join these > two elements. > > I am willing to accept the insertion of an empty element meaning > 'segment-boundary-here' as a substitute for splitting the element, > because I can always use XSLT to detect the empty boundary elements > and perform the splits. > > Is there any way to do this with XForms (and more specifically with > XSLTForms)? If I can't find a way to do this, I suppose I'll end up > either (a) giving the user an input widget and saying "insert a * > at each morpheme boundary", and rejecting input in which anything > has changed other than insertion of *, or (b) displaying the word > o n e l e t t e r a t a t i m e, with buttons between them saying > "split here". (But doing a whole sentence at a time with that interface > would be very awkward.) > > Thanks for any help anyone here can provide. > > |
From: C. M. Sperberg-M. <cm...@bl...> - 2016-09-03 15:06:10
|
When displaying nodes in input widgets or text widgets, is there a way to insert an XML element at the user's current cursor position, if they press a button? What I have in mind is similar to the buttons labeled 'ul', 'ol', 'li', 'b' in some in-browser HTML editors, which insert the indicated tag into a text box at the user's current cursor position in that box. I am not at the moment trying to allow the user to edit mixed content (so I don't think TinyMCE is what I want); what I want is to display an element which needs to be split in two and allow the user to tell me where to split it. For example, I might have a program that guesses where sentence boundaries occur in a text, and want to build an XForm to allow a user to correct the sentence tagging. The automatic sentence tagger can make two kinds of mistakes: 1) False positive: It can place a sentence boundary where it shouldn't. So in front of every sentence element except the first in a paragraph, I'll want a button saying "merge", meaning "merge this sentence element with the preceding sentence element", to correct this error. 2) False negative: it can fail to place a sentence boundary where it should. So I'd like to be able to allow the user to click within a single sentence element to place the cursor, then click a button which means "split this sentence element here." Ideally, I don't want them to be able to change the text, only to indicate a place and say "split here." As another example: if my project is marking boundaries between the morphemes in a word, I want to handle transcription of the document in one step, and in a second step ask the users to segment each word into morphemes. The same two operations are needed: split this element here, and (to undo mistakes) join these two elements. I am willing to accept the insertion of an empty element meaning 'segment-boundary-here' as a substitute for splitting the element, because I can always use XSLT to detect the empty boundary elements and perform the splits. Is there any way to do this with XForms (and more specifically with XSLTForms)? If I can't find a way to do this, I suppose I'll end up either (a) giving the user an input widget and saying "insert a * at each morpheme boundary", and rejecting input in which anything has changed other than insertion of *, or (b) displaying the word o n e l e t t e r a t a t i m e, with buttons between them saying "split here". (But doing a whole sentence at a time with that interface would be very awkward.) Thanks for any help anyone here can provide. -- **************************************************************** * C. M. Sperberg-McQueen, Black Mesa Technologies LLC * http://www.blackmesatech.com * http://cmsmcq.com/mib * http://balisage.net **************************************************************** |
From: Tim T. <tim...@gm...> - 2016-07-13 18:20:45
|
Alain, Many thanks for the latest version of XSLTForms! I look forward to using the new functionality. I noticed in this version that the instance viewer in the XSLTForms profiler seems to be broken (tested using Firefox and Chrome on Ubuntu). Nothing displays when choosing an instance from the viewer menu. Reverting to the previous version, the instance data displays again. Best regards, Tim -- Tim A. Thompson Metadata Librarian (Spanish/Portuguese Specialty) Princeton University Library <ta...@pr...> |
From: Tim T. <tim...@gm...> - 2016-07-05 20:03:08
|
Michael, A similar use case came up on Stack Overflow earlier this year: http://stackoverflow.com/questions/36005795/wrap-text-in-element-using-xforms. Alain has added a couple of new extension actions (xf:wrap[1] and xf:setselection[2]) to address it. (The xf:setselection action also provides access to DOM properties like selectionStart and selectionEnd, but this feature doesn't quite work as expected because the offsets aren't updated when additional "tags" are inserted.) Best, Tim [1] http://www.agencexml.com/direct/wrap/wrap.xml [2] http://www.agencexml.com/direct/wrap/setselection.xml -- Tim A. Thompson Metadata Librarian (Spanish/Portuguese Specialty) Princeton University Library On Tue, Jul 5, 2016 at 3:31 PM, C. M. Sperberg-McQueen < cm...@bl...> wrote: > Is there any way, in XSLTForms, to get access to the string of > characters the user has selected with a mouse? > > For example, imagine an xf:input bound to a PCDATA element, > in a mixed-content document. The user would like to tag > some part of the text with a sub-element, e.g. to change > > <p>Nobody does humility better than me.</p> > > to > > <p><emph>Nobody</emph> does humility better than me.</p> > > I have in mind a display of the text node, followed by a button > reading (say) "Tag selected text as 'emph'". > > Possible? Possible without writing functions in Javascript? > Not possible? > > best, > > Michael > > p.s. Yes, I am aware of the TinyMCE editor; I am trying to see how > far one can go without it or something analogous. (And the last > time I tried, I couldn't get TinyMCE to do what I wanted. I'll > try again sometime, but my question remains.) > > -- > **************************************************************** > * C. M. Sperberg-McQueen, Black Mesa Technologies LLC > * http://www.blackmesatech.com > * http://cmsmcq.com/mib > * http://balisage.net > **************************************************************** > > > > > > > ------------------------------------------------------------------------------ > Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San > Francisco, CA to explore cutting-edge tech and listen to tech luminaries > present their vision of the future. This family event has something for > everyone, including kids. Get more information and register today. > http://sdm.link/attshape > _______________________________________________ > Xsltforms-support mailing list > Xsl...@li... > https://lists.sourceforge.net/lists/listinfo/xsltforms-support > |
From: C. M. Sperberg-M. <cm...@bl...> - 2016-07-05 19:32:03
|
Is there any way, in XSLTForms, to get access to the string of characters the user has selected with a mouse? For example, imagine an xf:input bound to a PCDATA element, in a mixed-content document. The user would like to tag some part of the text with a sub-element, e.g. to change <p>Nobody does humility better than me.</p> to <p><emph>Nobody</emph> does humility better than me.</p> I have in mind a display of the text node, followed by a button reading (say) "Tag selected text as 'emph'". Possible? Possible without writing functions in Javascript? Not possible? best, Michael p.s. Yes, I am aware of the TinyMCE editor; I am trying to see how far one can go without it or something analogous. (And the last time I tried, I couldn't get TinyMCE to do what I wanted. I'll try again sometime, but my question remains.) -- **************************************************************** * C. M. Sperberg-McQueen, Black Mesa Technologies LLC * http://www.blackmesatech.com * http://cmsmcq.com/mib * http://balisage.net **************************************************************** |
From: C. M. Sperberg-M. <cm...@bl...> - 2016-07-05 19:24:37
|
On Jun 28, 2016, at 1:37 PM, Alain Couthures wrote: > As a possible workaround, you might try to insert the text, before the > submission being effectively sent, at the event "xforms-submit-serialize". Thank you for the suggestion. I have now finally had the opportunity to try it. For the record, this form of the submission did not work: <xf:submission id="send-query" resource="./balbus.php" method="get" replace="instance" instance="results"> <xf:delete ev:event="xforms-submit" nodeset="instance('results')/child::node()"/> <xf:insert ev:event="xforms-submit-serialize" context="instance('results')" origin="instance('ui')/query-in-progress"/> </xf:submission> (The use of different events on the delete and insert was an attempt to force them to happen in a particular order. Using xforms-submit-serialize on both didn't work, either.) But when the submission takes this form, I got the desired behavior (the old results vanish and the text 'Query in progress' appears instead): <xf:submission id="send-query" resource="./balbus.php" method="get" replace="instance" instance="results"> <xf:setnode ev:event="xforms-submit-serialize" ref="instance('results')" inner="serialize(instance('ui')/query-in-progress)"/> </xf:submission> I do not understand why setnode should work when insert + delete does not (and if anyone reading this understands why, I'll be glad of an explanation), but for the moment I'm happy, and I record this outcome for the sake of anyone who finds this thread while trying to solve a similar problem. Michael > > Thank you for your feedback! > > --Alain > > Le 20/06/2016 à 20:32, C. M. Sperberg-McQueen a écrit : >> I have a form that performs a query against a database back end, >> shows the results, and keeps the search box open so the user can >> issue a new search. >> >> http://tlrr.blackmesatech.com/2016/01/balbus.xhtml >> >> (Useful searches: "Alfenus", "Balbus" for fast searches, "Cicero" for a >> slower one.) >> >> In the current version of the form, nothing visual happens when >> the user issues a new search; if the search is slow, the user can think >> "something went wrong, the browser didn't notice the click, I'll >> click again". So I'd like the Search button to clear the old results, >> display the text "Query in progress ..." in some way (ideally in the >> work area where the results used to be), and issue the query submission >> to the back end. >> >> A first cut made the trigger look like this: >> >> <xf:trigger> >> <xf:label>Search</xf:label> >> <xf:action ev:event="DOMActivate"> >> <xf:delete nodeset="instance('results')/child::node()"/> >> <xf:insert context="instance('results')" origin="instance('ui')/query-in-progress"/> >> <xf:setvalue ref="instance('q')/startpos" value="1"/> >> <xf:send submission="send-query"/> >> </xf:action> >> </xf:trigger> >> >> And I added the 'Query in progress ...' display this way: >> >> <xf:group ref="instance('results')/query-in-progress"> >> <p>Query in progress ...</p> >> </xf:group> >> >> (It should be noted that the send-query submission replaces the >> 'results' instance entirely, so the empty 'query-in-progress' element >> there goes away when the results of the query are returned.) >> >> The trigger and group just shown, however, do not in fact make >> the old results disappear or the text "Query in progress ..." appear; >> there no change to the display until the results of the query come back. >> >> Consulting the spec, I see that my problem is apparently described >> in the section on 'deferred updates', near the beginning of section 10: >> >>> Deferred Updates: Sequences of one or more XForms Actions have a deferred effect on XForms model and user interface processing. Implementations are free to use any strategy to accomplish deferred updates, but the end result must be as follows: Instance data changes performed by a set of actions do not result in immediate computation dependency rebuilding, recalculation, revalidate and form control refreshing until the termination of the outermost action handler, as described here. >> OK, I think I can see the point of that rule. >> >> Later on in the same section, however, it says >> >>> Actions that directly invoke rebuild, recalculate, revalidate, or refresh always have an immediate effect, and clear the corresponding deferred update flag. The XForms Actions in this category are: >>> >>> rebuild >>> recalculate >>> revalidate >>> refresh >> So I tried inserting first one, then a different one, and finally all four of these actions >> into my trigger: >> >> <xf:trigger> >> <xf:label>Search</xf:label> >> <xf:action ev:event="DOMActivate"> >> <!--* <xf:message level="ephemeral">Query in progress</xf:message> *--> >> <xf:delete nodeset="instance('results')/child::node()"/> >> <xf:insert context="instance('results')" origin="instance('ui')/query-in-progress"/> >> >> <xf:rebuild/> >> <xf:recalculate/> >> <xf:revalidate/> >> <xf:refresh/> >> >> <xf:setvalue ref="instance('q')/startpos" value="1"/> >> <xf:send submission="send-query"/> >> </xf:action> >> </xf:trigger> >> >> The result is that the behavior is still unchanged. Have I misunderstood the spec? >> Am I doing something wrong? >> >> How can I cause a single button press to (a) clear the results and display a 'be patient' >> message, and (b) perform a submission which will automatically clear that be-patient >> message when the results come back? >> >> Thanks for any help. >> > > > ------------------------------------------------------------------------------ > Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San > Francisco, CA to explore cutting-edge tech and listen to tech luminaries > present their vision of the future. This family event has something for > everyone, including kids. Get more information and register today. > http://sdm.link/attshape > _______________________________________________ > Xsltforms-support mailing list > Xsl...@li... > https://lists.sourceforge.net/lists/listinfo/xsltforms-support -- **************************************************************** * C. M. Sperberg-McQueen, Black Mesa Technologies LLC * http://www.blackmesatech.com * http://cmsmcq.com/mib * http://balisage.net **************************************************************** |
From: C. M. Sperberg-M. <cm...@bl...> - 2016-07-04 14:10:25
|
On Jul 3, 2016, at 3:53 AM, Alain Couthures wrote: > There are some funny security reasons in Google Chrome for not allowing the document() function in XSLT only when executed from Javascript. > > This test case works with Firefox and Internet Explorer (there is an issue with Edge...) and does not work with Opera (WebKit too...). > > Issues in XSLT support are the main reasons for me to write XSLTForms 2 without the necessity for XSLT! Thank you for the clarification; this is an interoperability issue in the browsers' XSLT support that I hadn't encountered before. I look forward to XSLTForms 2, but hope that transform() will be retained even if XSLT is not used for the main form itself. --Michael > > --Alain > > Le 02/07/2016 à 18:42, C. M. Sperberg-McQueen a écrit : >> On Jun 18, 2016, at 1:44 PM, Alain Couthures wrote: >> >>> Michael, >>> >>> Subforms are loaded with the load action so any event can trigger it. If >>> not, this would be an issue and I would be happy to have a test case if >>> this happens. >>> ... >>> >>> There is also the xf:include/@src control, which is an extension, just >>> to include an external file at the XSLT step. >> I have found xf:include very useful, and I find myself wanting to use >> it frequently. But I have run into one difficulty. >> >> I have the impression that xf:include works in the main form, >> and in XML documents included by means of xf:include, but not in >> subforms. The example at [1] illustrates what I mean: when books.xml >> is loaded as a main form, it includes (via xf:include) a paragraph >> saying how many books it is displaying; when the same form is >> loaded as a subform, this information does not appear. >> >> [1] http://blackmesatech.com/2016/06/subformstest/include-test.xhtml >> >> Is this a bug or a design feature? >> >> Michael >> > -- **************************************************************** * C. M. Sperberg-McQueen, Black Mesa Technologies LLC * http://www.blackmesatech.com * http://cmsmcq.com/mib * http://balisage.net **************************************************************** |
From: Alain C. <ala...@ag...> - 2016-07-03 09:54:00
|
There are some funny security reasons in Google Chrome for not allowing the document() function in XSLT only when executed from Javascript. This test case works with Firefox and Internet Explorer (there is an issue with Edge...) and does not work with Opera (WebKit too...). Issues in XSLT support are the main reasons for me to write XSLTForms 2 without the necessity for XSLT! --Alain Le 02/07/2016 à 18:42, C. M. Sperberg-McQueen a écrit : > On Jun 18, 2016, at 1:44 PM, Alain Couthures wrote: > >> Michael, >> >> Subforms are loaded with the load action so any event can trigger it. If >> not, this would be an issue and I would be happy to have a test case if >> this happens. >> ... >> >> There is also the xf:include/@src control, which is an extension, just >> to include an external file at the XSLT step. > I have found xf:include very useful, and I find myself wanting to use > it frequently. But I have run into one difficulty. > > I have the impression that xf:include works in the main form, > and in XML documents included by means of xf:include, but not in > subforms. The example at [1] illustrates what I mean: when books.xml > is loaded as a main form, it includes (via xf:include) a paragraph > saying how many books it is displaying; when the same form is > loaded as a subform, this information does not appear. > > [1] http://blackmesatech.com/2016/06/subformstest/include-test.xhtml > > Is this a bug or a design feature? > > Michael > |
From: C. M. Sperberg-M. <cm...@bl...> - 2016-07-02 16:43:04
|
On Jun 18, 2016, at 1:44 PM, Alain Couthures wrote: > Michael, > > Subforms are loaded with the load action so any event can trigger it. If > not, this would be an issue and I would be happy to have a test case if > this happens. > ... > > There is also the xf:include/@src control, which is an extension, just > to include an external file at the XSLT step. I have found xf:include very useful, and I find myself wanting to use it frequently. But I have run into one difficulty. I have the impression that xf:include works in the main form, and in XML documents included by means of xf:include, but not in subforms. The example at [1] illustrates what I mean: when books.xml is loaded as a main form, it includes (via xf:include) a paragraph saying how many books it is displaying; when the same form is loaded as a subform, this information does not appear. [1] http://blackmesatech.com/2016/06/subformstest/include-test.xhtml Is this a bug or a design feature? Michael -- **************************************************************** * C. M. Sperberg-McQueen, Black Mesa Technologies LLC * http://www.blackmesatech.com * http://cmsmcq.com/mib * http://balisage.net **************************************************************** |
From: C. M. Sperberg-M. <cm...@bl...> - 2016-06-30 01:57:15
|
If I understand correctly, XSLTForms does some systematic modification of IDs in subforms, to ensure that they don't conflict with IDs already in use. This leads me to wonder whether the ID changing is reliable enough to allow a subform to load another copy of itself as a subsubform. In practice, the idea does not seem to work, at least in the form I have produced at http://blackmesatech.com/2016/06/recursive-subform-test/index.xhtml but (as the example labeled "A pseudo-recursive editor" shows) it could work, if there were a way to make the ID modifications do the right thing. I suppose one difficulty is that the right thing may vary a bit from case to case. If it were possible to make the interface between form and subform systematic enough to allow recursive loading of (another copy of) a subform, then it would be somewhat easier in XForms to deal with recursive structures with variable depth. Thinking about such recursive structures I (for one) have often wished for named groups, or something analogous to XSLT templates and the XSLT apply-templates instruction, so as to write a set of templates that apply, recursively, at each level of the recursive structure. Recursive subform loading would be a good approximation of that idea. As Alain often says, What do you think? Could recursive subform loading be made possible? -- **************************************************************** * C. M. Sperberg-McQueen, Black Mesa Technologies LLC * http://www.blackmesatech.com * http://cmsmcq.com/mib * http://balisage.net **************************************************************** |
From: <bc...@sh...> - 2016-06-29 20:52:03
|
Hi Alain, no need to apologise. Thank you for the reply. I had never thought to try that approach. I will give it a try. Just as a matter of interest, is that a standard in the xforms spec. or is it an XSLTForms particular extension ? Thank you for all your continuing hard work on XSLTForms. Long may it (and you) continue :-) Regards Habs On 29 June 2016 at 17:59, Alain Couthures <ala...@ag...> wrote: > Hello Habs, > > Sorry for the delay. I suggest you to write a Javascript function to be > called from an XPath expression as in > http://www.agencexml.com/xsltforms/colors.xml > > --Alain > > > Le 19/06/2016 à 09:01, bc...@sh... a écrit : > > Thank you for the reply Alain. > > It will be interesting times when 'fleur' and XSLTForms 2 arrive. :-) > > For now, as I said, I am wanting to generate a xsd:duration content based > on a start and end xsd:date and xsd:time elements entered via a xform. > > I have not got far enough yet to submit a working xform test case > skeleton, as I am just trying to sort out the best way to generate the > xsd:duration, however for instance: > > ... > <datestart>20160510</datestart> > <timestart>083000</timestart> > <dateend>20160511</dateend> > <timeend>104500</timeend> > <duration>PT26H15M</duration> <------- calculate this, a duration > showing hours and minutes, from the date and time elements > ... > > What would be the best and/or efficient approach please? > > At the moment I am intending to use xf:bind calculations, using substring, > floor and div functions etc on the date and time elements, to > *eventually* get the desired content for the xsd:duration element. > Perhaps there is a better approach ? > > As an aside, if I have understood it properly, the EXSLT template > 'date:duration' provides this process, so perhaps it is possible to do a > xslt transform within XSLTForms to produce the desired duration instance. > > > I will keep on it and see what I come up with, but if you (or any one > else) have any ideas/tips please let me know. > > Regards > Habs > > > On 18 June 2016 at 21:06, Alain Couthures <ala...@ag...> > wrote: > >> Hello Habs, >> >> I am currently extending my new XPath engine (Fleur) into an XQuery >> engine as well. Progressively, it will support XPath/XQuery 3.1 but there >> are still missing functionalities such as durations. Because of functions >> such as doc(), this engine is written in asynchronous Javascript so it will >> not be possible to use it within XSLTForms v1 but within XSLTForms v2. >> >> Priorities are always hard to decide. Adding duration support in >> XSLTForms v1 might reduce time required for adding it in Fleur... >> >> Maybe you don't need a full support yet? Can you post a test case?? >> >> --Alain >> >> >> Le 18/06/2016 à 21:15, bc...@sh... a écrit : >> >> Hello all, good day >> >> Most likely this has been mentioned before and if so my apologies for not >> finding anything on it by better searching 'discussion' or mailing lists. >> >> How easy (technically and time availability) would it be for maintainers >> (Alain ?) to implement the xsd:duration type and associated functions (I >> think they are XPath 2) ? >> >> For now, would some kind person assist (post a small code perhaps) by >> suggesting how to best/efficiently process xsd:time elements 'time-from' >> and 'time-to' in a repeat block, such that for each pair the duration in >> minutes (seconds does not matter) is calculated and then a total for the >> nodeset ? >> >> For now, as a descriptive, I am playing with implementing a <minutes/> >> element for each repeat item and using a 'bind calculate' to get the value >> by string splitting and using math functions to obtain the duration hours >> (converting it to minutes) and minutes and adding the two. >> >> Then to create a <totalminutes/> element and using a 'bind calculate' to >> get the value by using sum() on the <minutes/> nodeset. >> >> >> Thank you for some info and comments. >> Peace and best wishes >> >> Habs >> >> >> >> ------------------------------------------------------------------------------ >> What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic >> patterns at an interface-level. Reveals which users, apps, and protocols are >> consuming the most bandwidth. Provides multi-vendor support for NetFlow, >> J-Flow, sFlow and other flows. Make informed decisions using capacity planning >> reports. http://sdm.link/zohomanageengine >> >> >> >> _______________________________________________ >> Xsltforms-support mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/xsltforms-support >> >> >> > > |
From: Alain C. <ala...@ag...> - 2016-06-29 20:46:06
|
This is an XSLTForms extension. Such Javascript interactions should be considered for XForms 3.0! Le 29/06/2016 à 22:22, bc...@sh... a écrit : > Hi Alain, no need to apologise. Thank you for the reply. > > I had never thought to try that approach. I will give it a try. > > Just as a matter of interest, is that a standard in the xforms spec. > or is it an XSLTForms particular extension ? > > > Thank you for all your continuing hard work on XSLTForms. Long may it > (and you) continue :-) > > Regards > Habs > > On 29 June 2016 at 17:59, Alain Couthures > <ala...@ag... <mailto:ala...@ag...>> > wrote: > > Hello Habs, > > Sorry for the delay. I suggest you to write a Javascript function > to be called from an XPath expression as in > http://www.agencexml.com/xsltforms/colors.xml > > --Alain > > > Le 19/06/2016 à 09:01, bc...@sh... > <mailto:bc...@sh...> a écrit : >> Thank you for the reply Alain. >> >> It will be interesting times when 'fleur' and XSLTForms 2 arrive. :-) >> >> For now, as I said, I am wanting to generate a xsd:duration >> content based on a start and end xsd:date and xsd:time elements >> entered via a xform. >> >> I have not got far enough yet to submit a working xform test case >> skeleton, as I am just trying to sort out the best way to >> generate the xsd:duration, however for instance: >> >> ... >> <datestart>20160510</datestart> >> <timestart>083000</timestart> >> <dateend>20160511</dateend> >> <timeend>104500</timeend> >> <duration>PT26H15M</duration> <------- calculate this, a duration >> showing hours and minutes, from the date and time elements >> ... >> >> What would be the best and/or efficient approach please? >> >> At the moment I am intending to use xf:bind calculations, using >> substring, floor and div functions etc on the date and time >> elements, to *eventually* get the desired content for the >> xsd:duration element. Perhaps there is a better approach ? >> >> As an aside, if I have understood it properly, the EXSLT template >> 'date:duration' provides this process, so perhaps it is possible >> to do a xslt transform within XSLTForms to produce the desired >> duration instance. >> >> >> I will keep on it and see what I come up with, but if you (or any >> one else) have any ideas/tips please let me know. >> >> Regards >> Habs >> >> >> On 18 June 2016 at 21:06, Alain Couthures >> <ala...@ag... >> <mailto:ala...@ag...>> wrote: >> >> Hello Habs, >> >> I am currently extending my new XPath engine (Fleur) into an >> XQuery engine as well. Progressively, it will support >> XPath/XQuery 3.1 but there are still missing functionalities >> such as durations. Because of functions such as doc(), this >> engine is written in asynchronous Javascript so it will not >> be possible to use it within XSLTForms v1 but within >> XSLTForms v2. >> >> Priorities are always hard to decide. Adding duration support >> in XSLTForms v1 might reduce time required for adding it in >> Fleur... >> >> Maybe you don't need a full support yet? Can you post a test >> case?? >> >> --Alain >> >> >> Le 18/06/2016 à 21:15, bc...@sh... >> <mailto:bc...@sh...> a écrit : >>> Hello all, good day >>> >>> Most likely this has been mentioned before and if so my >>> apologies for not finding anything on it by better searching >>> 'discussion' or mailing lists. >>> >>> How easy (technically and time availability) would it be for >>> maintainers (Alain ?) to implement the xsd:duration type and >>> associated functions (I think they are XPath 2) ? >>> >>> For now, would some kind person assist (post a small code >>> perhaps) by suggesting how to best/efficiently process >>> xsd:time elements 'time-from' and 'time-to' in a repeat >>> block, such that for each pair the duration in minutes >>> (seconds does not matter) is calculated and then a total for >>> the nodeset ? >>> >>> For now, as a descriptive, I am playing with implementing a >>> <minutes/> element for each repeat item and using a 'bind >>> calculate' to get the value by string splitting and using >>> math functions to obtain the duration hours (converting it >>> to minutes) and minutes and adding the two. >>> >>> Then to create a <totalminutes/> element and using a 'bind >>> calculate' to get the value by using sum() on the <minutes/> >>> nodeset. >>> >>> >>> Thank you for some info and comments. >>> Peace and best wishes >>> >>> Habs >>> >>> >>> >>> ------------------------------------------------------------------------------ >>> What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic >>> patterns at an interface-level. Reveals which users, apps, and protocols are >>> consuming the most bandwidth. Provides multi-vendor support for NetFlow, >>> J-Flow, sFlow and other flows. Make informed decisions using capacity planning >>> reports.http://sdm.link/zohomanageengine >>> >>> >>> _______________________________________________ >>> Xsltforms-support mailing list >>> Xsl...@li... >>> <mailto:Xsl...@li...> >>> https://lists.sourceforge.net/lists/listinfo/xsltforms-support >> >> >> > > |
From: Alain C. <ala...@ag...> - 2016-06-29 17:25:00
|
Hello Habs, Sorry for the delay. I suggest you to write a Javascript function to be called from an XPath expression as in http://www.agencexml.com/xsltforms/colors.xml --Alain Le 19/06/2016 à 09:01, bc...@sh... a écrit : > Thank you for the reply Alain. > > It will be interesting times when 'fleur' and XSLTForms 2 arrive. :-) > > For now, as I said, I am wanting to generate a xsd:duration content > based on a start and end xsd:date and xsd:time elements entered via a > xform. > > I have not got far enough yet to submit a working xform test case > skeleton, as I am just trying to sort out the best way to generate the > xsd:duration, however for instance: > > ... > <datestart>20160510</datestart> > <timestart>083000</timestart> > <dateend>20160511</dateend> > <timeend>104500</timeend> > <duration>PT26H15M</duration> <------- calculate this, a > duration showing hours and minutes, from the date and time elements > ... > > What would be the best and/or efficient approach please? > > At the moment I am intending to use xf:bind calculations, using > substring, floor and div functions etc on the date and time > elements, to *eventually* get the desired content for the > xsd:duration element. Perhaps there is a better approach ? > > As an aside, if I have understood it properly, the EXSLT template > 'date:duration' provides this process, so perhaps it is possible to do > a xslt transform within XSLTForms to produce the desired duration > instance. > > > I will keep on it and see what I come up with, but if you (or any one > else) have any ideas/tips please let me know. > > Regards > Habs > > > On 18 June 2016 at 21:06, Alain Couthures > <ala...@ag... <mailto:ala...@ag...>> > wrote: > > Hello Habs, > > I am currently extending my new XPath engine (Fleur) into an > XQuery engine as well. Progressively, it will support XPath/XQuery > 3.1 but there are still missing functionalities such as durations. > Because of functions such as doc(), this engine is written in > asynchronous Javascript so it will not be possible to use it > within XSLTForms v1 but within XSLTForms v2. > > Priorities are always hard to decide. Adding duration support in > XSLTForms v1 might reduce time required for adding it in Fleur... > > Maybe you don't need a full support yet? Can you post a test case?? > > --Alain > > > Le 18/06/2016 à 21:15, bc...@sh... > <mailto:bc...@sh...> a écrit : >> Hello all, good day >> >> Most likely this has been mentioned before and if so my apologies >> for not finding anything on it by better searching 'discussion' >> or mailing lists. >> >> How easy (technically and time availability) would it be for >> maintainers (Alain ?) to implement the xsd:duration type and >> associated functions (I think they are XPath 2) ? >> >> For now, would some kind person assist (post a small code >> perhaps) by suggesting how to best/efficiently process xsd:time >> elements 'time-from' and 'time-to' in a repeat block, such that >> for each pair the duration in minutes (seconds does not matter) >> is calculated and then a total for the nodeset ? >> >> For now, as a descriptive, I am playing with implementing a >> <minutes/> element for each repeat item and using a 'bind >> calculate' to get the value by string splitting and using math >> functions to obtain the duration hours (converting it to minutes) >> and minutes and adding the two. >> >> Then to create a <totalminutes/> element and using a 'bind >> calculate' to get the value by using sum() on the <minutes/> nodeset. >> >> >> Thank you for some info and comments. >> Peace and best wishes >> >> Habs >> >> >> >> ------------------------------------------------------------------------------ >> What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic >> patterns at an interface-level. Reveals which users, apps, and protocols are >> consuming the most bandwidth. Provides multi-vendor support for NetFlow, >> J-Flow, sFlow and other flows. Make informed decisions using capacity planning >> reports.http://sdm.link/zohomanageengine >> >> >> _______________________________________________ >> Xsltforms-support mailing list >> Xsl...@li... >> <mailto:Xsl...@li...> >> https://lists.sourceforge.net/lists/listinfo/xsltforms-support > > > |
From: C. M. Sperberg-M. <cm...@bl...> - 2016-06-28 21:00:20
|
On Jun 28, 2016, at 1:31 PM, Alain Couthures wrote: > There is no such form in the W3C Test Suite binding a text node to a > control and I had to fix and build a new version of XSLTForms. > > Please give a try at http://www.agencexml.com/direct/demos/textnodetest.xml Well, that was quick! The form in the agencexml demo folder seems to be working the way I was hoping it would work. So at a first look, it looks as if the problem I was having has been fixed. Thank you very much! (And if you haven't already done so, please do contribute that form to the W3C Test Suite.) Will the version with this change be available from the Subversion server? (The most recent version I see in svn is 636, of 26 May.) best, Michael1 -- **************************************************************** * C. M. Sperberg-McQueen, Black Mesa Technologies LLC * http://www.blackmesatech.com * http://cmsmcq.com/mib * http://balisage.net **************************************************************** |
From: Tim T. <tim...@gm...> - 2016-06-28 20:20:03
|
This is a very valuable piece of functionality. Thank you, Michael, for raising the issue, and Alain for the implementation. I notice in the current draft of the XForms 2.0 spec, under section 8.1.2, there is a note that reads: "The simpleContent binding restriction is intended to allow controls to bind to attribute and element nodes. This specification does not prevent binding controls directly to text nodes, however doing so can yield undesirable behavior, such as a form control becoming non-relevant if a user enters empty data. This specification also does not prevent implementers supporting binding controls directly to comment or processing instruction nodes, however the resulting behavior is implementation-dependent and may also yield undesirable behavior." Notwithstanding, if there are use cases that require the ability to bind directly to text nodes, I hope it would merit inclusion in an eventual XForms 2.0 Test Suite. Tim -- Tim A. Thompson Metadata Librarian (Spanish/Portuguese Specialty) Princeton University Library <ta...@pr...> On Tue, Jun 28, 2016 at 3:31 PM, Alain Couthures < ala...@ag...> wrote: > There is no such form in the W3C Test Suite binding a text node to a > control and I had to fix and build a new version of XSLTForms. > > Please give a try at > http://www.agencexml.com/direct/demos/textnodetest.xml > > Thank you for your feedback! > > --Alain > > Le 28/06/2016 à 06:47, C. M. Sperberg-McQueen a écrit : > > Consider the simple form at > > > > http://blackmesatech.com/2016/06/textnodetest/index.xhtml > > > > It has one document instance, which is a simple XML document > > with mixed content. > > > > <doc> > > <p>This is a <i>document</i> > > with <b>mixed content</b>. > > </p> > > </doc> > > > > It shows two ways of editing parts of the document: the first, > > which binds xf:input elements to the i and b elements, does > > appear to change the value of the document effectively. The > > second, which binds xf:input elements to the text nodes of > > the document, does not seem to work. > > > > I also notice that the read-only display of document structure > > shown at the end of the page does not change, even though > > the model seems to be being updated. > > > > I think that XForms allows controls to be bound to any node in > > the document, including text nodes. Am I doing something > > wrong? > > > > I would be grateful for any help any reader of this list can > > give me. > > > > > > ------------------------------------------------------------------------------ > Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San > Francisco, CA to explore cutting-edge tech and listen to tech luminaries > present their vision of the future. This family event has something for > everyone, including kids. Get more information and register today. > http://sdm.link/attshape > _______________________________________________ > Xsltforms-support mailing list > Xsl...@li... > https://lists.sourceforge.net/lists/listinfo/xsltforms-support > |
From: Alain C. <ala...@ag...> - 2016-06-28 19:37:57
|
As a possible workaround, you might try to insert the text, before the submission being effectively sent, at the event "xforms-submit-serialize". Thank you for your feedback! --Alain Le 20/06/2016 à 20:32, C. M. Sperberg-McQueen a écrit : > I have a form that performs a query against a database back end, > shows the results, and keeps the search box open so the user can > issue a new search. > > http://tlrr.blackmesatech.com/2016/01/balbus.xhtml > > (Useful searches: "Alfenus", "Balbus" for fast searches, "Cicero" for a > slower one.) > > In the current version of the form, nothing visual happens when > the user issues a new search; if the search is slow, the user can think > "something went wrong, the browser didn't notice the click, I'll > click again". So I'd like the Search button to clear the old results, > display the text "Query in progress ..." in some way (ideally in the > work area where the results used to be), and issue the query submission > to the back end. > > A first cut made the trigger look like this: > > <xf:trigger> > <xf:label>Search</xf:label> > <xf:action ev:event="DOMActivate"> > <xf:delete nodeset="instance('results')/child::node()"/> > <xf:insert context="instance('results')" origin="instance('ui')/query-in-progress"/> > <xf:setvalue ref="instance('q')/startpos" value="1"/> > <xf:send submission="send-query"/> > </xf:action> > </xf:trigger> > > And I added the 'Query in progress ...' display this way: > > <xf:group ref="instance('results')/query-in-progress"> > <p>Query in progress ...</p> > </xf:group> > > (It should be noted that the send-query submission replaces the > 'results' instance entirely, so the empty 'query-in-progress' element > there goes away when the results of the query are returned.) > > The trigger and group just shown, however, do not in fact make > the old results disappear or the text "Query in progress ..." appear; > there no change to the display until the results of the query come back. > > Consulting the spec, I see that my problem is apparently described > in the section on 'deferred updates', near the beginning of section 10: > >> Deferred Updates: Sequences of one or more XForms Actions have a deferred effect on XForms model and user interface processing. Implementations are free to use any strategy to accomplish deferred updates, but the end result must be as follows: Instance data changes performed by a set of actions do not result in immediate computation dependency rebuilding, recalculation, revalidate and form control refreshing until the termination of the outermost action handler, as described here. > OK, I think I can see the point of that rule. > > Later on in the same section, however, it says > >> Actions that directly invoke rebuild, recalculate, revalidate, or refresh always have an immediate effect, and clear the corresponding deferred update flag. The XForms Actions in this category are: >> >> rebuild >> recalculate >> revalidate >> refresh > So I tried inserting first one, then a different one, and finally all four of these actions > into my trigger: > > <xf:trigger> > <xf:label>Search</xf:label> > <xf:action ev:event="DOMActivate"> > <!--* <xf:message level="ephemeral">Query in progress</xf:message> *--> > <xf:delete nodeset="instance('results')/child::node()"/> > <xf:insert context="instance('results')" origin="instance('ui')/query-in-progress"/> > > <xf:rebuild/> > <xf:recalculate/> > <xf:revalidate/> > <xf:refresh/> > > <xf:setvalue ref="instance('q')/startpos" value="1"/> > <xf:send submission="send-query"/> > </xf:action> > </xf:trigger> > > The result is that the behavior is still unchanged. Have I misunderstood the spec? > Am I doing something wrong? > > How can I cause a single button press to (a) clear the results and display a 'be patient' > message, and (b) perform a submission which will automatically clear that be-patient > message when the results come back? > > Thanks for any help. > |
From: Alain C. <ala...@ag...> - 2016-06-28 19:31:34
|
There is no such form in the W3C Test Suite binding a text node to a control and I had to fix and build a new version of XSLTForms. Please give a try at http://www.agencexml.com/direct/demos/textnodetest.xml Thank you for your feedback! --Alain Le 28/06/2016 à 06:47, C. M. Sperberg-McQueen a écrit : > Consider the simple form at > > http://blackmesatech.com/2016/06/textnodetest/index.xhtml > > It has one document instance, which is a simple XML document > with mixed content. > > <doc> > <p>This is a <i>document</i> > with <b>mixed content</b>. > </p> > </doc> > > It shows two ways of editing parts of the document: the first, > which binds xf:input elements to the i and b elements, does > appear to change the value of the document effectively. The > second, which binds xf:input elements to the text nodes of > the document, does not seem to work. > > I also notice that the read-only display of document structure > shown at the end of the page does not change, even though > the model seems to be being updated. > > I think that XForms allows controls to be bound to any node in > the document, including text nodes. Am I doing something > wrong? > > I would be grateful for any help any reader of this list can > give me. > |