xsltforms-support Mailing List for XSLTForms (Page 87)
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: Dhiradj B. <dh...@gm...> - 2010-05-11 07:47:01
|
Hi all, I'm trying to insert a new row in a repeated table with the following code: <xf:trigger> <xf:label>Add row</xf:label> <xf:action ev:event="DOMActivate"> <xf:insert at="index('repeat-opgaven')" position="after" nodeset="instance('inlinewerken')/data/tabbladOpgaven/sve/oge/detail[1]/ojt"/> </xf:action> </xf:trigger> This results in a copy of an existing row, which is added to the end of the table. How can I add a new, empty row to the table? Thanks! Regards, Dhiradj Badloe |
From: Klotz, L. <Lei...@xe...> - 2010-05-10 15:20:29
|
I wonder if it might be reasonable to use XML events instead of these names? ________________________________ From: Claudius Teodorescu [mailto:cla...@ya...] Sent: Monday, May 10, 2010 2:55 AM To: support xsltforms Subject: [Xsltforms-support] Config.xsl Hi, As you kindly support afterInit, etc. in xsltforms.xsl, the extensions element from config.xsl should consequently be as follows: <extensions> <!-- HTML elements to be added just after xsltforms.js and xsltforms.css loading --> <beforeInit/> <onBeginInit/> <onEndInit/> <afterInit/> </extensions> Thank you, and good luck! Claudius Teodorescu http://kuberam.ro |
From: Claudius T. <cla...@ya...> - 2010-05-10 09:55:07
|
Hi, As you kindly support afterInit, etc. in xsltforms.xsl, the extensions element from config.xsl should consequently be as follows: <extensions> <!-- HTML elements to be added just after xsltforms.js and xsltforms.css loading --> <beforeInit/> <onBeginInit/> <onEndInit/> <afterInit/> </extensions> Thank you, and good luck! Claudius Teodorescu http://kuberam.ro |
From: Evgeny G. <gaz...@gm...> - 2010-05-04 09:28:20
|
I'm fix this bug, see xsltforms.js, line 6888. I'm rewrite so: 6884 loadNS : function(node, map) { 6885 var ns = node.namespaceURI; 6886 6887 if (ns != null && typeof map[ns] == "undefined" && ns != "http://www.w3.org/XML/1998/namespace") { 6888 if (ns != "") { 6889 map[ns] = "pre" + map.length; 6890 } 6891 6892 map.length++; 6893 } 6894 ................................ And I see one more potentional bug if in model will be nodes with namespace uri equaled to "length" See line 6842: 6827 var Writer = { 6828 toString : function(node, map, init) { 6829 var st = ""; 6830 6831 if (!map) { 6832 map = {length : 0}; 6833 this.loadNS(node, map); 6834 } 6835 switch(node.nodeType) { 6836 case NodeType.ELEMENT : 6837 var name = this.name(node, map); 6838 st += "<" + name; 6839 6840 if (!init) { 6841 for (var i in map) { 6842 if (i == "length") { continue; } 6843 6844 ------- Evgeny |
From: Dan M. <dan...@gm...> - 2010-05-03 11:24:28
|
Interesting! I was not aware of this project. I will take a look at the source. It is interesting that you chose WSDL instead of XML Schemas as the basis of the model. These types of transforms are critical for XRX web apps to be more model-driven, so it is good to see these efforts. - Dan -- Dan McCreary Semantic Solutions Architect office: (952) 931-9198 cell: (612) 986-1442 |
From: Tambet M. <tam...@gm...> - 2010-05-03 07:57:16
|
Hi Dan! You can also take a look at WSDL2XForms project, see http://sourceforge.net/projects/wsdl2xforms/. It includes schema2xforms as well. It is implemented in XSLT 2.0. Original development was done for Chiba, but there are very few Chiba specifics. Regards, Tambet Dan McCreary wrote: >> There are already different people generating XForms model from XML schema for the same purpose. >> > > More than just the model! I have taught classes on how to transform > XML Schemas into the entire XForms file! > > The code is on Google Code here: > > http://code.google.com/p/xrx/source/browse/#svn/trunk/14-xml-schema-to-xforms > > Some of the class notes are here: > > http://www.danmccreary.com/presentations > > Most of these were designed to transform NIEM schemas but the concepts > should work fine on other schemas also. > > If I get some extra time I hope to port these to use XQuery typeswich > transforms. They seem to be a lot easier to maintain. > > - Dan > > |
From: Evgeny G. <gaz...@gm...> - 2010-05-01 14:58:25
|
> <security:login xmlns:security="http://schematronic.ru/api/security"> > <user xmlns="">guest</user> > <password xmlns="">guest</password> > </security:login> > > Would it be correct for you? Yes, and result is same. ---------- Evgeny |
From: COUTHURES A. <ala...@ag...> - 2010-05-01 14:54:45
|
Hi Evgeny, > the instance content: > <security:login xmlns:security="http://schematronic.ru/api/security"> > <user>guest</user> > <password>guest</password> > </security:login> > is posted as > <security:login xmlns:security="http://schematronic.ru/api/security" > xmlns:pre1=""> > <user>guest</user> > <password>guest</password> > </security:login> > This is not valid XML! > Thank you for pointing at this problem. I'm currently fixing problems and bugs in serialization. As Leigh Klotz mentioned, prefixes have to be preserved for attribute values concerns. This is a very tricky part indeed... In your instance content, the default namespace has to be considered for children so I would like the serialization to produce this: <security:login xmlns:security="http://schematronic.ru/api/security"> <user xmlns="">guest</user> <password xmlns="">guest</password> </security:login> Would it be correct for you? Thanks! -Alain |
From: Evgeny G. <gaz...@gm...> - 2010-05-01 14:45:49
|
hi! the instance content: <security:login xmlns:security="http://schematronic.ru/api/security"> <user>guest</user> <password>guest</password> </security:login> is posted as <security:login xmlns:security="http://schematronic.ru/api/security" xmlns:pre1=""> <user>guest</user> <password>guest</password> </security:login> This is not valid XML! ------ Evgeny |
From: Klotz, L. <Lei...@xe...> - 2010-04-30 20:24:32
|
It would be better to load the instance on xforms-model-construct-done than xforms-ready because xforms-ready tells the UI to refresh so you'll get two refreshes. Leigh. ________________________________ From: COUTHURES Alain [mailto:ala...@ag...] Sent: Tuesday, April 20, 2010 12:50 PM To: Dhiradj Badloe Cc: xsl...@li... Subject: Re: [Xsltforms-support] Dynamic loading of instance into a model Hello Dhiradj, I have a question about the dynamic loading of an instance into a model. Here's in example of my code: <xf:model id="InlineWerken"> <xf:instance id="inlinewerken" src="vte_406207_d.xml" /> </xf:model> The xml file is read from a local folder. This name of the XML file will be different every time.(based on exports from another application). I'm looking for a solution how to dynamically load the instance in the model. You can use a submission to be activated automatically after form load. This has to be associated with "xforms-ready" directly into the model declaration. Sorry, I can't find a working example about that but I have already used this workaround... Thanks! -Alain |
From: Klotz, L. <Lei...@xe...> - 2010-04-29 23:54:08
|
Oops on the XHTML-specified value; I see now it's done in the JS and not the XSLT. I tried this in FF3.5. Note "readOnly" instead of "readonly". XFInput.prototype.changeReadonly = function() { if (this.input) { - this.input.disabled = this.readonly; + this.input.readOnly = this.readonly; if (this.calendarButton) { this.calendarButton.style.display = this.readonly? "none" : ""; } } }; XFSelect.prototype.changeReadonly = function() { if (this.full) { var list = Core.isXhtml ? this.element.getElementsByTagNameNS("http://www.w3.org/1999/xhtml", "input") : this.element.getElementsByTagName("input"); for (var i = 0, len = list.length; i < len; i++) { - list[i].disabled = this.readonly; + list[i].readOnly = this.readonly; } } else { if (!Dialog.knownSelect(this.select)) { - this.select.disabled = this.readonly; + this.select.readOnly = this.readonly; } } }; Leigh. -----Original Message----- From: Klotz, Leigh [mailto:Lei...@xe...] Sent: Thursday, April 29, 2010 4:20 PM To: support xsltforms Subject: [Xsltforms-support] bind/@readonly turns into HTML4 @disabled=""instead of @readonly="readonly" If you do bind textarea to a readonly input field, it transforms into <... disabled="">... You cannot then select and copy the text. I believe it should use readonly instead of disabled, and also use the XHTML-specified value for the attribute: ...readonly="readonly">... <?xml version="1.0"?> <?xml-stylesheet href="//xsltforms/xsltforms.xsl" type="text/xsl"?> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xf="http://www.w3.org/2002/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <head> <model xmlns="http://www.w3.org/2002/xforms"> <instance> <data xmlns=""> <test1>abc def</test1> <test2>abc def</test2> </data> </instance> <bind nodeset="test1" readonly="true()" /> <bind nodeset="test2" relevant="false()" /> </model> </head> <body> <h1>Test</h1> <group xmlns="http://www.w3.org/2002/xforms"> <textarea ref="test1"> <label>Readonly Test</label> </textarea> <textarea ref="test2"> <label>Relevant Test</label> </textarea> </group> </body> </html> ------------------------------------------------------------------------------ _______________________________________________ Xsltforms-support mailing list Xsl...@li... https://lists.sourceforge.net/lists/listinfo/xsltforms-support |
From: Klotz, L. <Lei...@xe...> - 2010-04-29 23:19:58
|
If you do bind textarea to a readonly input field, it transforms into <... disabled="">... You cannot then select and copy the text. I believe it should use readonly instead of disabled, and also use the XHTML-specified value for the attribute: ...readonly="readonly">... <?xml version="1.0"?> <?xml-stylesheet href="//xsltforms/xsltforms.xsl" type="text/xsl"?> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xf="http://www.w3.org/2002/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <head> <model xmlns="http://www.w3.org/2002/xforms"> <instance> <data xmlns=""> <test1>abc def</test1> <test2>abc def</test2> </data> </instance> <bind nodeset="test1" readonly="true()" /> <bind nodeset="test2" relevant="false()" /> </model> </head> <body> <h1>Test</h1> <group xmlns="http://www.w3.org/2002/xforms"> <textarea ref="test1"> <label>Readonly Test</label> </textarea> <textarea ref="test2"> <label>Relevant Test</label> </textarea> </group> </body> </html> |
From: Kostis A. <ank...@gm...> - 2010-04-29 18:55:55
|
Hi Javier, Maybe you are interested in tringy the patch i had submitted a while ago that detected bad or empty bind-IDs, that i'm now rebumitting against latest rev397: http://pastebin.com/KimUUsXV I think it does not(!) cover your error, but it is a start, and for me it has been a very helpful enhancement, particularly when working with large xforms. You can see the patch in action using the attached test-case xform: testBindingsErrors.xml Regards, Kostis Anagnostopoulos On Thu, Apr 29, 2010 at 3:22 PM, Javier Díaz <jd...@ge...> wrote: > > COUTHURES Alain escribió: > > Hello Javier, > > We tested the form with Firefox 3 and IExplorer 8 and all seemed to work ok. > > But when using IExplorer 7, the following error appeared: > > > > And after that, another alert saying " 'length' is null or not an object". > > We solved this error changing the name of instance from ppai to ppai0, it seems IE7 it is not case sensitive. > > Thank you for pointing at this compatibility problem. > > It is true that there is almost no syntax check in XSLTForms. This was done at compile-time in AJAXForms with a Java program. But XSLTForms is much more concerned by performance so this should be added as an option. > > This is not very problematic to us, but I think it should be interesting that all browsers would work in the same way with the same data, working ok or failing in all of then to avoid making all tests in all browser versions. > > I know testing can required much time when not automatically performed... > > I'm not sure it would be a good idea to convert every id to lowercase, for example, and it should be performed at runtime in many different Javascript instructions anyway. > > It could be possible to convert every id into a string of ASCII/Unicode codes in Hex notation for maximal compatibility but is it really necessary??? > > I agree with you that it is not very interesting checking or converting ids at runtime, because performance is a very important issue in xsltforms. > But it may be very useful that this and other checks should be activated when running in debug mode to make easier debugging xsltforms. All colleages that are using xsltforms are impressed and very happy with it, but they say that sometimes is very difficult to find some errors in code, because the errors generated are not very clear. For example, in the error we sent you, we knew that there was an error in "instance('ppai')/vct", but it took us some time to realize that the problem was a name collision with other element due to the case issue in IE7. > > Best Regads, > Javier > > Thanks! > > -Alain > > ------------------------------------------------------------------------------ > > _______________________________________________ > Xsltforms-support mailing list > Xsl...@li... > https://lists.sourceforge.net/lists/listinfo/xsltforms-support > |
From: Javier D. <jd...@ge...> - 2010-04-29 15:22:39
|
COUTHURES Alain escribió: > Hello Javier, >> >> We tested the form with Firefox 3 and IExplorer 8 and all seemed to >> work ok. >> >> But when using IExplorer 7, the following error appeared: >> >> >> >> And after that, another alert saying " 'length' is null or not an >> object". >> >> We solved this error changing the name of instance from ppai to >> ppai0, it seems IE7 it is not case sensitive. > Thank you for pointing at this compatibility problem. > > It is true that there is almost no syntax check in XSLTForms. This was > done at compile-time in AJAXForms with a Java program. But XSLTForms > is much more concerned by performance so this should be added as an > option. >> This is not very problematic to us, but I think it should be >> interesting that all browsers would work in the same way with the >> same data, working ok or failing in all of then to avoid making all >> tests in all browser versions. > I know testing can required much time when not automatically performed... > > I'm not sure it would be a good idea to convert every id to lowercase, > for example, and it should be performed at runtime in many different > Javascript instructions anyway. > > It could be possible to convert every id into a string of > ASCII/Unicode codes in Hex notation for maximal compatibility but is > it really necessary??? I agree with you that it is not very interesting checking or converting ids at runtime, because performance is a very important issue in xsltforms. But it may be very useful that this and other checks should be activated when running in debug mode to make easier debugging xsltforms. All colleages that are using xsltforms are impressed and very happy with it, but they say that sometimes is very difficult to find some errors in code, because the errors generated are not very clear. For example, in the error we sent you, we knew that there was an error in "instance('ppai')/vct", but it took us some time to realize that the problem was a name collision with other element due to the case issue in IE7. Best Regads, Javier > > Thanks! > > -Alain |
From: COUTHURES A. <ala...@ag...> - 2010-04-29 14:24:06
|
Hello Javier, > > We tested the form with Firefox 3 and IExplorer 8 and all seemed to > work ok. > > But when using IExplorer 7, the following error appeared: > > > > And after that, another alert saying " 'length' is null or not an object". > > We solved this error changing the name of instance from ppai to ppai0, > it seems IE7 it is not case sensitive. Thank you for pointing at this compatibility problem. It is true that there is almost no syntax check in XSLTForms. This was done at compile-time in AJAXForms with a Java program. But XSLTForms is much more concerned by performance so this should be added as an option. > This is not very problematic to us, but I think it should be > interesting that all browsers would work in the same way with the same > data, working ok or failing in all of then to avoid making all tests > in all browser versions. I know testing can required much time when not automatically performed... I'm not sure it would be a good idea to convert every id to lowercase, for example, and it should be performed at runtime in many different Javascript instructions anyway. It could be possible to convert every id into a string of ASCII/Unicode codes in Hex notation for maximal compatibility but is it really necessary??? Thanks! -Alain |
From: Javier D. <jd...@ge...> - 2010-04-29 09:53:44
|
Hello, we have a complex xform with several auxiliary instances, one of them is: <xf:instance *id="ppai"*> <data> </data> </xf:instance> And then, in the form we have in the main instance the following repeat: <xf:repeat model="orden" *id="pPAI"* nodeset="pPAI_IP" appearance="full" startindex="1"> We tested the form with Firefox 3 and IExplorer 8 and all seemed to work ok. But when using IExplorer 7, the following error appeared: And after that, another alert saying " 'length' is null or not an object". We solved this error changing the name of instance from ppai to ppai0, it seems IE7 it is not case sensitive. This is not very problematic to us, but I think it should be interesting that all browsers would work in the same way with the same data, working ok or failing in all of then to avoid making all tests in all browser versions. Best Regards, Javier |
From: Klotz, L. <Lei...@xe...> - 2010-04-28 21:58:16
|
If I have an instance which obtains the following by submission GET: <?xml version="1.0" encoding="UTF-8"?> <test xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <class xsi:type="xsd:string" /> <workaround> <xsd:string /> </workaround> </test> And I post it back, it comes out like this, and loses the qname namespace prefix. <test xmlns="" xmlns:pre2="http://www.w3.org/2001/XMLSchema-instance" xmlns:pre3="http://www.w3.org/2001/XMLSchema"> <class pre2:type="xsd:string"></class> <workaround> <pre3:string></pre3:string> </workaround> </test> Note that I put in the workaround <xsd:string /> both in the instance and in the XForms+XHTML host document. XForms is supposed to serialize all the prefixes used in the host document and the instance, because it doesn’t know if any are used in QNames in attribute or element text content. submission/@includenamespaceprefixes is there to allow the form author to override this behavior and to serialize all "visibly-used" prefixes (i.e., on element or attribute names) plus the ones listed in @includenamespaceprefixes, and have the processor ignore the host- and instance- declared prefixes that aren't visibly used. Without @includenamespaceprefixes, I should be getting all the namespace prefixes. Leigh. |
From: Grégoire C. <gco...@gm...> - 2010-04-26 08:58:14
|
Hi, The revision 397 still has broken CSS. Is there an explanation as to why we apply templates to "head/link", instead of copying this element as in revision 384? I don't understand the idea behind this. Can you explain? Regards, Grégoire Grégoire COLBERT a écrit : > Hi, > > Since revision 385 (and at least up to revision 396), my own CSS is > simply "forgotten". I mean, I have the following tag in my "index.xml" file: > > <link rel="stylesheet" type="text/css" href="style/screen.css"></link> > > But in the generated code, there's no trace of this "screen.css" file. > This must be related to the change in revision 385. From: > > <xsl:copy-of select="xhtml:head/xhtml:*[local-name() != 'script'] | > xhtml:head/comment() | head/title | head/meta | head/style | head/link | > head/comment()"/> > > to: > > <xsl:copy-of select="xhtml:head/xhtml:*[local-name() != 'script' and > local-name() != 'style' and local-name() != 'link'] | > xhtml:head/comment() | head/title | head/meta | head/comment()"/> > <xsl:apply-templates select="xhtml:head/xhtml:style | > xhtml:head/xhtml:link | head/style | head/link"/> > > I don't understand why, but the latter version seems to be broken. > > Thanks, > Grégoire > > PS : Alain, did you had enough time to look at my email sent on 15th > april 21:17? This XPath problem is weird. > > > |
From: Kostis A. <ank...@gm...> - 2010-04-22 18:59:09
|
Hi, i fixed this bug. So now <xf:reset> works as by the xforms specs, and restores instance-documents to their original contents on.submissions with: replace="instance" The following patch against rev397 modifies just 3-lines : http://pastebin.com/vWM6w1sN You can use the test-xform i had submitted on this thread to check the patch indeed fixed the bug. PATCH DESCRIPTION ------------------ I added a 'isPreserveOld' argument to XFInstance.setDoc() that when it is 'true it skips XFinstrance.store() altogether. This new argument is 'true' only when invoking from submissions with: replace="instance" Regards, Kostis On Tue, Mar 30, 2010 at 5:40 PM, Kostis Anagnostopoulos <ank...@gm...> wrote: > Hi, > > Reseting a model does not restore a modified-by-submission xf:itemsets. > Reset indeed works when itemset was modified by an xf:delete > (xf:insert??) action. > > Reported against rev372, Chrome, Firefox. > > > The following files demonstrate the problem. > > XForms file > ---------------- > <?xml version="1.0" encoding="UTF-8"?> > <?xml-stylesheet href="xsltforms/xsltforms.xsl" encoding="UTF-8" > type="text/xsl"?> > <html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml" > xmlns:xf="http://www.w3.org/2002/xforms" > xmlns:ev="http://www.w3.org/2001/xml-events" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation=" > http://www.w3.org/2002/xforms > http://www.w3.org/MarkUp/Forms/2007/XForms-11-Schema.xsd > http://www.w3.org/2001/xml-events > http://www.w3.org/MarkUp/SCHEMA/xml-events-attribs-1.xsd > "> > <head> > <title>Restore xf:itemsets on xf:reset</title> > <xf:model id="model-main" > > <xf:instance id="inst-main"> > <main> > <data >1</data> > </main> > </xf:instance> > <xf:instance id="inst-items" > > <items> > <item>1</item> > <item>2</item> > <item>3</item> > </items> > </xf:instance> > > <xf:bind id="bind-data" nodeset="/main/data" /> > > <xf:submission id="sub-fetch-items" resource="items.xml" method="GET" > replace="instance" instance="inst-items" > > > </xf:submission> > </xf:model> > </head> > > <body> > <p>Data: <xf:output ref="/main/data"/> </p> > <p>xf:itemset's bound-document contents: > <xf:repeat nodeset="instance('inst-items')/item"> > <xf:output ref="."/> > </xf:repeat> > </p> > Select1(minimal): <xf:select1 ref="/main/data"> > <xf:itemset nodeset="instance('inst-items')/item"> > <xf:label ref="." /> > <xf:value ref="." /> > </xf:itemset> > </xf:select1> > Select1(full): <xf:select1 ref="/main/data" appearance="full"> > <xf:itemset nodeset="instance('inst-items')/item"> > <xf:label ref="." /> > <xf:value ref="." /> > </xf:itemset> > </xf:select1> > > Select(minimal): <xf:select ref="/main/data"> > <xf:itemset nodeset="instance('inst-items')/item"> > <xf:label ref="." /> > <xf:value ref="." /> > </xf:itemset> > </xf:select> > > <xf:trigger> > <xf:label>Load items from file</xf:label> > <xf:action ev:event="DOMActivate" > > <xf:send submission="sub-fetch-items"/> > </xf:action> > </xf:trigger> > <xf:trigger> > <xf:label>Delete bound xf:itemset nodes</xf:label> > <xf:action ev:event="DOMActivate" > > <xf:delete nodeset="instance('inst-items')/*"/> > </xf:action> > </xf:trigger> > > <xf:trigger> > <xf:label>Reset restores only xf:delete effects</xf:label> > <xf:action ev:event="DOMActivate" > > <xf:reset/> > </xf:action> > </xf:trigger> > > </body> > </html> > > Items file > ------------- > <items> > <item>3</item> > </items> > |
From: Kostis A. <ank...@gm...> - 2010-04-22 18:49:14
|
Hi, ok, i cheked it against rev397 and it is now fixed, pick-lists with <xf:itemsets> get indeed updated from files correctly. Thanks, Kostis On Wed, Apr 21, 2010 at 1:26 PM, Kostis Anagnostopoulos <ank...@gm...> wrote: > I apologize, > with the sible-line patch i submited, the modification: > this.readonly = undefined; > causes the infinite-recursion on IE indeed to reappear. > > I thought that Alain's fix was refering to another infinite-recursion > i had posted a week ago, > https://sourceforge.net/mailarchive/forum.php?thread_name=4BC...@ag...&forum_name=xsltforms-support > > So my patch is bad, > and the very-annoying problem of <xf:select1> not updating their > itemsets after submissions remains to be solved. > > Regards, > Kostis. > > > On Tue, Apr 20, 2010 at 4:33 PM, Kostis Anagnostopoulos > <ank...@gm...> wrote: >> Hi, >> >> The single-line commit on rev388("Missing property causing infinite >> loop") of defining the XFNode.readonly property on node-initialization >> broke <xf:select> controls, and their itemsets do not get updated when >> their underlying nodeset change. >> I have not cheked whether more problems exist with this modification. >> Reported against Chrome (assuming it applies to all browsers though) >> >> >> The example-form below demonstrate the problem: >> http://pastebin.com/BsdsxDhh >> (copied from an older still-unsolved problem on itemsets, ignore the >> text descriptions) >> >> >> >> I cannot explain why this happen, but i found that if on XFNode initialization, >> the XFNode.readonly property is set to 'undefined' instead of 'false', >> then the problem dissappears, and the infinite recurssion issue remains fixed. >> (i performed no other tests >> >> The patch below performs the suggested modification: >> (and fixes tabstops and spaces) >> >> Index: src/js/xpathexpr/DOM/XNode.js.xml >> =================================================================== >> --- src/js/xpathexpr/DOM/XNode.js.xml (revision 396) >> +++ src/js/xpathexpr/DOM/XNode.js.xml (working copy) >> @@ -313,7 +313,7 @@ >> this.valid = true; >> this.required = false; >> this.relevant = true; >> - this.readonly = false; >> + this.readonly = undefined; >> this.type = Schema.getType("xsd_:string"); >> this.schemaType = false; >> this.bind = null; >> >> >> Regards, >> Kostis >> > |
From: Dan M. <dan...@gm...> - 2010-04-21 13:58:07
|
> Is it possible to load parts of one large XML file? If you run on eXist this is pretty easy. You would create a RESTful service and pass it a URL parameter with the element name of the subsection of the large file. Around four lines of XQuery. You put that URL in the action of the submission element. On non-eXist systems you would have to first write a RESTful server-side script that knows how to parse the XML file and then returns the subsection you wanted. You can do this using Saxon XQuery library and Java but it might be less work in the long run to use eXist as a back end. Just a suggestion. - Dan On Wed, Apr 21, 2010 at 3:13 AM, Dhiradj Badloe <dh...@gm...> wrote: > Hello Dan, > > Thanks for your reply. Right now i'm not using eXist or XQuery. I load the > instance from the local file system. I've succeeded in dynamically loading > an instance into a model with the example of Kostis Anagnostopoulos. > > I'm surely interested in 'Incremental Model Loading'. I have looked at the > example that you have mentioned. In this example 3 separate XML-files are > used. Is it possible to load parts of one large XML file? > > Thanks. > > Regards, > Dhiradj Badloe > > > > > On Wed, Apr 21, 2010 at 3:13 AM, Dan McCreary <dan...@gm...>wrote: > >> Hello, >> >> Are you using eXist or a similar XQuery server to generate your forms? >> >> I am not sure how to list the files from a static file system but if you >> are using eXist to dynamically create the form this is easy. You just get >> all the file resources with xmldb:get-child-resources($collection) and then >> create the form from the resource name you want. >> >> So the like would look like this: >> >> <xf:instance id="inlinewerken" src="{$file-name}" /> >> >> If you are interesting in "incremental model loading" where you only load >> the parts of a large model when you need it I have an example here: >> >> http://en.wikibooks.org/wiki/XForms/Incremental_Model_Loading >> >> I created forms with over 250 elements and had to put each portion on a >> separate tab. Each tab incrementally loaded part of the model. It made a >> big different in load times. >> >> I hope that helps! - Dan >> >> On Mon, Apr 19, 2010 at 3:38 AM, Dhiradj Badloe <dh...@gm...>wrote: >> >>> Hello, >>> >>> I have a question about the dynamic loading of an instance into a model. >>> Here's in example of my code: >>> <xf:model id="InlineWerken"> >>> <xf:instance id="inlinewerken" src="vte_406207_d.xml" /> >>> </xf:model> >>> The xml file is read from a local folder. This name of the XML file will >>> be different every time.(based on exports from another application). I'm >>> looking for a solution how to dynamically load the instance in the model. >>> Can someone help or advise me on this? Thanks! >>> >>> Regard, >>> >>> Dhiradj >>> >>> >>> ------------------------------------------------------------------------------ >>> Download Intel® Parallel Studio Eval >>> Try the new software tools for yourself. Speed compiling, find bugs >>> proactively, and fine-tune applications for parallel performance. >>> See why Intel Parallel Studio got high marks during beta. >>> http://p.sf.net/sfu/intel-sw-dev >>> _______________________________________________ >>> Xsltforms-support mailing list >>> Xsl...@li... >>> https://lists.sourceforge.net/lists/listinfo/xsltforms-support >>> >>> >> >> >> -- >> Dan McCreary >> Semantic Solutions Architect >> syntactica.com >> 952-460-1674 >> VOIP: 111@69.199.167.229 >> > > -- Dan McCreary Semantic Solutions Architect syntactica.com 952-460-1674 VOIP: 111@69.199.167.229 |
From: Kostis A. <ank...@gm...> - 2010-04-21 10:27:04
|
I apologize, with the sible-line patch i submited, the modification: this.readonly = undefined; causes the infinite-recursion on IE indeed to reappear. I thought that Alain's fix was refering to another infinite-recursion i had posted a week ago, https://sourceforge.net/mailarchive/forum.php?thread_name=4BC...@ag...&forum_name=xsltforms-support So my patch is bad, and the very-annoying problem of <xf:select1> not updating their itemsets after submissions remains to be solved. Regards, Kostis. On Tue, Apr 20, 2010 at 4:33 PM, Kostis Anagnostopoulos <ank...@gm...> wrote: > Hi, > > The single-line commit on rev388("Missing property causing infinite > loop") of defining the XFNode.readonly property on node-initialization > broke <xf:select> controls, and their itemsets do not get updated when > their underlying nodeset change. > I have not cheked whether more problems exist with this modification. > Reported against Chrome (assuming it applies to all browsers though) > > > The example-form below demonstrate the problem: > http://pastebin.com/BsdsxDhh > (copied from an older still-unsolved problem on itemsets, ignore the > text descriptions) > > > > I cannot explain why this happen, but i found that if on XFNode initialization, > the XFNode.readonly property is set to 'undefined' instead of 'false', > then the problem dissappears, and the infinite recurssion issue remains fixed. > (i performed no other tests > > The patch below performs the suggested modification: > (and fixes tabstops and spaces) > > Index: src/js/xpathexpr/DOM/XNode.js.xml > =================================================================== > --- src/js/xpathexpr/DOM/XNode.js.xml (revision 396) > +++ src/js/xpathexpr/DOM/XNode.js.xml (working copy) > @@ -313,7 +313,7 @@ > this.valid = true; > this.required = false; > this.relevant = true; > - this.readonly = false; > + this.readonly = undefined; > this.type = Schema.getType("xsd_:string"); > this.schemaType = false; > this.bind = null; > > > Regards, > Kostis > |
From: Kostis A. <ank...@gm...> - 2010-04-21 09:20:21
|
Hi, Acording to [1] from IE-7 and later, they support XHR object and it is prefferable to use it instead of the ActiveX equivalent. My problem was that we had browsers configured within stricter security zones, and they had ActiveX disabled. Also i followed the advise on [1] about the ActiveX string-label to use when getting the XHR, and modified code to fetch the latest XHR version. Patch against rev396: http://pastebin.com/4argGeuj Regards, Kostis [1] http://en.wikipedia.org/wiki/XMLHttpRequest#Support_in_Internet_Explorer_versions_5.2C_5.5_and_6 |
From: Dhiradj B. <dh...@gm...> - 2010-04-21 08:13:27
|
Hello Dan, Thanks for your reply. Right now i'm not using eXist or XQuery. I load the instance from the local file system. I've succeeded in dynamically loading an instance into a model with the example of Kostis Anagnostopoulos. I'm surely interested in 'Incremental Model Loading'. I have looked at the example that you have mentioned. In this example 3 separate XML-files are used. Is it possible to load parts of one large XML file? Thanks. Regards, Dhiradj Badloe On Wed, Apr 21, 2010 at 3:13 AM, Dan McCreary <dan...@gm...>wrote: > Hello, > > Are you using eXist or a similar XQuery server to generate your forms? > > I am not sure how to list the files from a static file system but if you > are using eXist to dynamically create the form this is easy. You just get > all the file resources with xmldb:get-child-resources($collection) and then > create the form from the resource name you want. > > So the like would look like this: > > <xf:instance id="inlinewerken" src="{$file-name}" /> > > If you are interesting in "incremental model loading" where you only load > the parts of a large model when you need it I have an example here: > > http://en.wikibooks.org/wiki/XForms/Incremental_Model_Loading > > I created forms with over 250 elements and had to put each portion on a > separate tab. Each tab incrementally loaded part of the model. It made a > big different in load times. > > I hope that helps! - Dan > > On Mon, Apr 19, 2010 at 3:38 AM, Dhiradj Badloe <dh...@gm...> wrote: > >> Hello, >> >> I have a question about the dynamic loading of an instance into a model. >> Here's in example of my code: >> <xf:model id="InlineWerken"> >> <xf:instance id="inlinewerken" src="vte_406207_d.xml" /> >> </xf:model> >> The xml file is read from a local folder. This name of the XML file will >> be different every time.(based on exports from another application). I'm >> looking for a solution how to dynamically load the instance in the model. >> Can someone help or advise me on this? Thanks! >> >> Regard, >> >> Dhiradj >> >> >> ------------------------------------------------------------------------------ >> Download Intel® Parallel Studio Eval >> Try the new software tools for yourself. Speed compiling, find bugs >> proactively, and fine-tune applications for parallel performance. >> See why Intel Parallel Studio got high marks during beta. >> http://p.sf.net/sfu/intel-sw-dev >> _______________________________________________ >> Xsltforms-support mailing list >> Xsl...@li... >> https://lists.sourceforge.net/lists/listinfo/xsltforms-support >> >> > > > -- > Dan McCreary > Semantic Solutions Architect > syntactica.com > 952-460-1674 > VOIP: 111@69.199.167.229 > |
From: Dan M. <dan...@gm...> - 2010-04-21 01:13:13
|
Hello, Are you using eXist or a similar XQuery server to generate your forms? I am not sure how to list the files from a static file system but if you are using eXist to dynamically create the form this is easy. You just get all the file resources with xmldb:get-child-resources($collection) and then create the form from the resource name you want. So the like would look like this: <xf:instance id="inlinewerken" src="{$file-name}" /> If you are interesting in "incremental model loading" where you only load the parts of a large model when you need it I have an example here: http://en.wikibooks.org/wiki/XForms/Incremental_Model_Loading I created forms with over 250 elements and had to put each portion on a separate tab. Each tab incrementally loaded part of the model. It made a big different in load times. I hope that helps! - Dan On Mon, Apr 19, 2010 at 3:38 AM, Dhiradj Badloe <dh...@gm...> wrote: > Hello, > > I have a question about the dynamic loading of an instance into a model. > Here's in example of my code: > <xf:model id="InlineWerken"> > <xf:instance id="inlinewerken" src="vte_406207_d.xml" /> > </xf:model> > The xml file is read from a local folder. This name of the XML file will be > different every time.(based on exports from another application). I'm > looking for a solution how to dynamically load the instance in the model. > Can someone help or advise me on this? Thanks! > > Regard, > > Dhiradj > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Xsltforms-support mailing list > Xsl...@li... > https://lists.sourceforge.net/lists/listinfo/xsltforms-support > > -- Dan McCreary Semantic Solutions Architect syntactica.com 952-460-1674 VOIP: 111@69.199.167.229 |