xsltforms-support Mailing List for XSLTForms (Page 43)
Brought to you by:
alain-couthures
You can subscribe to this list here.
2009 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
(6) |
Jun
(9) |
Jul
(16) |
Aug
(5) |
Sep
(43) |
Oct
(36) |
Nov
(58) |
Dec
(43) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2010 |
Jan
(79) |
Feb
(81) |
Mar
(107) |
Apr
(93) |
May
(85) |
Jun
(54) |
Jul
(64) |
Aug
(54) |
Sep
(45) |
Oct
(53) |
Nov
(34) |
Dec
(77) |
2011 |
Jan
(56) |
Feb
(53) |
Mar
(52) |
Apr
(66) |
May
(44) |
Jun
(16) |
Jul
(28) |
Aug
(5) |
Sep
(15) |
Oct
(21) |
Nov
(51) |
Dec
(46) |
2012 |
Jan
(16) |
Feb
(38) |
Mar
(47) |
Apr
(45) |
May
(41) |
Jun
(41) |
Jul
(72) |
Aug
(17) |
Sep
(10) |
Oct
(16) |
Nov
(29) |
Dec
(30) |
2013 |
Jan
(25) |
Feb
(13) |
Mar
(20) |
Apr
(25) |
May
(34) |
Jun
(8) |
Jul
(12) |
Aug
(9) |
Sep
(21) |
Oct
(19) |
Nov
(6) |
Dec
(2) |
2014 |
Jan
(14) |
Feb
(8) |
Mar
(7) |
Apr
(13) |
May
(33) |
Jun
(13) |
Jul
(6) |
Aug
(5) |
Sep
(5) |
Oct
(34) |
Nov
(7) |
Dec
|
2015 |
Jan
(1) |
Feb
(6) |
Mar
(17) |
Apr
(12) |
May
(10) |
Jun
(18) |
Jul
(31) |
Aug
(9) |
Sep
(3) |
Oct
(6) |
Nov
(19) |
Dec
(1) |
2016 |
Jan
(18) |
Feb
(4) |
Mar
(13) |
Apr
(19) |
May
|
Jun
(17) |
Jul
(7) |
Aug
|
Sep
(3) |
Oct
(6) |
Nov
(3) |
Dec
|
2017 |
Jan
(5) |
Feb
(17) |
Mar
(4) |
Apr
(8) |
May
(3) |
Jun
|
Jul
(8) |
Aug
(2) |
Sep
|
Oct
(5) |
Nov
(6) |
Dec
(4) |
2018 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(6) |
Nov
|
Dec
(1) |
2019 |
Jan
|
Feb
|
Mar
(4) |
Apr
(2) |
May
(4) |
Jun
|
Jul
|
Aug
(2) |
Sep
(7) |
Oct
|
Nov
|
Dec
|
2020 |
Jan
(13) |
Feb
(17) |
Mar
(8) |
Apr
(11) |
May
(15) |
Jun
(11) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(6) |
2021 |
Jan
(9) |
Feb
(26) |
Mar
(17) |
Apr
|
May
(7) |
Jun
(18) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(10) |
2022 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
(3) |
Jun
|
Jul
|
Aug
(2) |
Sep
(3) |
Oct
(2) |
Nov
(10) |
Dec
(1) |
2023 |
Jan
(10) |
Feb
|
Mar
(7) |
Apr
(8) |
May
(3) |
Jun
|
Jul
|
Aug
|
Sep
(8) |
Oct
(11) |
Nov
(8) |
Dec
(5) |
2024 |
Jan
(7) |
Feb
(3) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2025 |
Jan
(4) |
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: COUTHURES A. <ala...@fr...> - 2012-07-05 19:45:06
|
Hello Javier, XSLTForms has its own XPath parser and, currently, it doesn't allow special characters in names. Adding them should not be difficult and should not really slow the rendering... A simple test: just adding such a character in an element name doesn't bother browsers! Do you already have a list or a link? Thanks! -Alain Le 05/07/2012 13:24, Javier Díaz a écrit : > Hello, > > We are testing our xsltforms application with problematic characters in > spanish (ñ, accents, etc), and we have found the following error using > this xml and having binding expressions: > > <Dia> > <Mañana>Viernes</Mañana> > </Dia> > > > XSLTForms Exception > -------------------------- > > Error parsing the following XPath expression : > > /Dia/Mañana > > Unknown operator at 'ñ' in '/Dia/Mañana' > > > We will try to avoid this kind of xmls, but we want to know if there is > any kind of limitation in Xsltforms using it. According to xml standard, > xmls with "ñ" are valid, although in my opinion it isn't recomendable to > use it :). > > Best regards, > Javier > |
From: Ihe O. <ihe...@go...> - 2012-07-05 18:17:00
|
Are there any instructions or particular guidelines for those of us who installed and are runnnig XSLTForms via eXist? On Wed, Jul 4, 2012 at 8:54 PM, Alain Couthures <ala...@ag...> wrote: > Hello, > > I have just fixed a big performance issue due to XML namespace being > used in XPath expression (for example, in @xml:lang). > > It was strongly slowing the transformation step (more than twelve > seconds in a rather simple test form!). > > BTW, the namespace:: axis is not yet supported by Mozilla XSLT engine... > > Thank you for your feedbacks! > > -Alain > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Xsltforms-support mailing list > Xsl...@li... > https://lists.sourceforge.net/lists/listinfo/xsltforms-support |
From: Mark S. <m_s...@me...> - 2012-07-05 13:45:31
|
Hi, I have fixed my Javascript to some extent, now using: var modelElem = document.getElementById("theModel"); var instDoc = modelElem.getInstanceDocument("variables"); var xmlSite = instDoc.getElementsByTagName("currSite")[0].childNodes[0]; xmlSite.nodeValue ='fred'; but still modelElem.rebuild(); modelElem.recalculate(); modelElem.revalidate(); modelElem.refresh(); do not seem to be carrying the new value of xmlSite.nodeValue into the XML instance used by the XForms model. Any ideas where I am going wrong? Best wishes Mark On Jul 01, 2012, at 10:22 PM, Mark Seaborne <m_s...@ma...> wrote: Hi, I am using .getInstanceDocument to successfully access values from an instance within script. However, I don't know how to set a node value in my script, Here is what I have tried thus far: var modelElem = document.getElementById("theModel"); var instDoc = modelElem.getInstanceDocument("variables"); var xmlSite = instDoc.getElementsByTagName("currSite")[0]; xmlSite.textContent = 'fred'; modelElem.rebuild(); modelElem.recalculate(); modelElem.revalidate(); modelElem.refresh(); alert(xmlSite.textContent); The alert displays the modified value, but the XForm does not. I guess that I am doing something fairly simple wrong? Best wishes Mark ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Xsltforms-support mailing list Xsl...@li... https://lists.sourceforge.net/lists/listinfo/xsltforms-support |
From: Javier D. <jd...@tc...> - 2012-07-05 11:28:42
|
Hello, We are testing our xsltforms application with problematic characters in spanish (ñ, accents, etc), and we have found the following error using this xml and having binding expressions: <Dia> <Mañana>Viernes</Mañana> </Dia> XSLTForms Exception -------------------------- Error parsing the following XPath expression : /Dia/Mañana Unknown operator at 'ñ' in '/Dia/Mañana' We will try to avoid this kind of xmls, but we want to know if there is any kind of limitation in Xsltforms using it. According to xml standard, xmls with "ñ" are valid, although in my opinion it isn't recomendable to use it :). Best regards, Javier ************************************************************************************************************************************************ *La información contenida en este mensaje de correo electrónico es confidencial y puede revestir el carácter de reservada. * *Está dirigida exclusivamente a la persona destinataria. * *El acceso o cualquier uso por parte de cualquier otra persona de este mensaje no están autorizados y pueden ser ilegales.* *Si no es Ud. la persona destinataria, le rogamos que proceda a borrarlo. * *The information in this e-mail is confidential and may be legally privileged. * *It is intended solely for the addressee. * *Access or any use by any other person to this Internet e-mail is not authorised and may be unlawful. * *If you are not the intended recipient, please delete this e-mail. * ************************************************************************************************************************************************ |
From: Alain C. <ala...@ag...> - 2012-07-04 19:54:23
|
Hello, I have just fixed a big performance issue due to XML namespace being used in XPath expression (for example, in @xml:lang). It was strongly slowing the transformation step (more than twelve seconds in a rather simple test form!). BTW, the namespace:: axis is not yet supported by Mozilla XSLT engine... Thank you for your feedbacks! -Alain |
From: Javier D. <jd...@tc...> - 2012-07-04 19:29:01
|
Hello, how can I do a asynchronous request, with ajaxforms property or with w3c xforms one? Best regards, Javier El 04/08/11 04:35, Leigh L. Klotz, Jr. escribió: > I see xsltforms.xsl mentions the Ajaxforms extensions > submission/@ajx:synchronized boolean, and submit/@ajx:synchronized > boolean, but doesn't handle XForms 1.1 submission/@mode="synchronous" or > submission/@mode="asynchronous". > > Is this a mistake or is ajx:synchronized different from XForms 1.1 > submission/@mode? > > Leigh. > > > ------------------------------------------------------------------------------ > BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA > The must-attend event for mobile developers. Connect with experts. > Get tools for creating Super Apps. See the latest technologies. > Sessions, hands-on labs, demos & much more. Register early & save! > http://p.sf.net/sfu/rim-blackberry-1 > _______________________________________________ > Xsltforms-support mailing list > Xsl...@li... > https://lists.sourceforge.net/lists/listinfo/xsltforms-support > ************************************************************************************************************************************************ *La información contenida en este mensaje de correo electrónico es confidencial y puede revestir el carácter de reservada. * *Está dirigida exclusivamente a la persona destinataria. * *El acceso o cualquier uso por parte de cualquier otra persona de este mensaje no están autorizados y pueden ser ilegales.* *Si no es Ud. la persona destinataria, le rogamos que proceda a borrarlo. * *The information in this e-mail is confidential and may be legally privileged. * *It is intended solely for the addressee. * *Access or any use by any other person to this Internet e-mail is not authorised and may be unlawful. * *If you are not the intended recipient, please delete this e-mail. * ************************************************************************************************************************************************ |
From: Ihe O. <ihe...@go...> - 2012-07-03 13:53:18
|
I have run an XSLTForms transformation offline (i.e running Saxon on the command line to transform the XForm into XHTML). Doing this yields me the following error when I try and render the generated XHTML Incorrect Javascript code generation: ReferenceError: XsltForms_globals is not defined at xsltforms_initImpl ( http://localhost:8080/exist/rest/db/apps/b2b/mytest.xhtml:89:1) at xsltforms_init ( http://localhost:8080/exist/rest/db/apps/b2b/mytest.xhtml:406:1) at onload ( http://localhost:8080/exist/rest/db/apps/b2b/mytest.xhtml:413:129) ReferenceError XsltForms_globals is not defined fi The form does render correctly when transformed through a pi in the XForm (albeit perhaps with the aid of some serialisation settings) but the rendering speed is unacceptably slow (minutes). This is why I am trying to find other ways to do the transformation. I'm not sure what the list etiquette is on attachments so I will attach both the XForm and the Transformed XHTML on request. Thanks Ihe |
From: Grégoire C. <gco...@gm...> - 2012-07-02 10:26:23
|
Hi Alain, Even though things are getting better with rev 547, I still have one issue. Inside the following xf:submission, I have a xf:insert to insert the nodes fetched by the submission inside instance "instance-annonces". The xf:insert works and the xf:message displays the correct number of announces. But the UI isn't refreshed. <xf:submission id="rechercher-des-annonces-multi-communes" method="get" serialization="none" replace="instance" instance="instance-annonces-reponse"> <xf:resource value="concat('/annonces/recherche/' , instance('instance-annonces-requete')/type-d-annonce , '/' , fn:string-join(instance('instance-communes-selectionnees')/commune/clef,'_'))"/> <xf:action ev:event="xforms-submit-done" if="count(instance('instance-annonces-reponse')/annonce) > 0"> <xf:insert origin="instance('instance-annonces-reponse')/annonce" nodeset="instance('instance-annonces')/annonce"/> <xf:message>count=<xf:output value="count(instance('instance-annonces')/annonce)"/></xf:message> </xf:action> </xf:submission> I tried adding <xf:refresh /> after the xf:insert, but this didn't solve the issue. Did I misunderstand something about xf:insert and the deferred update behaviour, or is there any other way to force the refresh? Any help welcome. Grégoire |
From: Grégoire C. <gco...@gm...> - 2012-07-02 10:03:23
|
Hi Alain, It's ok with rev 547. Grégoire Le 01/07/2012 23:13, Alain Couthures a écrit : > Hi Grégoire, > > When I added label/@ref in every situation, I didn't forget to consider > select1/itemset/label/@ref as a special case but I forgot to consider > select1/item/label/@ref too... > > Thank you for pointing at this! > > -Alain > > Please check again with rev 547. > > Le 26/06/2012 09:59, Grégoire COLBERT a écrit : >> Hi Alain, >> >> Line 873 of the generated XML file is : >> >> new XsltForms_output(xsltforms_subform,xsltforms_subform.id + >> "-label-40",0,new XsltForms_binding(null, >> "instance('instance-langues')/chaine[@name='groupees-par-commune'][@xml:lang=/configuration/langue]"),null); >> >> >> which corresponds to the first label of this select1 : >> >> <xf:select1 appearance="minimal" >> ref="instance('instance-tri-des-annonces')//xsl:variable[@name = >> 'grouper']/@select"> >> <xf:item> >> <xf:label model="modele-configuration" >> ref="instance('instance-langues')/chaine[@name='groupees-par-commune'][@xml:lang=/configuration/langue]"/> >> >> <xf:value>'par-commune'</xf:value> >> </xf:item> >> <xf:item> >> <xf:label model="modele-configuration" >> ref="instance('instance-langues')/chaine[@name='dans-une-liste-globale'][@xml:lang=/configuration/langue]"/> >> >> <xf:value>'liste-globale'</xf:value> >> </xf:item> >> <xf:action ev:event="xforms-value-changed"> >> <xf:dispatch name="action-monter-drapeau-et-appeler-trier-annonces" >> targetid="modele-annonces"/> >> </xf:action> >> </xf:select1> >> >> Do you see something wrong with this select1? >> >> Thanks! >> Grégoire >> >> > |
From: Alain C. <ala...@ag...> - 2012-07-01 21:14:37
|
Hi Grégoire, When I added label/@ref in every situation, I didn't forget to consider select1/itemset/label/@ref as a special case but I forgot to consider select1/item/label/@ref too... Thank you for pointing at this! -Alain Please check again with rev 547. Le 26/06/2012 09:59, Grégoire COLBERT a écrit : > Hi Alain, > > Line 873 of the generated XML file is : > > new XsltForms_output(xsltforms_subform,xsltforms_subform.id + > "-label-40",0,new XsltForms_binding(null, > "instance('instance-langues')/chaine[@name='groupees-par-commune'][@xml:lang=/configuration/langue]"),null); > > which corresponds to the first label of this select1 : > > <xf:select1 appearance="minimal" > ref="instance('instance-tri-des-annonces')//xsl:variable[@name = > 'grouper']/@select"> > <xf:item> > <xf:label model="modele-configuration" > ref="instance('instance-langues')/chaine[@name='groupees-par-commune'][@xml:lang=/configuration/langue]"/> > <xf:value>'par-commune'</xf:value> > </xf:item> > <xf:item> > <xf:label model="modele-configuration" > ref="instance('instance-langues')/chaine[@name='dans-une-liste-globale'][@xml:lang=/configuration/langue]"/> > <xf:value>'liste-globale'</xf:value> > </xf:item> > <xf:action ev:event="xforms-value-changed"> > <xf:dispatch name="action-monter-drapeau-et-appeler-trier-annonces" > targetid="modele-annonces"/> > </xf:action> > </xf:select1> > > Do you see something wrong with this select1? > > Thanks! > Grégoire > > |
From: Alain C. <ala...@ag...> - 2012-07-01 20:28:11
|
Le 27/06/2012 19:25, C. M. Sperberg-McQueen a écrit : > If (as I think I understand) the right way to do subforms is still > a matter for experimentation, then this is one place where I > might suggest an alternative. I think it might be useful if the > calling subform were able to specify one or more IDs of > constructs in the subform and have those count as the subform > body. > > So instead of > > <xforms:load if="@selected != 'true'" show="embed" targetid="subform" > resource="books.xml"/> > > the call in writers.xml might read > > <xforms:load if="@selected != 'true'" show="embed" targetid="subform" > resource="books.xml#bookdetails"/> > > And the books.xml subform would include (for example): > > <xf:repeat id="bookdetails" nodeset="book"> > > This would allow the subform to contain material like standard > navigation bars and headers, for when it's loaded in a stand-alone > way, without those navigation bars and headers cluttering up > the main form (which presumably already has a header and > navigation bar of its own, if that's the style used by the project > in question. > > If the caller does not specify an ID, then taking the children of > /html/body makes sense to me. I know that such a facility is already possible with betterform and I will surely consider it for XSLTForms soon! > >> When loaded from a main form, the model part of the subform is added to >> the model part of the main form. Conflicting ids in models are merged by >> XSLTForms: instances, submissions and bindings are added into the >> corresponding model of the main form. Conflicting ids in instances, >> submissions and bindings are supported by ignoring the conflicting >> elements in the subform. > So one way to make something in the subform NOT be included > in the main form would be to give it an ID that conflicts with an ID > in the main form? Yes, but only for instances, submissions and bindings! Thanks! -Alain |
From: Alain C. <ala...@ag...> - 2012-07-01 20:16:59
|
Hello Steve, Yes, I am happy to see more and more small HTTP servers written in different languages (node.js, ...). For those who would like to have an XForms application within a unique .jar or .exe, they can easily be modified to include specific source files before being compiled! Thanks! -Alain Le 29/06/2012 04:33, Stephen Cameron a écrit : > http://vertx.io > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > > > _______________________________________________ > Xsltforms-support mailing list > Xsl...@li... > https://lists.sourceforge.net/lists/listinfo/xsltforms-support |
From: Alain C. <ala...@ag...> - 2012-07-01 20:11:19
|
Thank you for those numbers, improving performance is the most important point for XSLTForms and XForms and I am convinced that the compiler approach is still the most pertinent one. Actually, there is currently no optimization in XSLTForms concerning what the form is effectively doing: each control/element/XPath expression is considered independently and there are plenty of useless instructions and loops. Comparing execution durations in browsers is not always pertinent because of internal threads for garbage collection and so on... But 1.0RC is clearly faster :-) -Alain Le 30/06/2012 05:39, C. M. Sperberg-McQueen a écrit : > On Jun 26, 2012, at 7:38 PM, C. M. Sperberg-McQueen wrote: >> ... as far as I can tell, moving from Beta3 to 1.0RC has reduced load time >> for some documents I am working with by 25 to 30%, and reduced time >> for processing some parts of the documents by 15 or 20%, and changing >> to subforms reduces the load time by another 25%. So the new version >> of the form I'll be able to make available to my users is about twice as >> fast, on long documents, as the current version. > Concretely, for Beta 3 vs 1.0RC using subforms, the numbers for the > four documents I have used for testing are: > > (Size, load time, time for some simple manipulations) > 471297 bytes, 11407 vs 4111 ms, 6791 vs 3488 ms > 173970 bytes, 5123 vs 2380 ms, 7537 vs 4317 ms > 454914 bytes, 10181 vs 3161 ms, 1115 vs 2006 ms > 324214 bytes, 9810 vs 3703 ms, 6869 vs 4219 ms > > I haven't yet found a good way of automating the timings, so these > are based on going through the test script just once for each document. > > But they are enough to show that subforms are a huge improvement, > and that 1.0RC is a big improvement by itself. > > Thank you, Alain! > |
From: Alain C. <ala...@ag...> - 2012-07-01 19:58:46
|
Hello Michael, Thank you for this fix. I will have to check whether this is due to a missing treatment for XPath expression objects when unloading a subform because there might be some memory leak. -Alain Le 30/06/2012 04:36, C. M. Sperberg-McQueen a écrit : > On Jun 26, 2012, at 7:38 PM, C. M. Sperberg-McQueen wrote: > >> I've encountered an unexpected behavior in 1.0RC. I first encountered >> it in one of my own forms, but the simplest way to recreate it may be: >> >> (1) Load the writers.xml example from the 1.0RC distribution, or from >> >> http://www.agencexml.com/xsltforms/writers.xml >> >> (2) Click Show Books and Hide Books a few times. >> >> (3) Click Profiler. >> >> This ought in normal operation to produce a profile showing the profiler >> information we have all come to love. What it produces instead, at the >> moment, is a Javascript error message saying >> >> XSLTForms Exception >> -------------------------- >> >> Error dispatching event 'xforms-model-construct' : >> >> xforms-link-exception > > I think I have now identified the source of this error. > > Adding calls to Xsltforms_browser.debugConsole.write > at various locations makes clear that the error is arising in the > Xsltforms_globals.profiling_data() function, specifically in the loop > > for (var expr in XsltForms_xpath.expressions) { > if (XsltForms_xpath.expressions.hasOwnProperty(expr)) { > exprtab[exprtab.length] = {expr: expr, evaltime: XsltForms_xpath.expressions[expr].evaltime}; > } > } > > When I load writers.xml and click the Profiler button before having > unloaded any author's booklist, then this loop executes eight times, > for the expressions > > . != 'true' > @firstname > @lastname > @selected > @selected != 'true' > @selected = 'true' > choose(@selected != 'true', 'Show', 'Hide') > writer > > These are the XPath expressions occurring in writers.xml. > > When I load the subform, by clicking Show Books, and then click Profiler, > the loop executes eleven times: eight times for the XPath expressions shown > above, and three more times for > > @title > @year > book > > These are the XPath expressions in books.xml, the subform. > > When I then unload the subform by clicking Hide Books, and click Profiler > a third time, I get an error message in the Profiler window, and the debugging > trace in the main-form window shows the loop being entered nine times; it > looks a lot as if the error were being raised when the loop tries to evaluate > XsltForms_xpath.expressions['@title'].evaltime. > > A little further examination suggests that after the subform is > unloaded, XsltForms_xpath.expressions['@title'] is null, so > the attempt to get its 'evaltime' property produces an error, > which causes the load of the profiler to fail. > > Changing the conditional in lines 302-304 of xsltforms.js (in 1.0RC) to > > if (XsltForms_xpath.expressions.hasOwnProperty(expr) && XsltForms_xpath.expressions[expr]) { > exprtab[exprtab.length] = {expr: expr, evaltime: XsltForms_xpath.expressions[expr].evaltime}; > } > > seems to allow the Profiler to launch normally even after the subform is > unloaded. > > Michael > |
From: Alain C. <ala...@ag...> - 2012-07-01 19:46:15
|
Hello, I have modified the way missing ids are generated by the XSLT stylesheet: instead of counting preceding nodes (and ancestors), the ancestors' position is passed as parameter to templates. This performance improvement should be useful for big forms and/or slow machines. When the form is embedded in a script element, the profiler now displays the duration of the XSLT transformation performed with Javascript instructions. Because almost every XSLT templates have be impacted, please consider this revision carefully (only in SF SVN repository currently)! Thank you for your feedbacks! -Alain |
From: Ihe O. <ihe...@go...> - 2012-07-01 17:54:14
|
I have generated an XForm from XQuery and it is stored on the database at db/apps/b2b/test.xhtml XSLTForms is on the file system in the usual place at /eXist/webapp/xforms/xsltforms. After painstakingly and carefully reading the URL Rewriting and MVC framework I tried placing the following controller.xql (irrelevant parts have been snipped) on the database; firstly in the db/apps collection and latterly the db/apps/b2b collection. if ($exist:resource eq 'test.xhtml') then <dispatch xmlns="http://exist.sourceforge.net/NS/exist"> <view> <forward servlet="XSLTServlet"> (: Apply xsltforms.xsl stylesheet :) <set-attribute name="xslt.stylesheet" value="{$exist:root}/xforms/xsltforms/xsltforms.xsl"/> <set-attribute name="xslt.output.omit-xml-declaration" value="yes"/> <set-attribute name="xslt.output.indent" value="no"/> <set-attribute name="xslt.output.media-type" value="text/html"/> <set-attribute name="xslt.output.method" value="xhtml"/> <set-attribute name="xslt.baseuri" value="xsltforms/"/> <set-attribute name="xslt.xsltforms_home" value="webapp/xforms/xsltforms/"/> </forward> </view> <cache-control cache="yes"/> </dispatch> else something else ....... Despite this the XForm is not being transformed. I don't know what some of the set-attribute options mean (e.g the last two). I'm wondering whether they also need to be prefixed with {$exist:root} but I think I could use some enlightenment on precisely what is wrong. This will not be my final configuration, I'm just trying to get the simplest thing that works. |
From: C. M. Sperberg-M. <cm...@bl...> - 2012-06-30 03:40:00
|
On Jun 26, 2012, at 7:38 PM, C. M. Sperberg-McQueen wrote: > > ... as far as I can tell, moving from Beta3 to 1.0RC has reduced load time > for some documents I am working with by 25 to 30%, and reduced time > for processing some parts of the documents by 15 or 20%, and changing > to subforms reduces the load time by another 25%. So the new version > of the form I'll be able to make available to my users is about twice as > fast, on long documents, as the current version. Concretely, for Beta 3 vs 1.0RC using subforms, the numbers for the four documents I have used for testing are: (Size, load time, time for some simple manipulations) 471297 bytes, 11407 vs 4111 ms, 6791 vs 3488 ms 173970 bytes, 5123 vs 2380 ms, 7537 vs 4317 ms 454914 bytes, 10181 vs 3161 ms, 1115 vs 2006 ms 324214 bytes, 9810 vs 3703 ms, 6869 vs 4219 ms I haven't yet found a good way of automating the timings, so these are based on going through the test script just once for each document. But they are enough to show that subforms are a huge improvement, and that 1.0RC is a big improvement by itself. Thank you, 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...> - 2012-06-30 02:36:29
|
On Jun 26, 2012, at 7:38 PM, C. M. Sperberg-McQueen wrote: > I've encountered an unexpected behavior in 1.0RC. I first encountered > it in one of my own forms, but the simplest way to recreate it may be: > > (1) Load the writers.xml example from the 1.0RC distribution, or from > > http://www.agencexml.com/xsltforms/writers.xml > > (2) Click Show Books and Hide Books a few times. > > (3) Click Profiler. > > This ought in normal operation to produce a profile showing the profiler > information we have all come to love. What it produces instead, at the > moment, is a Javascript error message saying > > XSLTForms Exception > -------------------------- > > Error dispatching event 'xforms-model-construct' : > > xforms-link-exception I think I have now identified the source of this error. Adding calls to Xsltforms_browser.debugConsole.write at various locations makes clear that the error is arising in the Xsltforms_globals.profiling_data() function, specifically in the loop for (var expr in XsltForms_xpath.expressions) { if (XsltForms_xpath.expressions.hasOwnProperty(expr)) { exprtab[exprtab.length] = {expr: expr, evaltime: XsltForms_xpath.expressions[expr].evaltime}; } } When I load writers.xml and click the Profiler button before having unloaded any author's booklist, then this loop executes eight times, for the expressions . != 'true' @firstname @lastname @selected @selected != 'true' @selected = 'true' choose(@selected != 'true', 'Show', 'Hide') writer These are the XPath expressions occurring in writers.xml. When I load the subform, by clicking Show Books, and then click Profiler, the loop executes eleven times: eight times for the XPath expressions shown above, and three more times for @title @year book These are the XPath expressions in books.xml, the subform. When I then unload the subform by clicking Hide Books, and click Profiler a third time, I get an error message in the Profiler window, and the debugging trace in the main-form window shows the loop being entered nine times; it looks a lot as if the error were being raised when the loop tries to evaluate XsltForms_xpath.expressions['@title'].evaltime. A little further examination suggests that after the subform is unloaded, XsltForms_xpath.expressions['@title'] is null, so the attempt to get its 'evaltime' property produces an error, which causes the load of the profiler to fail. Changing the conditional in lines 302-304 of xsltforms.js (in 1.0RC) to if (XsltForms_xpath.expressions.hasOwnProperty(expr) && XsltForms_xpath.expressions[expr]) { exprtab[exprtab.length] = {expr: expr, evaltime: XsltForms_xpath.expressions[expr].evaltime}; } seems to allow the Profiler to launch normally even after the subform is unloaded. Michael -- **************************************************************** * C. M. Sperberg-McQueen, Black Mesa Technologies LLC * http://www.blackmesatech.com * http://cmsmcq.com/mib * http://balisage.net **************************************************************** |
From: Stephen C. <ste...@gm...> - 2012-06-29 02:33:36
|
http://vertx.io |
From: C. M. Sperberg-M. <cm...@bl...> - 2012-06-27 17:25:20
|
[cc list trimmed] On Jun 27, 2012, at 7:51 AM, Alain Couthures wrote: > Hello, > > Please find below some explanations about how a subform mechanism is > currently supported in XSLTForms: Alain, thank you for this helpful description. > > In XSLTForms, a subform is a form which could be eventually loaded in a > stand-alone way. > > It contains a model part and a body part. Only HTML is currently > supported as host language, so the subform body is defined as the HTML > body inner content. If (as I think I understand) the right way to do subforms is still a matter for experimentation, then this is one place where I might suggest an alternative. I think it might be useful if the calling subform were able to specify one or more IDs of constructs in the subform and have those count as the subform body. So instead of <xforms:load if="@selected != 'true'" show="embed" targetid="subform" resource="books.xml"/> the call in writers.xml might read <xforms:load if="@selected != 'true'" show="embed" targetid="subform" resource="books.xml#bookdetails"/> And the books.xml subform would include (for example): <xf:repeat id="bookdetails" nodeset="book"> This would allow the subform to contain material like standard navigation bars and headers, for when it's loaded in a stand-alone way, without those navigation bars and headers cluttering up the main form (which presumably already has a header and navigation bar of its own, if that's the style used by the project in question. If the caller does not specify an ID, then taking the children of /html/body makes sense to me. > > When loaded from a main form, the model part of the subform is added to > the model part of the main form. Conflicting ids in models are merged by > XSLTForms: instances, submissions and bindings are added into the > corresponding model of the main form. Conflicting ids in instances, > submissions and bindings are supported by ignoring the conflicting > elements in the subform. So one way to make something in the subform NOT be included in the main form would be to give it an ID that conflicts with an ID in the main form? > > For management reasons, models and instances without an associated id > are assigned generated work ids. Currently, XSLTForms always generates > the same work id whether defined in the main form or in the subform. In > the future, this might be considered as an option to generate different > work ids for them. > > When loaded, the subform body replaces the inner content of the target > element. There is no implicit scoping change so the bindings in the > subform body now depend on the current context of the target element. > The author has to explicitly force the subform context with an extra > group control, for example. > > A subform can load subforms itself. > > When a subform is unloaded, all the elements added to the main form are > removed as if it had not been loaded at all. This makes me wonder if that is the source of the problem I ran into in writers.xml: if you're generating the same IDs for the profiler in both the main form and the subform, and if the unload process is accidentally unloading the profiler, because its ID was present in the subform, that would explain the problem. And indeed, the problem is not visible until the user clicks Hide Books at least once. Hmmm. 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...> - 2012-06-27 11:51:38
|
Hello, Please find below some explanations about how a subform mechanism is currently supported in XSLTForms: In XSLTForms, a subform is a form which could be eventually loaded in a stand-alone way. It contains a model part and a body part. Only HTML is currently supported as host language, so the subform body is defined as the HTML body inner content. When loaded from a main form, the model part of the subform is added to the model part of the main form. Conflicting ids in models are merged by XSLTForms: instances, submissions and bindings are added into the corresponding model of the main form. Conflicting ids in instances, submissions and bindings are supported by ignoring the conflicting elements in the subform. For management reasons, models and instances without an associated id are assigned generated work ids. Currently, XSLTForms always generates the same work id whether defined in the main form or in the subform. In the future, this might be considered as an option to generate different work ids for them. When loaded, the subform body replaces the inner content of the target element. There is no implicit scoping change so the bindings in the subform body now depend on the current context of the target element. The author has to explicitly force the subform context with an extra group control, for example. A subform can load subforms itself. When a subform is unloaded, all the elements added to the main form are removed as if it had not been loaded at all. Currently, the xforms-model-construct and xforms-model-construct-done are the only events which are dispatched. More events should be considered such as xforms-subform-load, xforms-subform-load-done, xforms-subform-unload and xforms-subform-unload-done. XSLTForms uses a unique XForms engine instance to manage subforms. No extra mechanism is required to allow communication between main form and subforms. Such a mechanism has been implemented in XSLTForms for load/@show="new": the new form can interact with the initial form using instance/@src and submissions with the resource starting with "opener://" followed by the instance id, the calling form been considered as a server for the new form. Regards, Alain Couthures agenceXML |
From: C. M. Sperberg-M. <cm...@bl...> - 2012-06-26 23:38:53
|
I've encountered an unexpected behavior in 1.0RC. I first encountered it in one of my own forms, but the simplest way to recreate it may be: (1) Load the writers.xml example from the 1.0RC distribution, or from http://www.agencexml.com/xsltforms/writers.xml (2) Click Show Books and Hide Books a few times. (3) Click Profiler. This ought in normal operation to produce a profile showing the profiler information we have all come to love. What it produces instead, at the moment, is a Javascript error message saying XSLTForms Exception -------------------------- Error dispatching event 'xforms-model-construct' : xforms-link-exception This makes it hard to put hard numbers on the results of using subforms, but as far as I can tell, moving from Beta3 to 1.0RC has reduced load time for some documents I am working with by 25 to 30%, and reduced time for processing some parts of the documents by 15 or 20%, and changing to subforms reduces the load time by another 25%. So the new version of the form I'll be able to make available to my users is about twice as fast, on long documents, as the current version. Well done, Alain!! -- **************************************************************** * C. M. Sperberg-McQueen, Black Mesa Technologies LLC * http://www.blackmesatech.com * http://cmsmcq.com/mib * http://balisage.net **************************************************************** |
From: Grégoire C. <gco...@gm...> - 2012-06-26 07:59:17
|
Hi Alain, Line 873 of the generated XML file is : new XsltForms_output(xsltforms_subform,xsltforms_subform.id + "-label-40",0,new XsltForms_binding(null, "instance('instance-langues')/chaine[@name='groupees-par-commune'][@xml:lang=/configuration/langue]"),null); which corresponds to the first label of this select1 : <xf:select1 appearance="minimal" ref="instance('instance-tri-des-annonces')//xsl:variable[@name = 'grouper']/@select"> <xf:item> <xf:label model="modele-configuration" ref="instance('instance-langues')/chaine[@name='groupees-par-commune'][@xml:lang=/configuration/langue]"/> <xf:value>'par-commune'</xf:value> </xf:item> <xf:item> <xf:label model="modele-configuration" ref="instance('instance-langues')/chaine[@name='dans-une-liste-globale'][@xml:lang=/configuration/langue]"/> <xf:value>'liste-globale'</xf:value> </xf:item> <xf:action ev:event="xforms-value-changed"> <xf:dispatch name="action-monter-drapeau-et-appeler-trier-annonces" targetid="modele-annonces"/> </xf:action> </xf:select1> Do you see something wrong with this select1? Thanks! Grégoire Le 25/06/2012 21:49, Alain Couthures a écrit : > Hi Grégoire, > > Both <xf:label><xf:output ref="something"/></xf:label> and <xf:label > ref="something"/> should now work rendering the same content. > > -Alain > > Le 25/06/2012 21:42, Grégoire COLBERT a écrit : >> Hi Alain, >> >> Thanks for the answer but I haven't checked the list for at least 6 >> months, can you tell me what has changed in the way label/@ref are >> processed? >> >> I have lots of <xf:label><xf:output ref="something"/></xf:label> in my >> form, should I change them to <xf:label ref="something"/>? >> >> Thanks! >> Grégoire >> >> Le 25/06/2012 20:32, Alain Couthures a écrit : >>> Hi Grégoire, >>> >>> This is a very poor trace but I can read that it concerns a label and an >>> output which might sound as how label/@ref is now implemented. >>> >>> Could you please check this? >>> >>> Could you give me a minimal test case? >>> >>> Thanks! >>> >>> -Alain >>> >>> Le 25/06/2012 12:12, Grégoire COLBERT a écrit : >>>> Hi Alain, >>>> >>>> I updated from revision 535 to revision 546 and I now get the following >>>> error on loading my form : >>>> >>>> XSLTForms Exception >>>> -------------------------- >>>> >>>> Error initializing : >>>> >>>> ([object >>>> Object],"xsltforms-mainform-label-40")@http://localhost:8080/xsltforms/trunk/build/xsltforms.js:5060 >>>> >>>> >>>> XsltForms_output([object >>>> Object],"xsltforms-mainform-label-40",0,[object >>>> Object],null)@http://localhost:8080/xsltforms/trunk/build/xsltforms.js:6108 >>>> >>>> >>>> xsltforms_initImpl()@http://localhost:8080/:872 >>>> xsltforms_init()@http://localhost:8080/:1070 >>>> onload([object Event])@http://localhost:8080/:1 >>>> >>>> >>>> TypeError >>>> >>>> this.element is null >>>> >>>> --------------------------- >>>> >>>> Any idea of the problem? >>>> >>>> Thanks! >>>> Grégoire >>>> >>>> ------------------------------------------------------------------------------ >>>> >>>> >>>> Live Security Virtual Conference >>>> Exclusive live event will cover all the ways today's security and >>>> threat landscape has changed and how IT managers can respond. >>>> Discussions >>>> will include endpoint security, mobile security and the latest in >>>> malware >>>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>>> _______________________________________________ >>>> Xsltforms-support mailing list >>>> Xsl...@li... >>>> https://lists.sourceforge.net/lists/listinfo/xsltforms-support >>>> >>> >> >> >> ------------------------------------------------------------------------------ >> >> Live Security Virtual Conference >> Exclusive live event will cover all the ways today's security and >> threat landscape has changed and how IT managers can respond. Discussions >> will include endpoint security, mobile security and the latest in malware >> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >> _______________________________________________ >> Xsltforms-support mailing list >> Xsl...@li... >> https://lists.sourceforge.net/lists/listinfo/xsltforms-support >> > > |
From: Alain C. <ala...@ag...> - 2012-06-25 19:49:18
|
Hi Grégoire, Both <xf:label><xf:output ref="something"/></xf:label> and <xf:label ref="something"/> should now work rendering the same content. -Alain Le 25/06/2012 21:42, Grégoire COLBERT a écrit : > Hi Alain, > > Thanks for the answer but I haven't checked the list for at least 6 > months, can you tell me what has changed in the way label/@ref are > processed? > > I have lots of <xf:label><xf:output ref="something"/></xf:label> in my > form, should I change them to <xf:label ref="something"/>? > > Thanks! > Grégoire > > Le 25/06/2012 20:32, Alain Couthures a écrit : >> Hi Grégoire, >> >> This is a very poor trace but I can read that it concerns a label and an >> output which might sound as how label/@ref is now implemented. >> >> Could you please check this? >> >> Could you give me a minimal test case? >> >> Thanks! >> >> -Alain >> >> Le 25/06/2012 12:12, Grégoire COLBERT a écrit : >>> Hi Alain, >>> >>> I updated from revision 535 to revision 546 and I now get the following >>> error on loading my form : >>> >>> XSLTForms Exception >>> -------------------------- >>> >>> Error initializing : >>> >>> ([object >>> Object],"xsltforms-mainform-label-40")@http://localhost:8080/xsltforms/trunk/build/xsltforms.js:5060 >>> >>> XsltForms_output([object Object],"xsltforms-mainform-label-40",0,[object >>> Object],null)@http://localhost:8080/xsltforms/trunk/build/xsltforms.js:6108 >>> >>> xsltforms_initImpl()@http://localhost:8080/:872 >>> xsltforms_init()@http://localhost:8080/:1070 >>> onload([object Event])@http://localhost:8080/:1 >>> >>> >>> TypeError >>> >>> this.element is null >>> >>> --------------------------- >>> >>> Any idea of the problem? >>> >>> Thanks! >>> Grégoire >>> >>> ------------------------------------------------------------------------------ >>> >>> Live Security Virtual Conference >>> Exclusive live event will cover all the ways today's security and >>> threat landscape has changed and how IT managers can respond. Discussions >>> will include endpoint security, mobile security and the latest in malware >>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>> _______________________________________________ >>> Xsltforms-support mailing list >>> Xsl...@li... >>> https://lists.sourceforge.net/lists/listinfo/xsltforms-support >>> >> > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Xsltforms-support mailing list > Xsl...@li... > https://lists.sourceforge.net/lists/listinfo/xsltforms-support > |
From: Grégoire C. <gco...@gm...> - 2012-06-25 19:42:59
|
Hi Alain, Thanks for the answer but I haven't checked the list for at least 6 months, can you tell me what has changed in the way label/@ref are processed? I have lots of <xf:label><xf:output ref="something"/></xf:label> in my form, should I change them to <xf:label ref="something"/>? Thanks! Grégoire Le 25/06/2012 20:32, Alain Couthures a écrit : > Hi Grégoire, > > This is a very poor trace but I can read that it concerns a label and an > output which might sound as how label/@ref is now implemented. > > Could you please check this? > > Could you give me a minimal test case? > > Thanks! > > -Alain > > Le 25/06/2012 12:12, Grégoire COLBERT a écrit : >> Hi Alain, >> >> I updated from revision 535 to revision 546 and I now get the following >> error on loading my form : >> >> XSLTForms Exception >> -------------------------- >> >> Error initializing : >> >> ([object >> Object],"xsltforms-mainform-label-40")@http://localhost:8080/xsltforms/trunk/build/xsltforms.js:5060 >> >> XsltForms_output([object Object],"xsltforms-mainform-label-40",0,[object >> Object],null)@http://localhost:8080/xsltforms/trunk/build/xsltforms.js:6108 >> >> xsltforms_initImpl()@http://localhost:8080/:872 >> xsltforms_init()@http://localhost:8080/:1070 >> onload([object Event])@http://localhost:8080/:1 >> >> >> TypeError >> >> this.element is null >> >> --------------------------- >> >> Any idea of the problem? >> >> Thanks! >> Grégoire >> >> ------------------------------------------------------------------------------ >> >> Live Security Virtual Conference >> Exclusive live event will cover all the ways today's security and >> threat landscape has changed and how IT managers can respond. Discussions >> will include endpoint security, mobile security and the latest in malware >> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >> _______________________________________________ >> Xsltforms-support mailing list >> Xsl...@li... >> https://lists.sourceforge.net/lists/listinfo/xsltforms-support >> > > |