xsltforms-support Mailing List for XSLTForms (Page 53)
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: Dhruv A. <dhr...@gm...> - 2011-12-12 11:43:53
|
Works! My bad, I should've tested with the latest before... Thanks though, it is a great piece of work. On 9 December 2011 21:15, Alain Couthures <ala...@ag...>wrote: > Hi Dhruv, > > Your form works correctly with the latest SF SVN build (I remember I fixed > something about targetref and replace="text" recently!). > > Is it possible for you to test with it? > > Thank you for your feedbacks! > > -Alain > > Le 09/12/2011 10:39, Dhruv Ahuja a écrit : > > Hi All > > Please have a look at my XForm at http://pastebin.com/X8JhESZi . The > replace and targetref specified on line 11 do work when this form is hosted > via betterFORM but not when implemented via XSLTForms in a browser. > > In the case of XSLTForms, I did see an error message in the error console > of Firefox saying that my return value from the resource was a syntactical > error on line 1 of the current document. Appears to me that it wasn't able > to reach the intended element and then of course, presenting only the > return value as a valid XML document to the browser didn't quite work. My > value isn't XML indeed. > > I'd be happy if anybody can look into this, or suggest me a quick > workaround. > > Thanks in advance! > > Dhruv > > > > ------------------------------------------------------------------------------ > Cloud Services Checklist: Pricing and Packaging Optimization > This white paper is intended to serve as a reference, checklist and point of > discussion for anyone considering optimizing the pricing and packaging model > of a cloud services business. Read Now!http://www.accelacomm.com/jaw/sfnl/114/51491232/ > > > > _______________________________________________ > Xsltforms-support mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/xsltforms-support > > > > |
From: Claudius T. <cla...@ya...> - 2011-12-11 15:37:14
|
Hi, Version 1.1.0 of exsltforms is ready and can be downloaded from [1]. Changelog: Version 1.0.9 - 2011.12.08 1. This version of exsltforms works with the revision 521 of XSLTForms, as of 2011-12-08. 2. The rendering of data by using the data instances viewer is now much better. [1] http://sourceforge.net/projects/extxsltforms/files/eXSLTForms%20v.1/ Claudius Teodorescu http://extxsltforms.sourceforge.net/sitKubera/index/index.xml |
From: Stephen C. <ste...@gm...> - 2011-12-11 03:41:27
|
I need to get schema validation working in Eclipse, too many silly errors are not being found! |
From: Stephen C. <ste...@gm...> - 2011-12-11 02:04:06
|
Hi Alain, Am I correct in thinking that this is not supported? I get an error on form loading when I try to use it. I want to make use of RESTful URLs and this seems to be the only way that I can. That is the URL has the format http://<domain>/<resource-type>/<resource-name> I present the user with a select list of schemas to load and want to substitue the <resource-name> part of the URL with what they have selected. e.g. <xf:submission ....> <xf:resource value="concat('../schema/',instance('schema')/selected_schema)"/> </xf:submission> I think that the error message I am seeing is that the resource attribute on the submission is missing, which of course is OK if there is a resource child element. This capability would seem to me to be also needed to make use of Atompub feeds to load an feed item link into a model instance. Regards Steve Cameron |
From: Alain C. <ala...@ag...> - 2011-12-10 16:45:01
|
Hello, Thank you for pointing at this compatibility problem. Could you please use a browser debugger to check headers? A simple Google search already gives interesting directions: "Update: Travis Estill and David Kleinschmidt reminded me that 401 responses shouldn't be returned without an Auth header and so a 403 is a better response code. This also helps to make Safari behave too." (http://www.peej.co.uk/articles/http-auth-with-html-forms.html) "The solution was that I needed to add request.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");" (http://stackoverflow.com/questions/2188957/user-authentication-with-xmlhttprequest-works-in-ie-not-in-chrome) -Alain Le 06/12/2011 01:10, Conal Tuohy a écrit : > I've come across a compatibility problem using XSLTForms with Safari 5 > on Mac and Windows. If Safari receives an HTTP authentication challenge > when it submits an XML instance to a server, it fails to present the > user with an authentication dialog, and the submission simply fails with > a 401. > > It seems to me that this is a bug in Safari's XmlHttpRequest object - it > should trigger the browser's normal response to an authentication > challenge (as other browsers do). I guess that a Javascript client of > the XmlHttpRequest object is expected to explicitly set authentication > credentials rather than leave it to the browser. > > NB if you open the XML instance directly in the browser (i.e. not using > an XForm) then Safari prompts the user for a password, and authenticates > with the server. Once the browser has established an authenticated > session with the server, then the XForm works fine. So a work-around for > the problem is to ensure that not only the editable XML instances, but > also the XForms themselves require authentication. > > While I'm on the subject, does anyone have any example of capturing user > credentials actually in an XForm (i.e. with a "credentials" instance?), > and then using those for basic HTTP authentication? I suppose one have > to use the digest() function to encode the credentials, and the > submission header element to submit it? |
From: William D. V. <wi...@bi...> - 2011-12-10 13:05:34
|
Here is a method for showing the instance in a DIV: 1. Put the div element somewhere in the page and style it to ease reading: <div id="xml_dump" style=" font-family: fixed;white-space: pre;"/> 2. Add the following script to do the job: <script type="text/javascript"> function insertLiteral(literalString, targetElement) { var textNode = document.createTextNode(literalString); targetElement.appendChild(textNode) return textNode; } function showInstance(){ var model = window.document.getElementById("xmodel"); // xmodel is the id of the xf:model var instance = model.getInstanceDocument('xins'); // xins is the if of the xf:instance inside your model var xml_dump = window.document.getElementById("xml_dump"); var xml = Core.saveXML(instance); var xmlTextNode = insertLiteral(xml, xml_dump); } </script> 3. Add a trigger to call the javascript: <xf:trigger> <xf:label>Show Instance</xf:label> <xf:action ev:event="DOMActivate"> <xf:load resource="javascript:showInstance()" /> </xf:action> </xf:trigger> > ------------------------------ > > Message: 2 > Date: Wed, 7 Dec 2011 01:02:52 -0800 > From: Stephen Cameron <ste...@gm...> > Subject: [Xsltforms-support] Visualise an instance in a div > To: xsl...@li... > Message-ID: > <CAG=ut6...@ma...> > Content-Type: text/plain; charset="iso-8859-1" > > Hello, > > I am interested in visualising an model instance in a scrolling <div> > on > the browser. > > I know exsltforms does this but is there any other way in recent > versions > of XSLTForms? > > Also is it possible to redirect the debug event information to a > second > window? > > Thanks > > Steve Cameron > -------------- next part -------------- > An HTML attachment was scrubbed... > > ------------------------------ |
From: C. M. Sperberg-M. <cm...@bl...> - 2011-12-09 22:53:21
|
On Dec 9, 2011, at 2:09 PM, Alain Couthures wrote: > ... > > In the latest builds, the Profiler is even a form: this means that it can be customized by authors themselves. The profiling data is collected as an XML document and a specific processing-instruction tells XSLTForms which form to associate with. I shall have to study this. > I plan to add more information in the Profiler instance (instances copies, the calling form source, ...): the Profiler will progressively become a real XForms Debugger written in XForms. > > About your form performance, I already suspected that counting preceding siblings would cost a lot of time: Javascript doesn't like loops (XSLTForms has to have its own XPath machine written in Javascript... I proposed a paper for XML Prague 2012 about how to write an XQuery compiler into Javascript instructions). I recently added support for the id() function and it's even much better for performance. Does id() require that the instance be an external instance, so it can have a DTD? Or how does the id() function identify ID attributes? > Defining a subform is now another possibility to simplify a form. This is not yet documented but I already love it much. Don't hesitate to ask me about subforms if you're interested in. > > If you want to load another form in a new browser tab from an instance without server exchanges, defining an extra parameter for the load action should be simple with the processing-instruction capability I already use for the Profiler (this processing-instruction mechanism is very promising indeed, I'm currently building a small XRAP (XForms-REST-Apache-PHP) application with minimal generic PHP scripts, XML files and folders on server). > > XML allows us to consider programs as data. We might not be numerous to envision this (but the community is strong) and I have to confess that I'm still marveled by this. Subforms or a new browser tab may be exactly what I'm now looking for. The profiler made me realize that my case switch to allow the user to edit the PL/0 assembler code was exacting a high cost in number of additional nodes, which in turn was making refreshes more expensive. So I'd like to move the editing function to a different form, and make the 'Edit code' button (on the simulator page) link to / load / transfer to the code editor. The code editor should similarly have a 'Run code' button to go (back) to the simulator. Since I don't want to allow arbitrary Web users to store arbitrary data on my server, I don't want to save the 'code' instance on the server and then load that XML document in the other form -- I'd like to hand the user's XML instance back and forth from one form to another. Initially, I thought I could manage this with a simple shell script: the 'Edit code' button submits the 'code' instance to that shell script, and the shell script sends back a concatenation of four things: 1 an HTTP header with "Content-Type: application/xhtml+xml" and a blank line 2 the first few lines of an XHTML document, from <?xml-stylesheet ... to <xf:instance id="code"> 3 the code document submitted by the user (without the XML declaration) 4 the remainder of the XHTML document, from </xf:instance> to </html> As far as I can tell, the script is working as I expected, but the browser is not loading the new form in the way I had expected; instead I get a series of error messages of the form "Unsupported mediatype '... [ entire body of the inline document instance] ...' for instance #code", one for each inline instance, and then one for #xf-instance-config. I have probably failed to understand the true meaning of the submission process. (Or rather: I have certainly never bothered to read up on all the details. XForms has worked intuitively enough for me that I haven't had to, yet.) So perhaps subforms and/or the additional load parameter are just what I'm looking for. (In this case, my immediate goal is to avoid incurring the cost of building all the editing widgets for the code instance until the user actually asks to edit it. If that can be done without server hits, that would be idea. But if there is a way to realize my original idea of passing a user instance from one form to another by bouncing it off the server (like a soccer player passing the ball to a teammate before running past a defender, and then getting the ball right back from the teammate), it would be nice to know how to do that, too. Thank you very much for your work on XSLTForms! 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...> - 2011-12-09 21:15:32
|
Hi Dhruv, Your form works correctly with the latest SF SVN build (I remember I fixed something about targetref and replace="text" recently!). Is it possible for you to test with it? Thank you for your feedbacks! -Alain Le 09/12/2011 10:39, Dhruv Ahuja a écrit : > Hi All > > Please have a look at my XForm at http://pastebin.com/X8JhESZi . The > replace and targetref specified on line 11 do work when this form is > hosted via betterFORM but not when implemented via XSLTForms in a browser. > > In the case of XSLTForms, I did see an error message in the error > console of Firefox saying that my return value from the resource was a > syntactical error on line 1 of the current document. Appears to me > that it wasn't able to reach the intended element and then of course, > presenting only the return value as a valid XML document to the > browser didn't quite work. My value isn't XML indeed. > > I'd be happy if anybody can look into this, or suggest me a quick > workaround. > > Thanks in advance! > > Dhruv > > > > ------------------------------------------------------------------------------ > Cloud Services Checklist: Pricing and Packaging Optimization > This white paper is intended to serve as a reference, checklist and point of > discussion for anyone considering optimizing the pricing and packaging model > of a cloud services business. Read Now! > http://www.accelacomm.com/jaw/sfnl/114/51491232/ > > > _______________________________________________ > Xsltforms-support mailing list > Xsl...@li... > https://lists.sourceforge.net/lists/listinfo/xsltforms-support |
From: Alain C. <ala...@ag...> - 2011-12-09 21:09:43
|
Wow! What an impressive Christmas gift for XML fans! You're absolutely right about the Profiler I added to XSLTForms: it's a wonderful tool to locate time-costing XPath expressions and refreshes. In the latest builds, the Profiler is even a form: this means that it can be customized by authors themselves. The profiling data is collected as an XML document and a specific processing-instruction tells XSLTForms which form to associate with. I plan to add more information in the Profiler instance (instances copies, the calling form source, ...): the Profiler will progressively become a real XForms Debugger written in XForms. About your form performance, I already suspected that counting preceding siblings would cost a lot of time: Javascript doesn't like loops (XSLTForms has to have its own XPath machine written in Javascript... I proposed a paper for XML Prague 2012 about how to write an XQuery compiler into Javascript instructions). I recently added support for the id() function and it's even much better for performance. Defining a subform is now another possibility to simplify a form. This is not yet documented but I already love it much. Don't hesitate to ask me about subforms if you're interested in. If you want to load another form in a new browser tab from an instance without server exchanges, defining an extra parameter for the load action should be simple with the processing-instruction capability I already use for the Profiler (this processing-instruction mechanism is very promising indeed, I'm currently building a small XRAP (XForms-REST-Apache-PHP) application with minimal generic PHP scripts, XML files and folders on server). XML allows us to consider programs as data. We might not be numerous to envision this (but the community is strong) and I have to confess that I'm still marveled by this. Thank you very much for your feedbacks! -Alain Le 09/12/2011 02:41, C. M. Sperberg-McQueen a écrit : > Just a short report, for the record, of my experience with the profiler > now built into XSLTForms. > > Short version: the profiler is very helpful; in this case three relatively > simple changes produced a five-fold speedup in the form. > > Long version: > > Looking at the profile information for the form I was worrying about, > which had gotten too slow when the document it was operating on got > bigger, I found that the most expensive XPath expressions were those > used for numbering the cells of the stack and for numbering the > instructions in the code area. I hard-coded appropriate numbers into > attributes in the machine description, and I added a set of actions for > adding a numbering attribute to the instructions in a program, after > loading it. I then replaced each XPath expression of the form > count(preceding-sibling::cell) +1 or count(preceding-sibling::i) with > a reference to @n. I also removed the support for editing the program > code; I'll move it to a separate form which communicates with the > main form by bouncing the XML representation of the document off > of a routine on the server. > > The first two changes (prenumbering the stack cells and autonumbering > the instructions in the program) reduced the XForms Cumulative Refresh > Time after loading a program and stepping through 50 cycles of machine > time (i.e. clicking Step 50 times) from 94.6 seconds to 42.3 seconds, > making the program about twice as fast. > > The third change (removing the editing functionality to a separate form) > took it down to 17.7 seconds, another twofold speedup, for a five-fold > speedup overall. > > Those who are curious can compare the timings and the subjective > experience of the form by looking at the old and new versions of the > form at > > http://blackmesatech.com/2011/12/pl0/v01.xhtml (old) > http://blackmesatech.com/2011/12/pl0/index.xhtml (new) > > (Hmm. I notice that the XSLTforms I'm using on that server is > an old version that doesn't yet have the profiler. I'll have to update soon.) > |
From: Jakob F. <jak...@gm...> - 2011-12-09 17:19:27
|
Thanks, Michael, for jumping in the cold water of profiling (at least that what it looks like from my perspective), this encourages me to follow suit. Best, Jakob. On Thu, Dec 8, 2011 at 18:59, C. M. Sperberg-McQueen <cm...@bl...> wrote: > In case there are others who have occasional performance problems > and aren't sure how to deal with them ... > > (This may be old hat to most readers of this list. But I was taught at > an impressionable age that the first rule of optimization is "don't do it" > and the second rule is "don't do it yet" -- I see that Wikipedia attributes > this to Michael A. Jackson -- so I have never bothered to worry much > about speed in my XForms work, since I have never had any > particular problems with it. If you already know how to use the > xsltforms profiler, you can stop reading now. If you don't know, and > worry that it might be difficult to set up, keep going.) > > On Dec 7, 2011, at 7:42 PM, C. M. Sperberg-McQueen wrote: >> ... >> >> Are there good ways to see where the time is going? Are there >> obvious ways to make it faster? >> >> Thanks for any tips, suggestions, or thought-provoking questions. > > > For the record: shortly after sending this, I remembered that Alain > had recently responded to Jakob Fix saying > >> It could be interesting to test with recent SVN build (but before rev. >> 512 if you need exsltforms), considering that the included profiler >> tells you in details the different times that can be measured. > > Ah, I said. But how do I turn profiling on? Is this going to be a lot > of work for me? > > For the benefit of others hesitant in the same way, let me say here: > it's easier than you fear, and it was probably a lot of work for Alain, > but it's not a lot of work for you. This is what I did: > > (1) point the form at .../trunk/build/xsltforms.xsl instead of at its > earlier target > > (2) turn debugging on using <?xsltforms-options debug="yes"?> > > (3) reload the form and load one of the sample datasets > > (4) click the 'Profile' button in the 'Debug Mode' area at the top > of the form > > (5) read the report, which shows a great deal of useful > information > > (6) click the Step button and return to step 4, or else > do nothing and return to step 3, or else quit. > > The information about which XPath expressions are taking the most > time is particularly interesting and useful, as it shows that the > XPath expressions I was most worried about are not in fact the > ones taking the most time. If I had spent a lot of time reformulating > the XPath expressions I was worried about, I would have wasted > all that time in a perfect illustration of pointless optimization of things > that don't make a difference. > > Long ago a wise man told me 'Never try to optimize until after > you measure to find out where the time is going'. > > The profiler in xsltforms helps a LOT with that. Bravo, Alain!! > > > > -- > **************************************************************** > * C. M. Sperberg-McQueen, Black Mesa Technologies LLC > * http://www.blackmesatech.com > * http://cmsmcq.com/mib > * http://balisage.net > **************************************************************** > > > > > > ------------------------------------------------------------------------------ > Cloud Services Checklist: Pricing and Packaging Optimization > This white paper is intended to serve as a reference, checklist and point of > discussion for anyone considering optimizing the pricing and packaging model > of a cloud services business. Read Now! > http://www.accelacomm.com/jaw/sfnl/114/51491232/ > _______________________________________________ > Xsltforms-support mailing list > Xsl...@li... > https://lists.sourceforge.net/lists/listinfo/xsltforms-support |
From: Dhruv A. <dhr...@gm...> - 2011-12-09 09:40:23
|
Hi All Please have a look at my XForm at http://pastebin.com/X8JhESZi . The replace and targetref specified on line 11 do work when this form is hosted via betterFORM but not when implemented via XSLTForms in a browser. In the case of XSLTForms, I did see an error message in the error console of Firefox saying that my return value from the resource was a syntactical error on line 1 of the current document. Appears to me that it wasn't able to reach the intended element and then of course, presenting only the return value as a valid XML document to the browser didn't quite work. My value isn't XML indeed. I'd be happy if anybody can look into this, or suggest me a quick workaround. Thanks in advance! Dhruv |
From: C. M. Sperberg-M. <cm...@bl...> - 2011-12-09 01:41:19
|
Just a short report, for the record, of my experience with the profiler now built into XSLTForms. Short version: the profiler is very helpful; in this case three relatively simple changes produced a five-fold speedup in the form. Long version: Looking at the profile information for the form I was worrying about, which had gotten too slow when the document it was operating on got bigger, I found that the most expensive XPath expressions were those used for numbering the cells of the stack and for numbering the instructions in the code area. I hard-coded appropriate numbers into attributes in the machine description, and I added a set of actions for adding a numbering attribute to the instructions in a program, after loading it. I then replaced each XPath expression of the form count(preceding-sibling::cell) +1 or count(preceding-sibling::i) with a reference to @n. I also removed the support for editing the program code; I'll move it to a separate form which communicates with the main form by bouncing the XML representation of the document off of a routine on the server. The first two changes (prenumbering the stack cells and autonumbering the instructions in the program) reduced the XForms Cumulative Refresh Time after loading a program and stepping through 50 cycles of machine time (i.e. clicking Step 50 times) from 94.6 seconds to 42.3 seconds, making the program about twice as fast. The third change (removing the editing functionality to a separate form) took it down to 17.7 seconds, another twofold speedup, for a five-fold speedup overall. Those who are curious can compare the timings and the subjective experience of the form by looking at the old and new versions of the form at http://blackmesatech.com/2011/12/pl0/v01.xhtml (old) http://blackmesatech.com/2011/12/pl0/index.xhtml (new) (Hmm. I notice that the XSLTforms I'm using on that server is an old version that doesn't yet have the profiler. I'll have to update soon.) -- **************************************************************** * 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...> - 2011-12-08 17:59:29
|
In case there are others who have occasional performance problems and aren't sure how to deal with them ... (This may be old hat to most readers of this list. But I was taught at an impressionable age that the first rule of optimization is "don't do it" and the second rule is "don't do it yet" -- I see that Wikipedia attributes this to Michael A. Jackson -- so I have never bothered to worry much about speed in my XForms work, since I have never had any particular problems with it. If you already know how to use the xsltforms profiler, you can stop reading now. If you don't know, and worry that it might be difficult to set up, keep going.) On Dec 7, 2011, at 7:42 PM, C. M. Sperberg-McQueen wrote: > ... > > Are there good ways to see where the time is going? Are there > obvious ways to make it faster? > > Thanks for any tips, suggestions, or thought-provoking questions. For the record: shortly after sending this, I remembered that Alain had recently responded to Jakob Fix saying > It could be interesting to test with recent SVN build (but before rev. > 512 if you need exsltforms), considering that the included profiler > tells you in details the different times that can be measured. Ah, I said. But how do I turn profiling on? Is this going to be a lot of work for me? For the benefit of others hesitant in the same way, let me say here: it's easier than you fear, and it was probably a lot of work for Alain, but it's not a lot of work for you. This is what I did: (1) point the form at .../trunk/build/xsltforms.xsl instead of at its earlier target (2) turn debugging on using <?xsltforms-options debug="yes"?> (3) reload the form and load one of the sample datasets (4) click the 'Profile' button in the 'Debug Mode' area at the top of the form (5) read the report, which shows a great deal of useful information (6) click the Step button and return to step 4, or else do nothing and return to step 3, or else quit. The information about which XPath expressions are taking the most time is particularly interesting and useful, as it shows that the XPath expressions I was most worried about are not in fact the ones taking the most time. If I had spent a lot of time reformulating the XPath expressions I was worried about, I would have wasted all that time in a perfect illustration of pointless optimization of things that don't make a difference. Long ago a wise man told me 'Never try to optimize until after you measure to find out where the time is going'. The profiler in xsltforms helps a LOT with that. Bravo, Alain!! -- **************************************************************** * 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...> - 2011-12-08 02:42:44
|
As a sort of Christmas present to myself, I've used XForms to make a small toy: an implementation of a very simple virtual machine designed by Nicklaus Wirth to teach compiler writing. He used it as the target machine for a compiler for a small subset of Pascal called PL/0. I guess it's appropriate that I got it to work properly yesterday, on the Feast of St. Nicholas. http://blackmesatech.com/2011/12/pl0/index.xhtml In the current state of the page, the user can select from a small number of sample programs for this virtual machine, and step through them one instruction at a time. So far, so good. What puzzles me is the difference in response time between the relatively small programs for calculating squares of numbers between 1 and n, and the somewhat longer program (but still only a hundred instructions or so) for using random numbers to estimate the volume of a sphere. (N.B. I'm not talking about the very slow method used to calculate n mod m, which means the user will almost certainly not have the patience to step all the way through the program. I'm talking about the clock time between clicking the Step button and the completion of the actions.) The response time is not particularly great on the small programs, but it didn't particularly bother me as I was working with the form. But when the code document becomes larger, the response time degrades significantly. Are there good ways to see where the time is going? Are there obvious ways to make it faster? Thanks for any tips, suggestions, or thought-provoking questions. Michael Sperberg-McQueen -- **************************************************************** * C. M. Sperberg-McQueen, Black Mesa Technologies LLC * http://www.blackmesatech.com * http://cmsmcq.com/mib * http://balisage.net **************************************************************** |
From: Stephen C. <ste...@gm...> - 2011-12-07 09:02:54
|
Hello, I am interested in visualising an model instance in a scrolling <div> on the browser. I know exsltforms does this but is there any other way in recent versions of XSLTForms? Also is it possible to redirect the debug event information to a second window? Thanks Steve Cameron |
From: Conal T. <con...@ve...> - 2011-12-06 00:10:43
|
I've come across a compatibility problem using XSLTForms with Safari 5 on Mac and Windows. If Safari receives an HTTP authentication challenge when it submits an XML instance to a server, it fails to present the user with an authentication dialog, and the submission simply fails with a 401. It seems to me that this is a bug in Safari's XmlHttpRequest object - it should trigger the browser's normal response to an authentication challenge (as other browsers do). I guess that a Javascript client of the XmlHttpRequest object is expected to explicitly set authentication credentials rather than leave it to the browser. NB if you open the XML instance directly in the browser (i.e. not using an XForm) then Safari prompts the user for a password, and authenticates with the server. Once the browser has established an authenticated session with the server, then the XForm works fine. So a work-around for the problem is to ensure that not only the editable XML instances, but also the XForms themselves require authentication. While I'm on the subject, does anyone have any example of capturing user credentials actually in an XForm (i.e. with a "credentials" instance?), and then using those for basic HTTP authentication? I suppose one have to use the digest() function to encode the credentials, and the submission header element to submit it? -- Conal Tuohy eResearch Business Analyst Victorian eResearch Strategic Initiative +61-466324297 |
From: <st...@sa...> - 2011-12-05 22:43:41
|
Hi, Alain, Here is a problem I am observing in r521 which looks as though the nodeset binding on an itemset which depends on the value of a checkbox is not being updated properly. To reproduce: http://oracc.museum.upenn.edu/itemset-update.xml Click on 'Erridupizir 1' Click on select1 on lower right of navigation area which reads 'English'--you will see an entry labeled 'No translation' Leave the translation on English Click on the checkbox labeled 'only'; the display switches to show only the translation Click on the select1 labeled 'English'--the 'No translation' entry has disappeared, correctly Click on the 'only' box to toggle it back to 'false'; the Sumerian reappears in the text display area Click on the select1 labeled 'English' and you see the problem: the 'No translation' entry in the select1 has not reappeared You can read the code at a glance, I am sure, but the way it is supposed to work is that 'No translation' is an itemset which is supposed to display when the checkbox transonly is false and hide when transonly is true. This is with FF 8.0.1 on Mac Lion 10.7.2 Steve |
From: Alain C. <ala...@ag...> - 2011-12-02 12:42:41
|
Hello Jakob, What is the version of XSLTForms you're using with MarkLogic Server? It could be interesting to test with recent SVN build (but before rev. 512 if you need exsltforms), considering that the included profiler tells you in details the different times that can be measured. Are you defining a complex form, with a lot of HTML elements and XForms controls? Thanks! -Alain Le 01/12/2011 11:57, Jakob Fix a écrit : > Hello, > > I'm trying to improve the performance of one of our xsltform-based xforms. > > This form is served by a MarkLogic-based web application and takes > about 20 to 30 seconds to load. > > As you can see below one of the resources (exsltforms.xsl) takes > particularly long: > http://img46.imageshack.us/img46/9208/chrometimeline.png > > I've been able to make sure that the time it takes to get the instance > data from MarkLogic is negligible, and the retrieval of the several > XSLT files seem to be correct as well. > > I'm not quite sure what exactly it is spending its time on, so I would > be grateful for this list's input. > > cheers, > Jakob. > |
From: Alain C. <ala...@ag...> - 2011-12-02 12:35:21
|
Hi Grégoire, XMLEvents.dispatch -> XsltForms_xmlevents.dispatch xforms.refresh -> XsltForms_globals.refresh xforms.ready -> XsltForms_globals.ready Thank you for your feedbacks! -Alain Le 01/12/2011 17:42, Grégoire COLBERT a écrit : > Hi Alain, > > I'm still in the process of updating my own JS code to the new naming > scheme, and I wonder what to do with : > - xforms.dispatch > - xforms.refresh > - xforms. ready > > Looking in the new code, I supposed it would work with : > - XsltForms_events.dispatch > - XsltForms_browser.refresh > - XsltForms_globals.ready > > but it returns errors like this one : "XsltForms_browser.refresh is not > a function". > > Any help would help. :-) > > Thanks, > Grégoire > > ------------------------------------------------------------------------------ > All the data continuously generated in your IT infrastructure > contains a definitive record of customers, application performance, > security threats, fraudulent activity, and more. Splunk takes this > data and makes sense of it. IT sense. And common sense. > http://p.sf.net/sfu/splunk-novd2d > _______________________________________________ > Xsltforms-support mailing list > Xsl...@li... > https://lists.sourceforge.net/lists/listinfo/xsltforms-support > |
From: Alain C. <ala...@ag...> - 2011-12-02 12:25:28
|
Hi Gordon, The Javascript class names have all been recently changed to avoid any future conflict with external libraries, for example. exsltforms should be adapted to work again with the latest builds of XSLTForms. BTW, XSLTForms now includes its own TinyMCE integration if it was the reason for you to use exsltforms. Thanks! -Alain Le 02/12/2011 10:12, Gordon Rogers a écrit : > > Hi Alain > > Sorry that was my mistake, the errors were coming from exsltforms and > not xsltforms. > > Gordon > > *From:*Alain Couthures [mailto:ala...@ag...] > *Sent:* 29 November 2011 20:31 > *To:* Gordon Rogers > *Cc:* xsl...@li... > *Subject:* Re: [Xsltforms-support] Using insert where both source and > destination contain bindings > > Hi Gordon, > > Rev. 520 xsltforms.js doesn't contain any Core.<method>... Did you > really upgrade to it?? > > -Alain > > Le 29/11/2011 14:59, Gordon Rogers a écrit : > > Hi Alain > > Thanks for the prompt feedback, I'm in the process of upgrading my > version of xsltforms and it does indeed solve this bug. In passing I > noticed a few places in xsltforms.js where you're still using > Core.<method> rather than XsltForms_browser.<method>, I can't > contribute the changes I've made unfortunately as we've added some > custom code in places within the js file so it wouldn't be compatible. > > Thanks, > Gordon > > *From:*Alain Couthures [mailto:ala...@ag...] > *Sent:* 26 November 2011 21:26 > *To:* Gordon Rogers > *Cc:* xsl...@li... > <mailto:xsl...@li...> > *Subject:* Re: [Xsltforms-support] Using insert where both source and > destination contain bindings > > Hi Gordon, > > I didn't get any error with the latest trunk revision in the SF SVN > repository (this is not yet the 1.0RC but it's close to it!). > > Thank you for your feedbacks! > > -Alain > > Le 25/11/2011 10:43, Gordon Rogers a écrit : > > Hi > > I've recently upgraded my version of xsltforms to the latest release > and have started to receive the error message -- "Two binds affect one > node ..." this is thrown from within XFBind.prototype.refresh and > occurs when I'm doing an xf:insert with bindings in place for both the > source and the destination. The insert appears to work regardless of > the error message being thrown, so I'm not sure of the value in making > the validation check. > > I've attached a simple example that recreates the error and is based > on the deep-copy.xml example distributed with xsltforms.js. > > Is there an obvious fix to this problem? My initial thought was to > remove the validation check locally, but I'm not sure of the > underlying reason for introducing that check. Is a repeat a special > case where the check has no meaning? > > Thanks, > > Gordon > > *Gordon Rogers* > > Senior Developer > > Corelogic Limited > > www.corelogic.co.uk <http://www.corelogic.co.uk/> > > Tel: 0131 550 0447 > > Email _go...@co... > <mailto:gor...@co...>_ > > This document should only be read by those persons to whom it is > intended, and its contents are private and confidential. If you > receive this email message in error, notify the sender immediately and > do not disclose, copy or distribute this message, or open any attachments > > > > > > ------------------------------------------------------------------------------ > All the data continuously generated in your IT infrastructure > contains a definitive record of customers, application performance, > security threats, fraudulent activity, and more. Splunk takes this > data and makes sense of it. IT sense. And common sense. > http://p.sf.net/sfu/splunk-novd2d > > > > > > _______________________________________________ > Xsltforms-support mailing list > Xsl...@li... <mailto:Xsl...@li...> > https://lists.sourceforge.net/lists/listinfo/xsltforms-support > |
From: Gordon R. <gor...@co...> - 2011-12-02 09:12:23
|
Hi Alain Sorry that was my mistake, the errors were coming from exsltforms and not xsltforms. Gordon From: Alain Couthures [mailto:ala...@ag...] Sent: 29 November 2011 20:31 To: Gordon Rogers Cc: xsl...@li... Subject: Re: [Xsltforms-support] Using insert where both source and destination contain bindings Hi Gordon, Rev. 520 xsltforms.js doesn't contain any Core.<method>... Did you really upgrade to it?? -Alain Le 29/11/2011 14:59, Gordon Rogers a écrit : Hi Alain Thanks for the prompt feedback, I'm in the process of upgrading my version of xsltforms and it does indeed solve this bug. In passing I noticed a few places in xsltforms.js where you're still using Core.<method> rather than XsltForms_browser.<method>, I can't contribute the changes I've made unfortunately as we've added some custom code in places within the js file so it wouldn't be compatible. Thanks, Gordon From: Alain Couthures [mailto:ala...@ag...] Sent: 26 November 2011 21:26 To: Gordon Rogers Cc: xsl...@li... Subject: Re: [Xsltforms-support] Using insert where both source and destination contain bindings Hi Gordon, I didn't get any error with the latest trunk revision in the SF SVN repository (this is not yet the 1.0RC but it's close to it!). Thank you for your feedbacks! -Alain Le 25/11/2011 10:43, Gordon Rogers a écrit : Hi I've recently upgraded my version of xsltforms to the latest release and have started to receive the error message - "Two binds affect one node ..." this is thrown from within XFBind.prototype.refresh and occurs when I'm doing an xf:insert with bindings in place for both the source and the destination. The insert appears to work regardless of the error message being thrown, so I'm not sure of the value in making the validation check. I've attached a simple example that recreates the error and is based on the deep-copy.xml example distributed with xsltforms.js. Is there an obvious fix to this problem? My initial thought was to remove the validation check locally, but I'm not sure of the underlying reason for introducing that check. Is a repeat a special case where the check has no meaning? Thanks, Gordon Gordon Rogers Senior Developer Corelogic Limited www.corelogic.co.uk <http://www.corelogic.co.uk/> Tel: 0131 550 0447 Email gor...@co... This document should only be read by those persons to whom it is intended, and its contents are private and confidential. If you receive this email message in error, notify the sender immediately and do not disclose, copy or distribute this message, or open any attachments ------------------------------------------------------------------------------ All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-novd2d _______________________________________________ Xsltforms-support mailing list Xsl...@li... https://lists.sourceforge.net/lists/listinfo/xsltforms-support |
From: Grégoire C. <gco...@gm...> - 2011-12-01 16:43:05
|
Hi Alain, I'm still in the process of updating my own JS code to the new naming scheme, and I wonder what to do with : - xforms.dispatch - xforms.refresh - xforms. ready Looking in the new code, I supposed it would work with : - XsltForms_events.dispatch - XsltForms_browser.refresh - XsltForms_globals.ready but it returns errors like this one : "XsltForms_browser.refresh is not a function". Any help would help. :-) Thanks, Grégoire |
From: Jakob F. <jak...@gm...> - 2011-12-01 10:57:56
|
Hello, I'm trying to improve the performance of one of our xsltform-based xforms. This form is served by a MarkLogic-based web application and takes about 20 to 30 seconds to load. As you can see below one of the resources (exsltforms.xsl) takes particularly long: http://img46.imageshack.us/img46/9208/chrometimeline.png I've been able to make sure that the time it takes to get the instance data from MarkLogic is negligible, and the retrieval of the several XSLT files seem to be correct as well. I'm not quite sure what exactly it is spending its time on, so I would be grateful for this list's input. cheers, Jakob. |
From: Alain C. <ala...@ag...> - 2011-11-29 20:31:24
|
Hi Gordon, Rev. 520 xsltforms.js doesn't contain any Core.<method>... Did you really upgrade to it?? -Alain Le 29/11/2011 14:59, Gordon Rogers a écrit : > > Hi Alain > > Thanks for the prompt feedback, I'm in the process of upgrading my > version of xsltforms and it does indeed solve this bug. In passing I > noticed a few places in xsltforms.js where you're still using > Core.<method> rather than XsltForms_browser.<method>, I can't > contribute the changes I've made unfortunately as we've added some > custom code in places within the js file so it wouldn't be compatible. > > Thanks, > Gordon > > *From:*Alain Couthures [mailto:ala...@ag...] > *Sent:* 26 November 2011 21:26 > *To:* Gordon Rogers > *Cc:* xsl...@li... > *Subject:* Re: [Xsltforms-support] Using insert where both source and > destination contain bindings > > Hi Gordon, > > I didn't get any error with the latest trunk revision in the SF SVN > repository (this is not yet the 1.0RC but it's close to it!). > > Thank you for your feedbacks! > > -Alain > > Le 25/11/2011 10:43, Gordon Rogers a écrit : > > Hi > > I've recently upgraded my version of xsltforms to the latest release > and have started to receive the error message -- "Two binds affect one > node ..." this is thrown from within XFBind.prototype.refresh and > occurs when I'm doing an xf:insert with bindings in place for both the > source and the destination. The insert appears to work regardless of > the error message being thrown, so I'm not sure of the value in making > the validation check. > > I've attached a simple example that recreates the error and is based > on the deep-copy.xml example distributed with xsltforms.js. > > Is there an obvious fix to this problem? My initial thought was to > remove the validation check locally, but I'm not sure of the > underlying reason for introducing that check. Is a repeat a special > case where the check has no meaning? > > Thanks, > > Gordon > > *Gordon Rogers* > > Senior Developer > > Corelogic Limited > > www.corelogic.co.uk <http://www.corelogic.co.uk/> > > Tel: 0131 550 0447 > > Email _go...@co... > <mailto:gor...@co...>_ > > This document should only be read by those persons to whom it is > intended, and its contents are private and confidential. If you > receive this email message in error, notify the sender immediately and > do not disclose, copy or distribute this message, or open any attachments > > > > > ------------------------------------------------------------------------------ > All the data continuously generated in your IT infrastructure > contains a definitive record of customers, application performance, > security threats, fraudulent activity, and more. Splunk takes this > data and makes sense of it. IT sense. And common sense. > http://p.sf.net/sfu/splunk-novd2d > > > > > _______________________________________________ > Xsltforms-support mailing list > Xsl...@li... <mailto:Xsl...@li...> > https://lists.sourceforge.net/lists/listinfo/xsltforms-support > |
From: Gordon R. <gor...@co...> - 2011-11-29 13:59:57
|
Hi Alain Thanks for the prompt feedback, I'm in the process of upgrading my version of xsltforms and it does indeed solve this bug. In passing I noticed a few places in xsltforms.js where you're still using Core.<method> rather than XsltForms_browser.<method>, I can't contribute the changes I've made unfortunately as we've added some custom code in places within the js file so it wouldn't be compatible. Thanks, Gordon From: Alain Couthures [mailto:ala...@ag...] Sent: 26 November 2011 21:26 To: Gordon Rogers Cc: xsl...@li... Subject: Re: [Xsltforms-support] Using insert where both source and destination contain bindings Hi Gordon, I didn't get any error with the latest trunk revision in the SF SVN repository (this is not yet the 1.0RC but it's close to it!). Thank you for your feedbacks! -Alain Le 25/11/2011 10:43, Gordon Rogers a écrit : Hi I've recently upgraded my version of xsltforms to the latest release and have started to receive the error message - "Two binds affect one node ..." this is thrown from within XFBind.prototype.refresh and occurs when I'm doing an xf:insert with bindings in place for both the source and the destination. The insert appears to work regardless of the error message being thrown, so I'm not sure of the value in making the validation check. I've attached a simple example that recreates the error and is based on the deep-copy.xml example distributed with xsltforms.js. Is there an obvious fix to this problem? My initial thought was to remove the validation check locally, but I'm not sure of the underlying reason for introducing that check. Is a repeat a special case where the check has no meaning? Thanks, Gordon Gordon Rogers Senior Developer Corelogic Limited www.corelogic.co.uk <http://www.corelogic.co.uk/> Tel: 0131 550 0447 Email gor...@co... This document should only be read by those persons to whom it is intended, and its contents are private and confidential. If you receive this email message in error, notify the sender immediately and do not disclose, copy or distribute this message, or open any attachments ------------------------------------------------------------------------------ All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-novd2d _______________________________________________ Xsltforms-support mailing list Xsl...@li... https://lists.sourceforge.net/lists/listinfo/xsltforms-support |