xsltforms-support Mailing List for XSLTForms (Page 5)
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: Habs <ge...@us...> - 2021-12-06 11:10:49
|
On Mon, 6 Dec 2021, Steven Pemberton wrote: > On Sun, 05 Dec 2021 22:02:50 +0100, Ralph Corrigan <ra...@ra...> wrote: > >> >> You're absolutely right about the dummy namespace: I can't think of any >> reason why that would be a useful feature to introduce. > So it will work in Firefox is the answer I believe. > > Steven ahaaa ! That was it. Thank you. Regards Habs --- Sent using Alpine/Pine, probably the best MUA --- My Tox Messaging Id: 9F10AC64260ADEBAEA017ACB71B7CD2E962596FC4293025C0F79D77FFEB4CE5C7B0BED41D925 Get a client here: https://tox.chat/clients.html |
From: Steven P. <ste...@cw...> - 2021-12-06 10:14:26
|
On Sun, 05 Dec 2021 22:02:50 +0100, Ralph Corrigan <ra...@ra...> wrote: > > You're absolutely right about the dummy namespace: I can't think of any > reason why that would be a useful feature to introduce. So it will work in Firefox is the answer I believe. Steven |
From: Habs <ge...@us...> - 2021-12-06 09:49:54
|
>> On Sun, 5 Dec 2021, Ralph Corrigan wrote: >> >> Hi all, You were kind enough to help me earlier in the year when I was >> looking >> at xsltforms for the first time, and things have moved a long way from >> there. But I'm hitting a problem going back through the documents and >> forms trying to make them conformant with TEI (not my choice, because >> we're not actually encoding text, but anyway). These problems arose >> early on, so I removed it and ran everything through the empty namespace >> (xmlns=""). >> So target (e.g.) is: >> >> <TEI xmlns=""> .................... >> <listPerson/> >> </TEU> >> >> And the instance that populates it is: >> >> <xf:instance id"XX"> >> <items xmlns=""> >> <listPerson/> >> </items> >> </xf:instance>. >> >> On the form itself, the input fields all use the xf: prefix, so >> <xf:input ref="instance('XX')/listPerson/person"> etc. An xquery POST >> then inserts the instance data (using request:get-data()/*) into the >> original xml document. >> >> This all works absolutely fine and does everything I would expect it to. >> >> However, if I change the namespace in the instance to <items >> xmlns="http://www.tei-c.org/ns/1.0"> [1] the xf:input fields no longer >> render. Try as I might, wherever I put the namespace declaration on the >> form (and even if I add it to the xsltforms.xsl) the fields no longer >> render. I have noticed that there is no reference to the TEI namespace >> in the finally generated header, which I'#m guessing could be the >> problem, but I've no idea how to get it there: >> >> <html xmlns:xalan="http://xml.apache.org/xalan" >> xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" >> xmlns:xsd="http://www.w3.org/2001/XMLSchema" >> xmlns:dcterms="http://purl.org/dc/terms/" >> xmlns:ajx="http://www.ajaxforms.net/2006/ajx" >> xmlns:txs="http://www.agencexml.com/txs" >> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><!--HTML elements >> generated by XSLTForms 1.5.5 (661) - Copyright (C) 2021 <agenceXML> - >> Alain Couthures - http://www.agencexml.com-->. >> >> I thought I'd be able to work around it by calling a src instance from >> the main TEI namespace xml document, but this runs into the same >> problem. >> >> Any ideas about how I get round this (or do it properly in the first >> place)! If not sorted yet, please will you by reply, attach the smallest >> complete xform and any instance(s) that are not working as you'd expect. >> >> I'm not a 'namespace' guru, but namespaces I find can be quite testing. >> >> Thank you >> Habs >> >> --- Sent using Alpine/Pine, probably the best MUA --- >> >> My Tox Messaging Id: >> 9F10AC64260ADEBAEA017ACB71B7CD2E962596FC4293025C0F79D77FFEB4CE5C7B0BED41D925 >> Get a client here: https://tox.chat/clients.html > > On Sun, 5 Dec 2021, Ralph Corrigan wrote: > >> Thanks for getting back to me, Habs: >> >> So a short illustrative example attached. This form works fine in >> exist-db, and I've declared tei in the html header (although clearly >> there is nothing prefixed with 'tei'), all good. But as soon as I try >> and apply the tei namespace to the listPerson instance (I've tried >> adding it everywhere), the form fields no longer render (and don't >> appear to be loaded at all). I've tried adding the tei prefix to the >> instance, the form fields and both at the same time, but still not got >> anywhere yet... >> >> Any suggestions gratefully received! >> >> Cheers >> Ralph > > Please see attached. > > A little tip I learned a long time ago for xhtml forms and namespaces, > was to use two additional ones ... I cannot for the life in me, > remember why ! If it's obvious to you let me know please. > > I think it has something to do with clashes between [default] xform > namespaces and other namespaces in the instance(s). > > I've edited your example and it is sorted now on my setup. Note the > xmlns:my and my:dummy additions, the xmlns in the instance and the > changes using my: in the form. > > Hopefully that answers your need. > > Regards > Habs > > --- Sent using Alpine/Pine, probably the best MUA --- > > My Tox Messaging Id: > 9F10AC64260ADEBAEA017ACB71B7CD2E962596FC4293025C0F79D77FFEB4CE5C7B0BED41D925 > Get a client here: https://tox.chat/clients.html On Sun, 5 Dec 2021, Ralph Corrigan wrote: > Thanks so much, Habs! Slightly different behaviour on my set up to > yours, in that I had to prefix each element in the Xpath (so > ref="my:person/my:persName/my:forename") but that's doable. You're > absolutely right about the dummy namespace: I can't think of any reason > why that would be a useful feature to introduce. > > Anyway, problem solved - onto the next one. > > Thanks again > > Ralph > > On 05/12/2021 19:22, Habs wrote: > Good. Sorry, I missed out the requirement for each part of the xpath. That is indeed required when using namespace prefix. I am not sure (I don't think it is) this is an XSLTForms issue, or just one generally with the XForms standards and the way namespaces work. Someone else with more knowledge may be able to explain why this solution works. Regards and best wishes Habs --- Sent using Alpine/Pine, probably the best MUA --- My Tox Messaging Id: 9F10AC64260ADEBAEA017ACB71B7CD2E962596FC4293025C0F79D77FFEB4CE5C7B0BED41D925 Get a client here: https://tox.chat/clients.html |
From: Ralph C. <ra...@ra...> - 2021-12-05 21:02:59
|
Thanks so much, Habs! Slightly different behaviour on my set up to yours, in that I had to prefix each element in the Xpath (so ref="my:person/my:persName/my:forename") but that's doable. You're absolutely right about the dummy namespace: I can't think of any reason why that would be a useful feature to introduce. Anyway, problem solved - onto the next one. Thanks again Ralph On 05/12/2021 19:22, Habs wrote: > On Sun, 5 Dec 2021, Ralph Corrigan wrote: > > Hi all, You were kind enough to help me earlier in the year when I was looking > at xsltforms for the first time, and things have moved a long way from > there. But I'm hitting a problem going back through the documents and > forms trying to make them conformant with TEI (not my choice, because > we're not actually encoding text, but anyway). These problems arose > early on, so I removed it and ran everything through the empty namespace > (xmlns=""). > So target (e.g.) is: > > <TEI xmlns=""> .................... > <listPerson/> > </TEU> > > And the instance that populates it is: > > <xf:instance id"XX"> > <items xmlns=""> > <listPerson/> > </items> > </xf:instance>. > > On the form itself, the input fields all use the xf: prefix, so > <xf:input ref="instance('XX')/listPerson/person"> etc. An xquery POST > then inserts the instance data (using request:get-data()/*) into the > original xml document. > > This all works absolutely fine and does everything I would expect it to. > > However, if I change the namespace in the instance to <items > xmlns="http://www.tei-c.org/ns/1.0"> [1] the xf:input fields no longer > render. Try as I might, wherever I put the namespace declaration on the > form (and even if I add it to the xsltforms.xsl) the fields no longer > render. I have noticed that there is no reference to the TEI namespace > in the finally generated header, which I'#m guessing could be the > problem, but I've no idea how to get it there: > > <html xmlns:xalan="http://xml.apache.org/xalan" > xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" > xmlns:xsd="http://www.w3.org/2001/XMLSchema" > xmlns:dcterms="http://purl.org/dc/terms/" > xmlns:ajx="http://www.ajaxforms.net/2006/ajx" > xmlns:txs="http://www.agencexml.com/txs" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><!--HTML elements > generated by XSLTForms 1.5.5 (661) - Copyright (C) 2021 <agenceXML> - > Alain Couthures - http://www.agencexml.com-->. > > I thought I'd be able to work around it by calling a src instance from > the main TEI namespace xml document, but this runs into the same > problem. > > Any ideas about how I get round this (or do it properly in the first > place)! > If not sorted yet, please will you by reply, attach the smallest complete xform and any instance(s) that are not working as you'd expect. > > I'm not a 'namespace' guru, but namespaces I find can be quite testing. > > Thank you > Habs > > --- Sent using Alpine/Pine, probably the best MUA --- > > My Tox Messaging Id: > 9F10AC64260ADEBAEA017ACB71B7CD2E962596FC4293025C0F79D77FFEB4CE5C7B0BED41D925 > Get a client here: https://tox.chat/clients.html On Sun, 5 Dec 2021, Ralph Corrigan wrote: > Thanks for getting back to me, Habs: > > So a short illustrative example attached. This form works fine in > exist-db, and I've declared tei in the html header (although clearly > there is nothing prefixed with 'tei'), all good. But as soon as I try > and apply the tei namespace to the listPerson instance (I've tried > adding it everywhere), the form fields no longer render (and don't > appear to be loaded at all). I've tried adding the tei prefix to the > instance, the form fields and both at the same time, but still not got > anywhere yet... > > Any suggestions gratefully received! > > Cheers > Ralph Please see attached. A little tip I learned a long time ago for xhtml forms and namespaces, was to use two additional ones ... I cannot for the life in me, remember why ! If it's obvious to you let me know please. I think it has something to do with clashes between [default] xform namespaces and other namespaces in the instance(s). I've edited your example and it is sorted now on my setup. Note the xmlns:my and my:dummy additions, the xmlns in the instance and the changes using my: in the form. Hopefully that answers your need. Regards Habs --- Sent using Alpine/Pine, probably the best MUA --- My Tox Messaging Id: 9F10AC64260ADEBAEA017ACB71B7CD2E962596FC4293025C0F79D77FFEB4CE5C7B0BED41D925 Get a client here: https://tox.chat/clients.html |
From: Habs <ge...@us...> - 2021-12-05 19:23:16
|
>> On Sun, 5 Dec 2021, Ralph Corrigan wrote: >> >>> Hi all, You were kind enough to help me earlier in the year when I was >>> looking >>> at xsltforms for the first time, and things have moved a long way from >>> there. But I'm hitting a problem going back through the documents and >>> forms trying to make them conformant with TEI (not my choice, because >>> we're not actually encoding text, but anyway). These problems arose >>> early on, so I removed it and ran everything through the empty namespace >>> (xmlns=""). >>> So target (e.g.) is: >>> >>> <TEI xmlns=""> .................... >>> <listPerson/> >>> </TEU> >>> >>> And the instance that populates it is: >>> >>> <xf:instance id"XX"> >>> <items xmlns=""> >>> <listPerson/> >>> </items> >>> </xf:instance>. >>> >>> On the form itself, the input fields all use the xf: prefix, so >>> <xf:input ref="instance('XX')/listPerson/person"> etc. An xquery POST >>> then inserts the instance data (using request:get-data()/*) into the >>> original xml document. >>> >>> This all works absolutely fine and does everything I would expect it to. >>> >>> However, if I change the namespace in the instance to <items >>> xmlns="http://www.tei-c.org/ns/1.0"> [1] the xf:input fields no longer >>> render. Try as I might, wherever I put the namespace declaration on the >>> form (and even if I add it to the xsltforms.xsl) the fields no longer >>> render. I have noticed that there is no reference to the TEI namespace >>> in the finally generated header, which I'#m guessing could be the >>> problem, but I've no idea how to get it there: >>> >>> <html xmlns:xalan="http://xml.apache.org/xalan" >>> xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" >>> xmlns:xsd="http://www.w3.org/2001/XMLSchema" >>> xmlns:dcterms="http://purl.org/dc/terms/" >>> xmlns:ajx="http://www.ajaxforms.net/2006/ajx" >>> xmlns:txs="http://www.agencexml.com/txs" >>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><!--HTML elements >>> generated by XSLTForms 1.5.5 (661) - Copyright (C) 2021 <agenceXML> - >>> Alain Couthures - http://www.agencexml.com-->. >>> >>> I thought I'd be able to work around it by calling a src instance from >>> the main TEI namespace xml document, but this runs into the same >>> problem. >>> >>> Any ideas about how I get round this (or do it properly in the first >>> place)! >> >> If not sorted yet, please will you by reply, attach the smallest complete >> xform and any instance(s) that are not working as you'd expect. >> >> I'm not a 'namespace' guru, but namespaces I find can be quite testing. >> >> Thank you >> Habs >> >> --- Sent using Alpine/Pine, probably the best MUA --- >> >> My Tox Messaging Id: >> 9F10AC64260ADEBAEA017ACB71B7CD2E962596FC4293025C0F79D77FFEB4CE5C7B0BED41D925 >> Get a client here: https://tox.chat/clients.html On Sun, 5 Dec 2021, Ralph Corrigan wrote: > Thanks for getting back to me, Habs: > > So a short illustrative example attached. This form works fine in > exist-db, and I've declared tei in the html header (although clearly > there is nothing prefixed with 'tei'), all good. But as soon as I try > and apply the tei namespace to the listPerson instance (I've tried > adding it everywhere), the form fields no longer render (and don't > appear to be loaded at all). I've tried adding the tei prefix to the > instance, the form fields and both at the same time, but still not got > anywhere yet... > > Any suggestions gratefully received! > > Cheers > Ralph > Please see attached. A little tip I learned a long time ago for xhtml forms and namespaces, was to use two additional ones ... I cannot for the life in me, remember why ! If it's obvious to you let me know please. I think it has something to do with clashes between [default] xform namespaces and other namespaces in the instance(s). I've edited your example and it is sorted now on my setup. Note the xmlns:my and my:dummy additions, the xmlns in the instance and the changes using my: in the form. Hopefully that answers your need. Regards Habs --- Sent using Alpine/Pine, probably the best MUA --- My Tox Messaging Id: 9F10AC64260ADEBAEA017ACB71B7CD2E962596FC4293025C0F79D77FFEB4CE5C7B0BED41D925 Get a client here: https://tox.chat/clients.html |
From: Habs <ge...@us...> - 2021-12-05 17:23:48
|
On Sun, 5 Dec 2021, Ralph Corrigan wrote: > Hi all, > You were kind enough to help me earlier in the year when I was looking > at xsltforms for the first time, and things have moved a long way from > there. But I'm hitting a problem going back through the documents and > forms trying to make them conformant with TEI (not my choice, because > we're not actually encoding text, but anyway). These problems arose > early on, so I removed it and ran everything through the empty namespace > (xmlns=""). > So target (e.g.) is: > > <TEI xmlns=""> .................... > <listPerson/> > </TEU> > > And the instance that populates it is: > > <xf:instance id"XX"> > <items xmlns=""> > <listPerson/> > </items> > </xf:instance>. > > On the form itself, the input fields all use the xf: prefix, so > <xf:input ref="instance('XX')/listPerson/person"> etc. An xquery POST > then inserts the instance data (using request:get-data()/*) into the > original xml document. > > This all works absolutely fine and does everything I would expect it to. > > > However, if I change the namespace in the instance to <items > xmlns="http://www.tei-c.org/ns/1.0"> [1] the xf:input fields no longer > render. Try as I might, wherever I put the namespace declaration on the > form (and even if I add it to the xsltforms.xsl) the fields no longer > render. I have noticed that there is no reference to the TEI namespace > in the finally generated header, which I'#m guessing could be the > problem, but I've no idea how to get it there: > > <html xmlns:xalan="http://xml.apache.org/xalan" > xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" > xmlns:xsd="http://www.w3.org/2001/XMLSchema" > xmlns:dcterms="http://purl.org/dc/terms/" > xmlns:ajx="http://www.ajaxforms.net/2006/ajx" > xmlns:txs="http://www.agencexml.com/txs" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><!--HTML elements > generated by XSLTForms 1.5.5 (661) - Copyright (C) 2021 <agenceXML> - > Alain Couthures - http://www.agencexml.com-->. > > I thought I'd be able to work around it by calling a src instance from > the main TEI namespace xml document, but this runs into the same > problem. > > Any ideas about how I get round this (or do it properly in the first > place)! > If not sorted yet, please will you by reply, attach the smallest complete xform and any instance(s) that are not working as you'd expect. I'm not a 'namespace' guru, but namespaces I find can be quite testing. Thank you Habs --- Sent using Alpine/Pine, probably the best MUA --- My Tox Messaging Id: 9F10AC64260ADEBAEA017ACB71B7CD2E962596FC4293025C0F79D77FFEB4CE5C7B0BED41D925 Get a client here: https://tox.chat/clients.html |
From: Ralph C. <ra...@ra...> - 2021-12-05 17:23:16
|
Thanks for getting back to me, Habs: So a short illustrative example attached. This form works fine in exist-db, and I've declared tei in the html header (although clearly there is nothing prefixed with 'tei'), all good. But as soon as I try and apply the tei namespace to the listPerson instance (I've tried adding it everywhere), the form fields no longer render (and don't appear to be loaded at all). I've tried adding the tei prefix to the instance, the form fields and both at the same time, but still not got anywhere yet... Any suggestions gratefully received! Cheers Ralph On 05/12/2021 16:58, Habs wrote: > On Sun, 5 Dec 2021, Ralph Corrigan wrote: > >> Hi all, You were kind enough to help me earlier in the year when I was looking >> at xsltforms for the first time, and things have moved a long way from >> there. But I'm hitting a problem going back through the documents and >> forms trying to make them conformant with TEI (not my choice, because >> we're not actually encoding text, but anyway). These problems arose >> early on, so I removed it and ran everything through the empty namespace >> (xmlns=""). >> So target (e.g.) is: >> >> <TEI xmlns=""> .................... >> <listPerson/> >> </TEU> >> >> And the instance that populates it is: >> >> <xf:instance id"XX"> >> <items xmlns=""> >> <listPerson/> >> </items> >> </xf:instance>. >> >> On the form itself, the input fields all use the xf: prefix, so >> <xf:input ref="instance('XX')/listPerson/person"> etc. An xquery POST >> then inserts the instance data (using request:get-data()/*) into the >> original xml document. >> >> This all works absolutely fine and does everything I would expect it to. >> >> However, if I change the namespace in the instance to <items >> xmlns="http://www.tei-c.org/ns/1.0"> [1] the xf:input fields no longer >> render. Try as I might, wherever I put the namespace declaration on the >> form (and even if I add it to the xsltforms.xsl) the fields no longer >> render. I have noticed that there is no reference to the TEI namespace >> in the finally generated header, which I'#m guessing could be the >> problem, but I've no idea how to get it there: >> >> <html xmlns:xalan="http://xml.apache.org/xalan" >> xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" >> xmlns:xsd="http://www.w3.org/2001/XMLSchema" >> xmlns:dcterms="http://purl.org/dc/terms/" >> xmlns:ajx="http://www.ajaxforms.net/2006/ajx" >> xmlns:txs="http://www.agencexml.com/txs" >> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><!--HTML elements >> generated by XSLTForms 1.5.5 (661) - Copyright (C) 2021 <agenceXML> - >> Alain Couthures - http://www.agencexml.com-->. >> >> I thought I'd be able to work around it by calling a src instance from >> the main TEI namespace xml document, but this runs into the same >> problem. >> >> Any ideas about how I get round this (or do it properly in the first >> place)! > > If not sorted yet, please will you by reply, attach the smallest complete xform and any instance(s) that are not working as you'd expect. > > I'm not a 'namespace' guru, but namespaces I find can be quite testing. > > Thank you > Habs > > --- Sent using Alpine/Pine, probably the best MUA --- > > My Tox Messaging Id: > 9F10AC64260ADEBAEA017ACB71B7CD2E962596FC4293025C0F79D77FFEB4CE5C7B0BED41D925 > Get a client here: https://tox.chat/clients.html |
From: Ralph C. <ra...@ra...> - 2021-12-05 16:06:20
|
Hi all, You were kind enough to help me earlier in the year when I was looking at xsltforms for the first time, and things have moved a long way from there. But I'm hitting a problem going back through the documents and forms trying to make them conformant with TEI (not my choice, because we're not actually encoding text, but anyway). These problems arose early on, so I removed it and ran everything through the empty namespace (xmlns=""). So target (e.g.) is: <TEI xmlns=""> .................... <listPerson/> </TEU> And the instance that populates it is: <xf:instance id"XX"> <items xmlns=""> <listPerson/> </items> </xf:instance>. On the form itself, the input fields all use the xf: prefix, so <xf:input ref="instance('XX')/listPerson/person"> etc. An xquery POST then inserts the instance data (using request:get-data()/*) into the original xml document. This all works absolutely fine and does everything I would expect it to. However, if I change the namespace in the instance to <items xmlns="http://www.tei-c.org/ns/1.0"> [1] the xf:input fields no longer render. Try as I might, wherever I put the namespace declaration on the form (and even if I add it to the xsltforms.xsl) the fields no longer render. I have noticed that there is no reference to the TEI namespace in the finally generated header, which I'#m guessing could be the problem, but I've no idea how to get it there: <html xmlns:xalan="http://xml.apache.org/xalan" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:ajx="http://www.ajaxforms.net/2006/ajx" xmlns:txs="http://www.agencexml.com/txs" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><!--HTML elements generated by XSLTForms 1.5.5 (661) - Copyright (C) 2021 <agenceXML> - Alain Couthures - http://www.agencexml.com-->. I thought I'd be able to work around it by calling a src instance from the main TEI namespace xml document, but this runs into the same problem. Any ideas about how I get round this (or do it properly in the first place)! Many thanks Ralph Links: ------ [1] http://www.tei-c.org/ns/1.0"> |
From: Javier Diazestebaranz(UST,ES) <Jav...@us...> - 2021-06-29 16:25:42
|
Hi Alain, I send it attached to this email. Regards, Javier El 29/6/21 a las 17:42, Alain Couthures escribió: EXTERNAL EMAIL - Do not click any links or open any attachments unless you trust the sender and know the content is safe. Hi Javier, It appears to be a dependency issue. As a workaround, adding xforms-build action for the select1 control is enough to get expected behavior. I would like to check with previous XSLTForms releases. Can you please post the XForms source for this test case? Thanks! --Alain Le 28/06/2021 20:45, Javier Diazestebaranz(UST, ES) via Xsltforms-support <xsl...@li...><mailto:xsl...@li...> a écrit : Hi again, as i told in previous emails, I have updated our xsltforms version from a very old one. After all tests, everything works ok except one form (it doesn't work in 1.5.5 and 1.5.6 versions). I attach a simplified form (update_error.html), I don't know if we have something wrong in the form or is an xsltforms error. The problem (it is a bit difficult to explain) is that when you choose a value in "select1" component, it triggers the generation of some mandatory input elements (3 or 5 in the example), but the bind validations are not executed, so although these inputs are defined as required, when I push "Submit", submission is done although data is not valid. But when I add an additional parameter with 'Add' button, apart from adding an additional parameter, validations are triggered (all new inputs are marked with error) and in this case when I push "Submit", submission it isn't done. It seems some event is missing to execute after select1 component is modified and the actions of 'xforms-value-changed' event are executed. Best Regards, Javier _______________________________________________ Xsltforms-support mailing list Xsl...@li...<mailto:Xsl...@li...> https://lists.sourceforge.net/lists/listinfo/xsltforms-support |
From: Alain C. <ala...@ag...> - 2021-06-29 15:43:07
|
<!doctype html> <html> <head> <meta charset="UTF-8"> </head> <body> <div> Hi Javier, </div> <div class="default-style"> <br> </div> <div class="default-style"> It appears to be a dependency issue. As a workaround, adding xforms-build action for the select1 control is enough to get expected behavior. </div> <div class="default-style"> <br> </div> <div class="default-style"> I would like to check with previous XSLTForms releases. Can you please post the XForms source for this test case? </div> <div class="default-style"> <br> </div> <div class="default-style"> Thanks! </div> <div class="default-style"> <br> </div> <div class="default-style"> --Alain </div> <blockquote type="cite"> <div> Le 28/06/2021 20:45, Javier Diazestebaranz(UST, ES) via Xsltforms-support <xsl...@li...> a écrit : </div> <div> <br> </div> <div> <br> </div>Hi again, <br> <br>as i told in previous emails, I have updated our xsltforms version from a very old one. <br> <br>After all tests, everything works ok except one form (it doesn't work in 1.5.5 and 1.5.6 versions). <br> <br>I attach a simplified form (update_error.html), I don't know if we have something wrong in the form or is an xsltforms error. <br> <br>The problem (it is a bit difficult to explain) is that when you choose a value in "select1" component, it triggers the generation of some mandatory input elements (3 or 5 in the example), but the bind validations are not executed, so although these inputs are defined as required, when I push "Submit", submission is done although data is not valid. But when I add an additional parameter with 'Add' button, apart from adding an additional parameter, validations are triggered (all new inputs are marked with error) and in this case when I push "Submit", submission it isn't done. <br> <br>It seems some event is missing to execute after select1 component is modified and the actions of 'xforms-value-changed' event are executed. <br> <br>Best Regards, <br>Javier <br>_______________________________________________ Xsltforms-support mailing list Xsl...@li... https://lists.sourceforge.net/lists/listinfo/xsltforms-support </blockquote> </body> </html> |
From: Javier Diazestebaranz(UST,ES) <Jav...@us...> - 2021-06-28 18:46:07
|
Hi again, as i told in previous emails, I have updated our xsltforms version from a very old one. After all tests, everything works ok except one form (it doesn't work in 1.5.5 and 1.5.6 versions). I attach a simplified form (update_error.html), I don't know if we have something wrong in the form or is an xsltforms error. The problem (it is a bit difficult to explain) is that when you choose a value in "select1" component, it triggers the generation of some mandatory input elements (3 or 5 in the example), but the bind validations are not executed, so although these inputs are defined as required, when I push "Submit", submission is done although data is not valid. But when I add an additional parameter with 'Add' button, apart from adding an additional parameter, validations are triggered (all new inputs are marked with error) and in this case when I push "Submit", submission it isn't done. It seems some event is missing to execute after select1 component is modified and the actions of 'xforms-value-changed' event are executed. Best Regards, Javier |
From: Javier Diazestebaranz(UST,ES) <Jav...@us...> - 2021-06-28 18:25:09
|
Hi Alain, I have installed your last version and everything goes OK. Thanks a lot! Javier El 25/6/21 a las 14:23, Alain Couthures escribió: EXTERNAL EMAIL - Do not click any links or open any attachments unless you trust the sender and know the content is safe. Hi Javier, Xalan-C and Xalan-J are not serializing HTML custom elements correctly when empty (Saxon is OK). I have just committed a workaround. Thank you for your feedback! --Alain Le 23/06/2021 20:53, Alain Couthures <ala...@ag...><mailto:ala...@ag...> a écrit : Hi Javier, Before committing a new build, I will first try to write a fix based on @disable-output-escaping specifically for xalan-j to preserve the current transformation which has been successfully tested with browsers XSLT engines. Have you also tried with another server-side engine? Thanks! --Alain Le 23/06/2021 13:48, Javier Diazestebaranz(UST,ES) <jav...@us...><mailto:jav...@us...> a écrit : Hi again to all, I have manage to migrate to last xsltforms version. To solve this problems with XSLT engine, finally I have found a cleaner solution, including a comment entity, because including a non-breakable space had some side effects. I send my changes in xsltforms.xsl, it may be useful for somebody with the same problem: @@ -261,6 +261,7 @@ </xsl:choose> </xsl:for-each> <xsl:apply-templates select="node()"/> + <xsl:comment>_</xsl:comment> </xsl:element> </xsl:when> <xsl:when test="self::xforms:instance"> @@ -364,9 +365,10 @@ </xsl:choose> </xsl:for-each> <xsl:apply-templates select="node()"/> + <xsl:comment>_</xsl:comment> </xsl:element> </xsl:when> - <xsl:when test="contains('.setvalue.insert.delete.update.dispatch.property.targetid.name.action.load.toggle.send.setfocus.wrap.setselection.setindex.setnode.reset.retain.return.renew.refresh.rebuild.recalculate.revalidate.unload.hint.alert.help.value.item.itemset.copy.choices.filename.show.hide.method.resource.header.mediatype.message.control.', concat('.', local-name(), '.'))"> + <xsl:when test="contains('.setvalue.insert.delete.update.dispatch.delay.property.targetid.name.action.load.toggle.send.setfocus.wrap.setselection.setindex.setnode.reset.retain.return.renew.refresh.rebuild.recalculate.revalidate.unload.hint.alert.help.value.item.itemset.copy.choices.filename.show.hide.method.resource.header.mediatype.message.control.', concat('.', local-name(), '.'))"> <xsl:element name="{$elt_name}" namespace="{$elt_nsuri}"> <xsl:if test="$custom_name != $elt_name"> <xsl:attribute name="xforms-name"><xsl:value-of select="local-name()"/></xsl:attribute> @@ -405,6 +407,7 @@ </xsl:choose> </xsl:for-each> <xsl:apply-templates select="node()"/> + <xsl:comment>_</xsl:comment> </xsl:element> </xsl:when> <xsl:otherwise> Note: It is also included the correction to the 'delay' problem that I sent some days ago to the mailing list. Best Regards, Javier El 14/6/21 a las 8:59, Javier Diazestebaranz(UST, ES) via Xsltforms-support escribió: EXTERNAL EMAIL - Do not click any links or open any attachments unless you trust the sender and know the content is safe. Hi Alain, in my case we are using xalan (http://xalan.apache.org/), it's a java project. If I have spare time, I will try to check it with saxon. Best regards, Javier El 13/6/21 a las 17:55, Alain Couthures escribió: EXTERNAL EMAIL - Do not click any links or open any attachments unless you trust the sender and know the content is safe. Hi Javier, Thank you for fixing this issue with the XSLT transformation when performed at server side. I would like to know which XSLT engine you are using because browsers are not impacted (valid HTML serialization). Extra non-breakable spaces can be avoided for browsers but, maybe, also with other XSLT engines... Kind regards --Alain Le 11/06/2021 02:38, Javier Diazestebaranz(UST, ES) via Xsltforms-support <xsl...@li...><mailto:xsl...@li...> a écrit : Hi again, forget my previous email, I have read in a previous Alain's email in this list the following : "HTML5 also considers that custom elements cannot be written with the auto-close notation." and I have realized that the problem is that instead putting: <xforms-label xf-ref="elm[1]"/> it should be '<xforms-label xf-ref="elm[1]"></xforms-label>' We generate the html pages executing xslt in server side, using xsltforms.xsl and then sending html to server, so the problem was in that transformation. I have solved the problem doing the following change in xsltforms.xsl @@ -363,7 +363,12 @@ </xsl:when> </xsl:choose> </xsl:for-each> + <xsl:choose> + <xsl:when test="node()"> <xsl:apply-templates select="node()"/> + </xsl:when> + <xsl:otherwise> </xsl:otherwise> + </xsl:choose> </xsl:element> </xsl:when> <xsl:when test="contains('.setvalue.insert.delete.update.dispatch.property.targetid.name.action.load.toggle.send.setfocus.wrap.setselection.setindex.setnode.reset.retain.return.renew.refresh.rebuild.recalculate.revalidate.unload.hint.alert.help.value.item.itemset.copy.choices.filename.show.hide.method.resource.header.mediatype.message.control.', concat('.', local-name(), '.'))"> @@ -404,7 +409,12 @@ </xsl:when> </xsl:choose> </xsl:for-each> + <xsl:choose> + <xsl:when test="node()"> <xsl:apply-templates select="node()"/> + </xsl:when> + <xsl:otherwise> </xsl:otherwise> + </xsl:choose> </xsl:element> </xsl:when> <xsl:otherwise> So I force to insert at least a blank space to guarantee that there isn't any auto-close notation and all the previously mentioned problems have been solved!. Best Regards, Javier El 10/6/21 a las 19:21, Javier Diazestebaranz(UST, ES) via Xsltforms-support escribió: EXTERNAL EMAIL - Do not click any links or open any attachments unless you trust the sender and know the content is safe. Hello Steven, thanks a lot for your help. First of all, I have realized that I sent a wrong test case. In the setvalue 'error' I sent you the following: '<xforms-setvalue xf-ref="instance('salida')/datosTarea/numeroOrden" xf-value="aa"/>' instead '<xforms-setvalue xf-ref="instance('salida')/datosTarea/numeroOrden" xf-value=""/>. The original XForms source was as you thought, '<setvalue ref="foo" value=""/>'. It seems that older version ignored that emtpy value and cleared the value of the element in that case. We have corrected it (with <setvalue ref="foo"/>) and now it doesn't fail. The other problem related with 'bind', I also sent a bad test case. We have discovered that it only fails when 'bind' elements are not at the end of model part. So, if you put: (..) <xforms-submission id="enviar" xf-method="get" xf-mode="synchronous" xf-ref="instance('salida')/datosTarea" xf-resource="fake"> <xforms-action ev-event="xforms-submit-error"> <xforms-setvalue xf-ref="instance('salida')/datosTarea/numeroOrden"/> </xforms-action> </xforms-submission> <xforms-bind id="bind_numeroOrden" xf-ref="instance('salida')/datosTarea/numeroOrden" xf-required="true()" xf-type="xsd:string"/> </xforms-model> (...) It works ok, but if you put: (...) <xforms-bind id="bind_numeroOrden" xf-ref="instance('salida')/datosTarea/numeroOrden" xf-required="true()" xf-type="xsd:string"/> <xforms-submission id="enviar" xf-method="get" xf-mode="synchronous" xf-ref="instance('salida')/datosTarea" xf-resource="fake"> <xforms-action ev-event="xforms-submit-error"> <xforms-setvalue xf-ref="instance('salida')/datosTarea/numeroOrden"/> </xforms-action> </xforms-submission> </xforms-model> (...) It fails. Is there any rule about the order of the model elements? In older version we mixed them and there wasn't any error. We have also found another problem, regarding select1 and itemset, recovering the values from other instance (I send a testcase about this problem). If I put: <xforms-itemset xf-ref="instance('inst_tarea')/vct"> <xforms-label xf-ref="elm[1]"/> <xforms-value xf-ref="elm[2]"/> </xforms-itemset> Label is shown but value it is not processed and a 'undefined' value appears if I choose some element. If I change the order of the elements: <xforms-itemset xf-ref="instance('inst_tarea')/vct"> <xforms-value xf-ref="elm[2]"/> <xforms-label xf-ref="elm[1]"/> </xforms-itemset> There is no label shown, but the value is selected correctly. We have tried to change it in another way, but we had no luck. Thank you, Javier El 10/6/21 a las 10:29, Steven Pemberton escribió: On Thu, 10 Jun 2021 01:19:45 +0200, Javier Diazestebaranz(UST, ES) via Xsltforms-support <xsl...@li...><mailto:xsl...@li...> wrote: Hello, we are using a very ,very old Xsltforms implementation (r574, more than 8 years ago) with some local changes, and we want to migrate to last stable version. Before starting the migration, I have been testing some of our xforms pages with last version (downloaded from here: https://github.com/AlainCouthures/declarative4all/blob/master/public/direct/xsltforms.zip , I m not sure if it is a stable one), and I came across some problems. I have made a small test case, to check if we have some error in our code, there have been some syntax changes in xforms and we have to modify our code, or there is some error in last xsltform version, I hope somebody can help us. I send attached the code (submission.html). We use the .xml version (we don't want to rewrite all our old code), but i think is easier to analyse the problem with .html version. * The first error that appears when the form load is: XSLTForms Exception -------------------------- Error parsing the following XPath expression : Unexpected char at '' It seems this line have some problem, because when I comment out it, the error dissapears: <xforms-setvalue xf-ref="instance('salida')/datosTarea/numeroOrden" xf-value=""/> So this is the generated code, not your original XForms source, so I'm guessing here, but to set a value to the empty string, you use either <setvalue ref="foo" value="''"/> or equally good <setvalue ref="foo"/> This is not good: <setvalue ref="foo" value=""/> because @value has to be an expression. Steven _______________________________________________ Xsltforms-support mailing list Xsl...@li...<mailto:Xsl...@li...> https://lists.sourceforge.net/lists/listinfo/xsltforms-support _______________________________________________ Xsltforms-support mailing list Xsl...@li...<mailto:Xsl...@li...> https://lists.sourceforge.net/lists/listinfo/xsltforms-support _______________________________________________ Xsltforms-support mailing list Xsl...@li...<mailto:Xsl...@li...> https://lists.sourceforge.net/lists/listinfo/xsltforms-support |
From: Alain C. <ala...@ag...> - 2021-06-25 12:23:44
|
<!doctype html> <html> <head> <meta charset="UTF-8"> </head> <body> <div> Hi Javier, </div> <div class="default-style"> <br> </div> <div class="default-style"> Xalan-C and Xalan-J are not serializing HTML custom elements correctly when empty (Saxon is OK). </div> <div class="default-style"> <br> </div> <div class="default-style"> I have just committed a workaround. </div> <div class="default-style"> <br> </div> <div class="default-style"> Thank you for your feedback! </div> <div class="default-style"> <br> </div> <div class="default-style"> --Alain </div> <blockquote type="cite"> <div> Le 23/06/2021 20:53, Alain Couthures <ala...@ag...> a écrit : </div> <div> <br> </div> <div> <br> </div> <div> Hi Javier, </div> <div class="default-style"> <br> </div> <div class="default-style"> Before committing a new build, I will first try to write a fix based on @disable-output-escaping specifically for xalan-j to preserve the current transformation which has been successfully tested with browsers XSLT engines. </div> <div class="default-style"> <br> </div> <div class="default-style"> Have you also tried with another server-side engine? </div> <div class="default-style"> <br> </div> <div class="default-style"> Thanks! </div> <div class="default-style"> <br> </div> <div class="default-style"> --Alain </div> <blockquote type="cite"> <div> Le 23/06/2021 13:48, Javier Diazestebaranz(UST,ES) <jav...@us...> a écrit : </div> <div> <br> </div> <div> <br> </div>Hi again to all, <br> <br>I have manage to migrate to last xsltforms version. To solve this problems with XSLT engine, finally I have found a cleaner solution, including a comment entity, because including a non-breakable space had some side effects. <br> <br>I send my changes in xsltforms.xsl, it may be useful for somebody with the same problem: <br> <br><span style="font-family: monospace;">@@ -261,6 +261,7 @@<br> </xsl:choose><br> </xsl:for-each><br> <xsl:apply-templates select="node()"/><br>+ <xsl:comment>_</xsl:comment><br> </xsl:element><br> </xsl:when><br> <xsl:when test="self::xforms:instance"><br>@@ -364,9 +365,10 @@<br> </xsl:choose><br> </xsl:for-each><br> <xsl:apply-templates select="node()"/><br>+ <xsl:comment>_</xsl:comment><br> </xsl:element><br> </xsl:when><br>- <xsl:when test="contains('.setvalue.insert.delete.update.dispatch.property.targetid.name.action.load.toggle.send.setfocus.wrap.setselection.setindex.setnode.reset.retain.return.renew.refresh.rebuild.recalculate.revalidate.unload.hint.alert.help.value.item.itemset.copy.choices.filename.show.hide.method.resource.header.mediatype.message.control.', concat('.', local-name(), '.'))"><br>+ <xsl:when test="contains('.setvalue.insert.delete.update.dispatch.delay.property.targetid.name.action.load.toggle.send.setfocus.wrap.setselection.setindex.setnode.reset.retain.return.renew.refresh.rebuild.recalculate.revalidate.unload.hint.alert.help.value.item.itemset.copy.choices.filename.show.hide.method.resource.header.mediatype.message.control.', concat('.', local-name(), '.'))"><br> <xsl:element name="{$elt_name}" namespace="{$elt_nsuri}"><br> <xsl:if test="$custom_name != $elt_name"><br> <xsl:attribute name="xforms-name"><xsl:value-of select="local-name()"/></xsl:attribute><br>@@ -405,6 +407,7 @@<br> </xsl:choose><br> </xsl:for-each><br> <xsl:apply-templates select="node()"/><br>+ <xsl:comment>_</xsl:comment><br> </xsl:element><br> </xsl:when><br> <xsl:otherwise></span> <br> <br>Note: It is also included the correction to the 'delay' problem that I sent some days ago to the mailing list. <br> <br>Best Regards, <br>Javier <br> <br> <div class="moz-cite-prefix"> El 14/6/21 a las 8:59, Javier Diazestebaranz(UST, ES) via Xsltforms-support escribió: <br> </div> <blockquote type="cite"> <p><br></p> <p style="margin: 0cm 0cm 8pt;"><strong><span style="background: silver; color: #e65e0a; line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10pt; mso-highlight: silver;">EXTERNAL EMAIL</span></strong><span style="background: #f1ebe5; line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10pt; mso-highlight: silver;"> - <span style="color: black;">Do not click any links or open any attachments unless you trust the sender and know the content is safe</span></span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10pt;">.</span></p> <p><br></p>Hi Alain, <br> <br>in my case we are using xalan (<a class="moz-txt-link-freetext" href="http://xalan.apache.org/">http://xalan.apache.org/</a>), it's a java project. If I have spare time, I will try to check it with saxon. <br> <br>Best regards, <br>Javier <br> <br> <div class="moz-cite-prefix"> El 13/6/21 a las 17:55, Alain Couthures escribió: <br> </div> <blockquote type="cite"> <p style="margin: 0cm 0cm 8pt;"><strong><span style="background: silver; color: #e65e0a; line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10pt; mso-highlight: silver;">EXTERNAL EMAIL</span></strong><span style="background: #f1ebe5; line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10pt; mso-highlight: silver;"> - <span style="color: black;">Do not click any links or open any attachments unless you trust the sender and know the content is safe</span></span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10pt;">.</span></p> <div> Hi Javier, </div> <div class="default-style"> <br> </div> <div class="default-style"> Thank you for fixing this issue with the XSLT transformation when performed at server side. </div> <div class="default-style"> <br> </div> <div class="default-style"> I would like to know which XSLT engine you are using because browsers are not impacted (valid HTML serialization). </div> <div class="default-style"> <br> </div> <div class="default-style"> Extra non-breakable spaces can be avoided for browsers but, maybe, also with other XSLT engines... </div> <div class="default-style"> <br> </div> <div class="default-style"> Kind regards </div> <div class="default-style"> <br> </div> <div class="default-style"> --Alain </div> <blockquote type="cite"> <div> Le 11/06/2021 02:38, Javier Diazestebaranz(UST, ES) via Xsltforms-support <a class="moz-txt-link-rfc2396E" href="mailto:xsl...@li..."> <xsl...@li...></a> a écrit : </div> <div> <br> </div> <div> <br> </div>Hi again, <br> <br>forget my previous email, I have read in a previous Alain's email in this list the following : "HTML5 also considers that custom elements cannot be written with the auto-close notation." and I have realized that the problem is that instead putting: <xforms-label xf-ref="elm[1]"/> it should be '<xforms-label xf-ref="elm[1]"></xforms-label>' <br> <br>We generate the html pages executing xslt in server side, using xsltforms.xsl and then sending html to server, so the problem was in that transformation. <br> <br>I have solved the problem doing the following change in xsltforms.xsl <br> <br><span style="font-family: monospace;">@@ -363,7 +363,12 @@<br> </xsl:when><br> </xsl:choose><br> </xsl:for-each><br>+ <xsl:choose><br>+ <xsl:when test="node()"><br> <xsl:apply-templates select="node()"/><br>+ </xsl:when><br>+ <xsl:otherwise>&#160;</xsl:otherwise><br>+ </xsl:choose><br> </xsl:element><br> </xsl:when><br> <xsl:when test="contains('.setvalue.insert.delete.update.dispatch.property.targetid.name.action.load.toggle.send.setfocus.wrap.setselection.setindex.setnode.reset.retain.return.renew.refresh.rebuild.recalculate.revalidate.unload.hint.alert.help.value.item.itemset.copy.choices.filename.show.hide.method.resource.header.mediatype.message.control.', concat('.', local-name(), '.'))"><br>@@ -404,7 +409,12 @@<br> </xsl:when><br> </xsl:choose><br> </xsl:for-each><br>+ <xsl:choose><br>+ <xsl:when test="node()"><br> <xsl:apply-templates select="node()"/><br>+ </xsl:when><br>+ <xsl:otherwise>&#160;</xsl:otherwise><br>+ </xsl:choose><br> </xsl:element><br> </xsl:when><br> <xsl:otherwise></span> <br> <br>So I force to insert at least a blank space to guarantee that there isn't any auto-close notation and all the previously mentioned problems have been solved!. <br> <br>Best Regards, <br>Javier <br> <br> <div class="moz-cite-prefix"> El 10/6/21 a las 19:21, Javier Diazestebaranz(UST, ES) via Xsltforms-support escribió: <br> </div> <blockquote type="cite"> <p><br></p> <p style="margin: 0cm 0cm 8pt;"><strong><span style="background: silver; color: #e65e0a; line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10pt; mso-highlight: silver;">EXTERNAL EMAIL</span></strong><span style="background: #f1ebe5; line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10pt; mso-highlight: silver;"> - <span style="color: black;">Do not click any links or open any attachments unless you trust the sender and know the content is safe</span></span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10pt;">.</span></p> <p><br></p>Hello Steven, <br> <br>thanks a lot for your help. <br> <br>First of all, I have realized that I sent a wrong test case. In the setvalue 'error' I sent you the following: '<xforms-setvalue xf-ref="instance('salida')/datosTarea/numeroOrden" xf-value="aa"/>' instead '<xforms-setvalue xf-ref="instance('salida')/datosTarea/numeroOrden" xf-value=""/>. The original XForms source was as you thought, '<setvalue ref="foo" value=""/>'. It seems that older version ignored that emtpy value and cleared the value of the element in that case. We have corrected it (with <setvalue ref="foo"/>) and now it doesn't fail. <br> <br>The other problem related with 'bind', I also sent a bad test case. We have discovered that it only fails when 'bind' elements are not at the end of model part. So, if you put: <br> <br>(..) <br> <xforms-submission id="enviar" xf-method="get" xf-mode="synchronous" xf-ref="instance('salida')/datosTarea" xf-resource="fake"> <br> <xforms-action ev-event="xforms-submit-error"> <br> <xforms-setvalue xf-ref="instance('salida')/datosTarea/numeroOrden"/> <br> </xforms-action> <br> </xforms-submission> <br> <xforms-bind id="bind_numeroOrden" xf-ref="instance('salida')/datosTarea/numeroOrden" xf-required="true()" xf-type="xsd:string"/> <br> </xforms-model> <br>(...) <br> <br>It works ok, but if you put: <br> <br>(...) <br> <xforms-bind id="bind_numeroOrden" xf-ref="instance('salida')/datosTarea/numeroOrden" xf-required="true()" xf-type="xsd:string"/> <br> <xforms-submission id="enviar" xf-method="get" xf-mode="synchronous" xf-ref="instance('salida')/datosTarea" xf-resource="fake"> <br> <xforms-action ev-event="xforms-submit-error"> <br> <xforms-setvalue xf-ref="instance('salida')/datosTarea/numeroOrden"/> <br> </xforms-action> <br> </xforms-submission> <br> </xforms-model> <br>(...) <br> <br>It fails. Is there any rule about the order of the model elements? In older version we mixed them and there wasn't any error. <br> <br>We have also found another problem, regarding select1 and itemset, recovering the values from other instance (I send a testcase about this problem). If I put: <br> <br> <xforms-itemset xf-ref="instance('inst_tarea')/vct"> <br> <xforms-label xf-ref="elm[1]"/> <br> <xforms-value xf-ref="elm[2]"/> <br> </xforms-itemset> <br> <br>Label is shown but value it is not processed and a 'undefined' value appears if I choose some element. If I change the order of the elements: <br> <br> <xforms-itemset xf-ref="instance('inst_tarea')/vct"> <br> <xforms-value xf-ref="elm[2]"/> <br> <xforms-label xf-ref="elm[1]"/> <br> </xforms-itemset> <br> <br>There is no label shown, but the value is selected correctly. We have tried to change it in another way, but we had no luck. <br> <br>Thank you, <br>Javier <br> <br> <div class="moz-cite-prefix"> El 10/6/21 a las 10:29, Steven Pemberton escribió: <br> </div> <blockquote type="cite"> On Thu, 10 Jun 2021 01:19:45 +0200, Javier Diazestebaranz(UST, ES) via Xsltforms-support <a href="mailto:xsl...@li..." class="moz-txt-link-rfc2396E"> <xsl...@li...></a> wrote: <br> <br> <blockquote> Hello, <br> <br>we are using a very ,very old Xsltforms implementation (r574, more than 8 years ago) with some local changes, and we want to migrate to last stable version. <br> <br>Before starting the migration, I have been testing some of our xforms pages with last version (downloaded from here: <a href="https://github.com/AlainCouthures/declarative4all/blob/master/public/direct/xsltforms.zip" class="moz-txt-link-freetext"> https://github.com/AlainCouthures/declarative4all/blob/master/public/direct/xsltforms.zip</a> , I m not sure if it is a stable one), and I came across some problems. <br> <br>I have made a small test case, to check if we have some error in our code, there have been some syntax changes in xforms and we have to modify our code, or there is some error in last xsltform version, I hope somebody can help us. <br> <br>I send attached the code (submission.html). We use the .xml version (we don't want to rewrite all our old code), but i think is easier to analyse the problem with .html version. <br> <br>* The first error that appears when the form load is: <br> <br><span style="font-family: monospace;">XSLTForms Exception<br>--------------------------<br><br>Error parsing the following XPath expression :<br><br><br><br>Unexpected char at ''</span> <br> <br>It seems this line have some problem, because when I comment out it, the error dissapears: <br> <br><xforms-setvalue xf-ref="instance('salida')/datosTarea/numeroOrden" xf-value=""/> </blockquote> <div> So this is the generated code, not your original XForms source, so I'm guessing here, but to set a value to the empty string, you use either </div> <div> <br> </div> <div> <setvalue ref="foo" value="''"/> </div> <div> <br> </div> <div> or equally good </div> <div> <br> </div> <div> <div> <setvalue ref="foo"/> </div> <div> <br> </div> <div> This is not good: </div> <div> <br> </div> <div> <div> <setvalue ref="foo" value=""/> </div> <div> <br> </div> <div> because @value has to be an expression. </div> <div> <br> </div> <div> Steven </div> </div> </div> </blockquote> <br> <br> <br> <pre class="moz-quote-pre">_______________________________________________ Xsltforms-support mailing list <a href="mailto:Xsl...@li..." class="moz-txt-link-abbreviated">Xsl...@li...</a> <a href="https://lists.sourceforge.net/lists/listinfo/xsltforms-support" class="moz-txt-link-freetext">https://lists.sourceforge.net/lists/listinfo/xsltforms-support</a> </pre> </blockquote> <br>_______________________________________________ Xsltforms-support mailing list <a class="moz-txt-link-abbreviated" href="mailto:Xsl...@li..."> Xsl...@li...</a> <a class="moz-txt-link-freetext" href="https://lists.sourceforge.net/lists/listinfo/xsltforms-support"> https://lists.sourceforge.net/lists/listinfo/xsltforms-support</a> </blockquote> </blockquote> <br> <br> <br> <pre class="moz-quote-pre">_______________________________________________ Xsltforms-support mailing list <a class="moz-txt-link-abbreviated" href="mailto:Xsl...@li...">Xsl...@li...</a> <a class="moz-txt-link-freetext" href="https://lists.sourceforge.net/lists/listinfo/xsltforms-support">https://lists.sourceforge.net/lists/listinfo/xsltforms-support</a> </pre> </blockquote> <br> </blockquote> </blockquote> </body> </html> |
From: Javier Diazestebaranz(UST,ES) <Jav...@us...> - 2021-06-24 00:11:10
|
Hi Alain, I find very useful 'Tracelog' to see the order of execution of the events, in complex forms sometimes is difficult to analize some errors without it. Regarding Profiler, I find very useful xpath stats, to get the slowest xpath expressions when a form works slowly and there is some error in a xpath expression. It is also very useful the instance viewer, although it is possible to get the instance data with new XForms Debugger, I miss some command to get the list of the instances of the form, as you can get in Profiler. Best Regards, Javier El 23/6/21 a las 21:18, Alain Couthures escribió: EXTERNAL EMAIL - Do not click any links or open any attachments unless you trust the sender and know the content is safe. Hi Javier, The new XForms Debugger will be extended to integrate profiling data and trace log. It will probably be based on extra XPath functions. What are you precisely looking for? Thank you for your answer! --Alain Le 23/06/2021 14:19, Javier Diazestebaranz(UST, ES) via Xsltforms-support <xsl...@li...><mailto:xsl...@li...> a écrit : Hi, I am unable to get working 'XSLTForms Profiler' & 'XSLTForms Trace Log' in last version of XSLTForms. I can use 'XForms Debugger' feature, but I don't know if it is possible to use the other two components. At least I see they are present in xsltforms.zip: $ unzip -l xsltforms.zip |grep xsltforms_ 4482 2016-06-13 14:47 xsltforms_profiler.xhtml 1467 2013-07-25 11:35 xsltforms_tracelog.xhtml But I don't know how are loaded them. Thanks, Javier _______________________________________________ Xsltforms-support mailing list Xsl...@li...<mailto:Xsl...@li...> https://lists.sourceforge.net/lists/listinfo/xsltforms-support |
From: Javier Diazestebaranz(UST,ES) <Jav...@us...> - 2021-06-23 22:38:48
|
Hi Alain, I have in my TO-DO list trying with Saxon engine, but I couldn't do it at this moment. As soon as I test it I wil tell you if it works ok, but it will take some time to me. Best Regards, Javier El 23/6/21 a las 20:53, Alain Couthures escribió: EXTERNAL EMAIL - Do not click any links or open any attachments unless you trust the sender and know the content is safe. Hi Javier, Before committing a new build, I will first try to write a fix based on @disable-output-escaping specifically for xalan-j to preserve the current transformation which has been successfully tested with browsers XSLT engines. Have you also tried with another server-side engine? Thanks! --Alain Le 23/06/2021 13:48, Javier Diazestebaranz(UST,ES) <jav...@us...><mailto:jav...@us...> a écrit : Hi again to all, I have manage to migrate to last xsltforms version. To solve this problems with XSLT engine, finally I have found a cleaner solution, including a comment entity, because including a non-breakable space had some side effects. I send my changes in xsltforms.xsl, it may be useful for somebody with the same problem: @@ -261,6 +261,7 @@ </xsl:choose> </xsl:for-each> <xsl:apply-templates select="node()"/> + <xsl:comment>_</xsl:comment> </xsl:element> </xsl:when> <xsl:when test="self::xforms:instance"> @@ -364,9 +365,10 @@ </xsl:choose> </xsl:for-each> <xsl:apply-templates select="node()"/> + <xsl:comment>_</xsl:comment> </xsl:element> </xsl:when> - <xsl:when test="contains('.setvalue.insert.delete.update.dispatch.property.targetid.name.action.load.toggle.send.setfocus.wrap.setselection.setindex.setnode.reset.retain.return.renew.refresh.rebuild.recalculate.revalidate.unload.hint.alert.help.value.item.itemset.copy.choices.filename.show.hide.method.resource.header.mediatype.message.control.', concat('.', local-name(), '.'))"> + <xsl:when test="contains('.setvalue.insert.delete.update.dispatch.delay.property.targetid.name.action.load.toggle.send.setfocus.wrap.setselection.setindex.setnode.reset.retain.return.renew.refresh.rebuild.recalculate.revalidate.unload.hint.alert.help.value.item.itemset.copy.choices.filename.show.hide.method.resource.header.mediatype.message.control.', concat('.', local-name(), '.'))"> <xsl:element name="{$elt_name}" namespace="{$elt_nsuri}"> <xsl:if test="$custom_name != $elt_name"> <xsl:attribute name="xforms-name"><xsl:value-of select="local-name()"/></xsl:attribute> @@ -405,6 +407,7 @@ </xsl:choose> </xsl:for-each> <xsl:apply-templates select="node()"/> + <xsl:comment>_</xsl:comment> </xsl:element> </xsl:when> <xsl:otherwise> Note: It is also included the correction to the 'delay' problem that I sent some days ago to the mailing list. Best Regards, Javier El 14/6/21 a las 8:59, Javier Diazestebaranz(UST, ES) via Xsltforms-support escribió: EXTERNAL EMAIL - Do not click any links or open any attachments unless you trust the sender and know the content is safe. Hi Alain, in my case we are using xalan (http://xalan.apache.org/), it's a java project. If I have spare time, I will try to check it with saxon. Best regards, Javier El 13/6/21 a las 17:55, Alain Couthures escribió: EXTERNAL EMAIL - Do not click any links or open any attachments unless you trust the sender and know the content is safe. Hi Javier, Thank you for fixing this issue with the XSLT transformation when performed at server side. I would like to know which XSLT engine you are using because browsers are not impacted (valid HTML serialization). Extra non-breakable spaces can be avoided for browsers but, maybe, also with other XSLT engines... Kind regards --Alain Le 11/06/2021 02:38, Javier Diazestebaranz(UST, ES) via Xsltforms-support <xsl...@li...><mailto:xsl...@li...> a écrit : Hi again, forget my previous email, I have read in a previous Alain's email in this list the following : "HTML5 also considers that custom elements cannot be written with the auto-close notation." and I have realized that the problem is that instead putting: <xforms-label xf-ref="elm[1]"/> it should be '<xforms-label xf-ref="elm[1]"></xforms-label>' We generate the html pages executing xslt in server side, using xsltforms.xsl and then sending html to server, so the problem was in that transformation. I have solved the problem doing the following change in xsltforms.xsl @@ -363,7 +363,12 @@ </xsl:when> </xsl:choose> </xsl:for-each> + <xsl:choose> + <xsl:when test="node()"> <xsl:apply-templates select="node()"/> + </xsl:when> + <xsl:otherwise> </xsl:otherwise> + </xsl:choose> </xsl:element> </xsl:when> <xsl:when test="contains('.setvalue.insert.delete.update.dispatch.property.targetid.name.action.load.toggle.send.setfocus.wrap.setselection.setindex.setnode.reset.retain.return.renew.refresh.rebuild.recalculate.revalidate.unload.hint.alert.help.value.item.itemset.copy.choices.filename.show.hide.method.resource.header.mediatype.message.control.', concat('.', local-name(), '.'))"> @@ -404,7 +409,12 @@ </xsl:when> </xsl:choose> </xsl:for-each> + <xsl:choose> + <xsl:when test="node()"> <xsl:apply-templates select="node()"/> + </xsl:when> + <xsl:otherwise> </xsl:otherwise> + </xsl:choose> </xsl:element> </xsl:when> <xsl:otherwise> So I force to insert at least a blank space to guarantee that there isn't any auto-close notation and all the previously mentioned problems have been solved!. Best Regards, Javier El 10/6/21 a las 19:21, Javier Diazestebaranz(UST, ES) via Xsltforms-support escribió: EXTERNAL EMAIL - Do not click any links or open any attachments unless you trust the sender and know the content is safe. Hello Steven, thanks a lot for your help. First of all, I have realized that I sent a wrong test case. In the setvalue 'error' I sent you the following: '<xforms-setvalue xf-ref="instance('salida')/datosTarea/numeroOrden" xf-value="aa"/>' instead '<xforms-setvalue xf-ref="instance('salida')/datosTarea/numeroOrden" xf-value=""/>. The original XForms source was as you thought, '<setvalue ref="foo" value=""/>'. It seems that older version ignored that emtpy value and cleared the value of the element in that case. We have corrected it (with <setvalue ref="foo"/>) and now it doesn't fail. The other problem related with 'bind', I also sent a bad test case. We have discovered that it only fails when 'bind' elements are not at the end of model part. So, if you put: (..) <xforms-submission id="enviar" xf-method="get" xf-mode="synchronous" xf-ref="instance('salida')/datosTarea" xf-resource="fake"> <xforms-action ev-event="xforms-submit-error"> <xforms-setvalue xf-ref="instance('salida')/datosTarea/numeroOrden"/> </xforms-action> </xforms-submission> <xforms-bind id="bind_numeroOrden" xf-ref="instance('salida')/datosTarea/numeroOrden" xf-required="true()" xf-type="xsd:string"/> </xforms-model> (...) It works ok, but if you put: (...) <xforms-bind id="bind_numeroOrden" xf-ref="instance('salida')/datosTarea/numeroOrden" xf-required="true()" xf-type="xsd:string"/> <xforms-submission id="enviar" xf-method="get" xf-mode="synchronous" xf-ref="instance('salida')/datosTarea" xf-resource="fake"> <xforms-action ev-event="xforms-submit-error"> <xforms-setvalue xf-ref="instance('salida')/datosTarea/numeroOrden"/> </xforms-action> </xforms-submission> </xforms-model> (...) It fails. Is there any rule about the order of the model elements? In older version we mixed them and there wasn't any error. We have also found another problem, regarding select1 and itemset, recovering the values from other instance (I send a testcase about this problem). If I put: <xforms-itemset xf-ref="instance('inst_tarea')/vct"> <xforms-label xf-ref="elm[1]"/> <xforms-value xf-ref="elm[2]"/> </xforms-itemset> Label is shown but value it is not processed and a 'undefined' value appears if I choose some element. If I change the order of the elements: <xforms-itemset xf-ref="instance('inst_tarea')/vct"> <xforms-value xf-ref="elm[2]"/> <xforms-label xf-ref="elm[1]"/> </xforms-itemset> There is no label shown, but the value is selected correctly. We have tried to change it in another way, but we had no luck. Thank you, Javier El 10/6/21 a las 10:29, Steven Pemberton escribió: On Thu, 10 Jun 2021 01:19:45 +0200, Javier Diazestebaranz(UST, ES) via Xsltforms-support <xsl...@li...><mailto:xsl...@li...> wrote: Hello, we are using a very ,very old Xsltforms implementation (r574, more than 8 years ago) with some local changes, and we want to migrate to last stable version. Before starting the migration, I have been testing some of our xforms pages with last version (downloaded from here: https://github.com/AlainCouthures/declarative4all/blob/master/public/direct/xsltforms.zip , I m not sure if it is a stable one), and I came across some problems. I have made a small test case, to check if we have some error in our code, there have been some syntax changes in xforms and we have to modify our code, or there is some error in last xsltform version, I hope somebody can help us. I send attached the code (submission.html). We use the .xml version (we don't want to rewrite all our old code), but i think is easier to analyse the problem with .html version. * The first error that appears when the form load is: XSLTForms Exception -------------------------- Error parsing the following XPath expression : Unexpected char at '' It seems this line have some problem, because when I comment out it, the error dissapears: <xforms-setvalue xf-ref="instance('salida')/datosTarea/numeroOrden" xf-value=""/> So this is the generated code, not your original XForms source, so I'm guessing here, but to set a value to the empty string, you use either <setvalue ref="foo" value="''"/> or equally good <setvalue ref="foo"/> This is not good: <setvalue ref="foo" value=""/> because @value has to be an expression. Steven _______________________________________________ Xsltforms-support mailing list Xsl...@li...<mailto:Xsl...@li...> https://lists.sourceforge.net/lists/listinfo/xsltforms-support _______________________________________________ Xsltforms-support mailing list Xsl...@li...<mailto:Xsl...@li...> https://lists.sourceforge.net/lists/listinfo/xsltforms-support _______________________________________________ Xsltforms-support mailing list Xsl...@li...<mailto:Xsl...@li...> https://lists.sourceforge.net/lists/listinfo/xsltforms-support |
From: Alain C. <ala...@ag...> - 2021-06-23 19:18:54
|
<!doctype html> <html> <head> <meta charset="UTF-8"> </head> <body> <div> Hi Javier, </div> <div class="default-style"> <br> </div> <div class="default-style"> The new XForms Debugger will be extended to integrate profiling data and trace log. </div> <div class="default-style"> <br> </div> <div class="default-style"> It will probably be based on extra XPath functions. </div> <div class="default-style"> <br> </div> <div class="default-style"> What are you precisely looking for? </div> <div class="default-style"> <br> </div> <div class="default-style"> Thank you for your answer! </div> <div class="default-style"> <br> </div> <div class="default-style"> --Alain </div> <blockquote type="cite"> <div> Le 23/06/2021 14:19, Javier Diazestebaranz(UST, ES) via Xsltforms-support <xsl...@li...> a écrit : </div> <div> <br> </div> <div> <br> </div>Hi, <br> <br>I am unable to get working 'XSLTForms Profiler' & 'XSLTForms Trace Log' in last version of XSLTForms. I can use 'XForms Debugger' feature, but I don't know if it is possible to use the other two components. <br> <br>At least I see they are present in xsltforms.zip: <br> <br><span style="font-family: monospace;">$ unzip -l xsltforms.zip |grep xsltforms_<br> 4482 2016-06-13 14:47 xsltforms_profiler.xhtml<br> 1467 2013-07-25 11:35 xsltforms_tracelog.xhtml</span> <br> <br>But I don't know how are loaded them. <br> <br>Thanks, <br>Javier <br>_______________________________________________ Xsltforms-support mailing list Xsl...@li... https://lists.sourceforge.net/lists/listinfo/xsltforms-support </blockquote> </body> </html> |
From: Alain C. <ala...@ag...> - 2021-06-23 19:06:47
|
<!doctype html> <html> <head> <meta charset="UTF-8"> </head> <body> <div> Hi Javier, </div> <div class="default-style"> <br> </div> <div class="default-style"> Before committing a new build, I will first try to write a fix based on @disable-output-escaping specifically for xalan-j to preserve the current transformation which has been successfully tested with browsers XSLT engines. </div> <div class="default-style"> <br> </div> <div class="default-style"> Have you also tried with another server-side engine? </div> <div class="default-style"> <br> </div> <div class="default-style"> Thanks! </div> <div class="default-style"> <br> </div> <div class="default-style"> --Alain </div> <blockquote type="cite"> <div> Le 23/06/2021 13:48, Javier Diazestebaranz(UST,ES) <jav...@us...> a écrit : </div> <div> <br> </div> <div> <br> </div>Hi again to all, <br> <br>I have manage to migrate to last xsltforms version. To solve this problems with XSLT engine, finally I have found a cleaner solution, including a comment entity, because including a non-breakable space had some side effects. <br> <br>I send my changes in xsltforms.xsl, it may be useful for somebody with the same problem: <br> <br><span style="font-family: monospace;">@@ -261,6 +261,7 @@<br> </xsl:choose><br> </xsl:for-each><br> <xsl:apply-templates select="node()"/><br>+ <xsl:comment>_</xsl:comment><br> </xsl:element><br> </xsl:when><br> <xsl:when test="self::xforms:instance"><br>@@ -364,9 +365,10 @@<br> </xsl:choose><br> </xsl:for-each><br> <xsl:apply-templates select="node()"/><br>+ <xsl:comment>_</xsl:comment><br> </xsl:element><br> </xsl:when><br>- <xsl:when test="contains('.setvalue.insert.delete.update.dispatch.property.targetid.name.action.load.toggle.send.setfocus.wrap.setselection.setindex.setnode.reset.retain.return.renew.refresh.rebuild.recalculate.revalidate.unload.hint.alert.help.value.item.itemset.copy.choices.filename.show.hide.method.resource.header.mediatype.message.control.', concat('.', local-name(), '.'))"><br>+ <xsl:when test="contains('.setvalue.insert.delete.update.dispatch.delay.property.targetid.name.action.load.toggle.send.setfocus.wrap.setselection.setindex.setnode.reset.retain.return.renew.refresh.rebuild.recalculate.revalidate.unload.hint.alert.help.value.item.itemset.copy.choices.filename.show.hide.method.resource.header.mediatype.message.control.', concat('.', local-name(), '.'))"><br> <xsl:element name="{$elt_name}" namespace="{$elt_nsuri}"><br> <xsl:if test="$custom_name != $elt_name"><br> <xsl:attribute name="xforms-name"><xsl:value-of select="local-name()"/></xsl:attribute><br>@@ -405,6 +407,7 @@<br> </xsl:choose><br> </xsl:for-each><br> <xsl:apply-templates select="node()"/><br>+ <xsl:comment>_</xsl:comment><br> </xsl:element><br> </xsl:when><br> <xsl:otherwise></span> <br> <br>Note: It is also included the correction to the 'delay' problem that I sent some days ago to the mailing list. <br> <br>Best Regards, <br>Javier <br> <br> <div class="moz-cite-prefix"> El 14/6/21 a las 8:59, Javier Diazestebaranz(UST, ES) via Xsltforms-support escribió: <br> </div> <blockquote type="cite"> <p><br></p> <p style="margin: 0cm 0cm 8pt;"><strong><span style="background: silver; color: #e65e0a; line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10pt; mso-highlight: silver;">EXTERNAL EMAIL</span></strong><span style="background: #f1ebe5; line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10pt; mso-highlight: silver;"> - <span style="color: black;">Do not click any links or open any attachments unless you trust the sender and know the content is safe</span></span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10pt;">.</span></p> <p><br></p>Hi Alain, <br> <br>in my case we are using xalan (<a href="http://xalan.apache.org/" class="moz-txt-link-freetext">http://xalan.apache.org/</a>), it's a java project. If I have spare time, I will try to check it with saxon. <br> <br>Best regards, <br>Javier <br> <br> <div class="moz-cite-prefix"> El 13/6/21 a las 17:55, Alain Couthures escribió: <br> </div> <blockquote type="cite"> <p style="margin: 0cm 0cm 8pt;"><strong><span style="background: silver; color: #e65e0a; line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10pt; mso-highlight: silver;">EXTERNAL EMAIL</span></strong><span style="background: #f1ebe5; line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10pt; mso-highlight: silver;"> - <span style="color: black;">Do not click any links or open any attachments unless you trust the sender and know the content is safe</span></span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10pt;">.</span></p> <div> Hi Javier, </div> <div class="default-style"> <br> </div> <div class="default-style"> Thank you for fixing this issue with the XSLT transformation when performed at server side. </div> <div class="default-style"> <br> </div> <div class="default-style"> I would like to know which XSLT engine you are using because browsers are not impacted (valid HTML serialization). </div> <div class="default-style"> <br> </div> <div class="default-style"> Extra non-breakable spaces can be avoided for browsers but, maybe, also with other XSLT engines... </div> <div class="default-style"> <br> </div> <div class="default-style"> Kind regards </div> <div class="default-style"> <br> </div> <div class="default-style"> --Alain </div> <blockquote type="cite"> <div> Le 11/06/2021 02:38, Javier Diazestebaranz(UST, ES) via Xsltforms-support <a href="mailto:xsl...@li..." class="moz-txt-link-rfc2396E"> <xsl...@li...></a> a écrit : </div> <div> <br> </div> <div> <br> </div>Hi again, <br> <br>forget my previous email, I have read in a previous Alain's email in this list the following : "HTML5 also considers that custom elements cannot be written with the auto-close notation." and I have realized that the problem is that instead putting: <xforms-label xf-ref="elm[1]"/> it should be '<xforms-label xf-ref="elm[1]"></xforms-label>' <br> <br>We generate the html pages executing xslt in server side, using xsltforms.xsl and then sending html to server, so the problem was in that transformation. <br> <br>I have solved the problem doing the following change in xsltforms.xsl <br> <br><span style="font-family: monospace;">@@ -363,7 +363,12 @@<br> </xsl:when><br> </xsl:choose><br> </xsl:for-each><br>+ <xsl:choose><br>+ <xsl:when test="node()"><br> <xsl:apply-templates select="node()"/><br>+ </xsl:when><br>+ <xsl:otherwise>&#160;</xsl:otherwise><br>+ </xsl:choose><br> </xsl:element><br> </xsl:when><br> <xsl:when test="contains('.setvalue.insert.delete.update.dispatch.property.targetid.name.action.load.toggle.send.setfocus.wrap.setselection.setindex.setnode.reset.retain.return.renew.refresh.rebuild.recalculate.revalidate.unload.hint.alert.help.value.item.itemset.copy.choices.filename.show.hide.method.resource.header.mediatype.message.control.', concat('.', local-name(), '.'))"><br>@@ -404,7 +409,12 @@<br> </xsl:when><br> </xsl:choose><br> </xsl:for-each><br>+ <xsl:choose><br>+ <xsl:when test="node()"><br> <xsl:apply-templates select="node()"/><br>+ </xsl:when><br>+ <xsl:otherwise>&#160;</xsl:otherwise><br>+ </xsl:choose><br> </xsl:element><br> </xsl:when><br> <xsl:otherwise></span> <br> <br>So I force to insert at least a blank space to guarantee that there isn't any auto-close notation and all the previously mentioned problems have been solved!. <br> <br>Best Regards, <br>Javier <br> <br> <div class="moz-cite-prefix"> El 10/6/21 a las 19:21, Javier Diazestebaranz(UST, ES) via Xsltforms-support escribió: <br> </div> <blockquote type="cite"> <p><br></p> <p style="margin: 0cm 0cm 8pt;"><strong><span style="background: silver; color: #e65e0a; line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10pt; mso-highlight: silver;">EXTERNAL EMAIL</span></strong><span style="background: #f1ebe5; line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10pt; mso-highlight: silver;"> - <span style="color: black;">Do not click any links or open any attachments unless you trust the sender and know the content is safe</span></span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10pt;">.</span></p> <p><br></p>Hello Steven, <br> <br>thanks a lot for your help. <br> <br>First of all, I have realized that I sent a wrong test case. In the setvalue 'error' I sent you the following: '<xforms-setvalue xf-ref="instance('salida')/datosTarea/numeroOrden" xf-value="aa"/>' instead '<xforms-setvalue xf-ref="instance('salida')/datosTarea/numeroOrden" xf-value=""/>. The original XForms source was as you thought, '<setvalue ref="foo" value=""/>'. It seems that older version ignored that emtpy value and cleared the value of the element in that case. We have corrected it (with <setvalue ref="foo"/>) and now it doesn't fail. <br> <br>The other problem related with 'bind', I also sent a bad test case. We have discovered that it only fails when 'bind' elements are not at the end of model part. So, if you put: <br> <br>(..) <br> <xforms-submission id="enviar" xf-method="get" xf-mode="synchronous" xf-ref="instance('salida')/datosTarea" xf-resource="fake"> <br> <xforms-action ev-event="xforms-submit-error"> <br> <xforms-setvalue xf-ref="instance('salida')/datosTarea/numeroOrden"/> <br> </xforms-action> <br> </xforms-submission> <br> <xforms-bind id="bind_numeroOrden" xf-ref="instance('salida')/datosTarea/numeroOrden" xf-required="true()" xf-type="xsd:string"/> <br> </xforms-model> <br>(...) <br> <br>It works ok, but if you put: <br> <br>(...) <br> <xforms-bind id="bind_numeroOrden" xf-ref="instance('salida')/datosTarea/numeroOrden" xf-required="true()" xf-type="xsd:string"/> <br> <xforms-submission id="enviar" xf-method="get" xf-mode="synchronous" xf-ref="instance('salida')/datosTarea" xf-resource="fake"> <br> <xforms-action ev-event="xforms-submit-error"> <br> <xforms-setvalue xf-ref="instance('salida')/datosTarea/numeroOrden"/> <br> </xforms-action> <br> </xforms-submission> <br> </xforms-model> <br>(...) <br> <br>It fails. Is there any rule about the order of the model elements? In older version we mixed them and there wasn't any error. <br> <br>We have also found another problem, regarding select1 and itemset, recovering the values from other instance (I send a testcase about this problem). If I put: <br> <br> <xforms-itemset xf-ref="instance('inst_tarea')/vct"> <br> <xforms-label xf-ref="elm[1]"/> <br> <xforms-value xf-ref="elm[2]"/> <br> </xforms-itemset> <br> <br>Label is shown but value it is not processed and a 'undefined' value appears if I choose some element. If I change the order of the elements: <br> <br> <xforms-itemset xf-ref="instance('inst_tarea')/vct"> <br> <xforms-value xf-ref="elm[2]"/> <br> <xforms-label xf-ref="elm[1]"/> <br> </xforms-itemset> <br> <br>There is no label shown, but the value is selected correctly. We have tried to change it in another way, but we had no luck. <br> <br>Thank you, <br>Javier <br> <br> <div class="moz-cite-prefix"> El 10/6/21 a las 10:29, Steven Pemberton escribió: <br> </div> <blockquote type="cite"> On Thu, 10 Jun 2021 01:19:45 +0200, Javier Diazestebaranz(UST, ES) via Xsltforms-support <a class="moz-txt-link-rfc2396E" href="mailto:xsl...@li..."> <xsl...@li...></a> wrote: <br> <br> <blockquote> Hello, <br> <br>we are using a very ,very old Xsltforms implementation (r574, more than 8 years ago) with some local changes, and we want to migrate to last stable version. <br> <br>Before starting the migration, I have been testing some of our xforms pages with last version (downloaded from here: <a class="moz-txt-link-freetext" href="https://github.com/AlainCouthures/declarative4all/blob/master/public/direct/xsltforms.zip"> https://github.com/AlainCouthures/declarative4all/blob/master/public/direct/xsltforms.zip</a> , I m not sure if it is a stable one), and I came across some problems. <br> <br>I have made a small test case, to check if we have some error in our code, there have been some syntax changes in xforms and we have to modify our code, or there is some error in last xsltform version, I hope somebody can help us. <br> <br>I send attached the code (submission.html). We use the .xml version (we don't want to rewrite all our old code), but i think is easier to analyse the problem with .html version. <br> <br>* The first error that appears when the form load is: <br> <br><span style="font-family: monospace;">XSLTForms Exception<br>--------------------------<br><br>Error parsing the following XPath expression :<br><br><br><br>Unexpected char at ''</span> <br> <br>It seems this line have some problem, because when I comment out it, the error dissapears: <br> <br><xforms-setvalue xf-ref="instance('salida')/datosTarea/numeroOrden" xf-value=""/> </blockquote> <div> So this is the generated code, not your original XForms source, so I'm guessing here, but to set a value to the empty string, you use either </div> <div> <br> </div> <div> <setvalue ref="foo" value="''"/> </div> <div> <br> </div> <div> or equally good </div> <div> <br> </div> <div> <div> <setvalue ref="foo"/> </div> <div> <br> </div> <div> This is not good: </div> <div> <br> </div> <div> <div> <setvalue ref="foo" value=""/> </div> <div> <br> </div> <div> because @value has to be an expression. </div> <div> <br> </div> <div> Steven </div> </div> </div> </blockquote> <br> <br> <br> <pre class="moz-quote-pre">_______________________________________________ Xsltforms-support mailing list <a class="moz-txt-link-abbreviated" href="mailto:Xsl...@li...">Xsl...@li...</a> <a class="moz-txt-link-freetext" href="https://lists.sourceforge.net/lists/listinfo/xsltforms-support">https://lists.sourceforge.net/lists/listinfo/xsltforms-support</a> </pre> </blockquote> <br>_______________________________________________ Xsltforms-support mailing list <a href="mailto:Xsl...@li..." class="moz-txt-link-abbreviated"> Xsl...@li...</a> <a href="https://lists.sourceforge.net/lists/listinfo/xsltforms-support" class="moz-txt-link-freetext"> https://lists.sourceforge.net/lists/listinfo/xsltforms-support</a> </blockquote> </blockquote> <br> <br> <br> <pre class="moz-quote-pre">_______________________________________________ Xsltforms-support mailing list <a href="mailto:Xsl...@li..." class="moz-txt-link-abbreviated">Xsl...@li...</a> <a href="https://lists.sourceforge.net/lists/listinfo/xsltforms-support" class="moz-txt-link-freetext">https://lists.sourceforge.net/lists/listinfo/xsltforms-support</a> </pre> </blockquote> <br> </blockquote> </body> </html> |
From: Javier Diazestebaranz(UST,ES) <Jav...@us...> - 2021-06-23 12:19:53
|
Hi, I am unable to get working 'XSLTForms Profiler' & 'XSLTForms Trace Log' in last version of XSLTForms. I can use 'XForms Debugger' feature, but I don't know if it is possible to use the other two components. At least I see they are present in xsltforms.zip: $ unzip -l xsltforms.zip |grep xsltforms_ 4482 2016-06-13 14:47 xsltforms_profiler.xhtml 1467 2013-07-25 11:35 xsltforms_tracelog.xhtml But I don't know how are loaded them. Thanks, Javier |
From: Javier Diazestebaranz(UST,ES) <Jav...@us...> - 2021-06-23 11:49:01
|
Hi again to all, I have manage to migrate to last xsltforms version. To solve this problems with XSLT engine, finally I have found a cleaner solution, including a comment entity, because including a non-breakable space had some side effects. I send my changes in xsltforms.xsl, it may be useful for somebody with the same problem: @@ -261,6 +261,7 @@ </xsl:choose> </xsl:for-each> <xsl:apply-templates select="node()"/> + <xsl:comment>_</xsl:comment> </xsl:element> </xsl:when> <xsl:when test="self::xforms:instance"> @@ -364,9 +365,10 @@ </xsl:choose> </xsl:for-each> <xsl:apply-templates select="node()"/> + <xsl:comment>_</xsl:comment> </xsl:element> </xsl:when> - <xsl:when test="contains('.setvalue.insert.delete.update.dispatch.property.targetid.name.action.load.toggle.send.setfocus.wrap.setselection.setindex.setnode.reset.retain.return.renew.refresh.rebuild.recalculate.revalidate.unload.hint.alert.help.value.item.itemset.copy.choices.filename.show.hide.method.resource.header.mediatype.message.control.', concat('.', local-name(), '.'))"> + <xsl:when test="contains('.setvalue.insert.delete.update.dispatch.delay.property.targetid.name.action.load.toggle.send.setfocus.wrap.setselection.setindex.setnode.reset.retain.return.renew.refresh.rebuild.recalculate.revalidate.unload.hint.alert.help.value.item.itemset.copy.choices.filename.show.hide.method.resource.header.mediatype.message.control.', concat('.', local-name(), '.'))"> <xsl:element name="{$elt_name}" namespace="{$elt_nsuri}"> <xsl:if test="$custom_name != $elt_name"> <xsl:attribute name="xforms-name"><xsl:value-of select="local-name()"/></xsl:attribute> @@ -405,6 +407,7 @@ </xsl:choose> </xsl:for-each> <xsl:apply-templates select="node()"/> + <xsl:comment>_</xsl:comment> </xsl:element> </xsl:when> <xsl:otherwise> Note: It is also included the correction to the 'delay' problem that I sent some days ago to the mailing list. Best Regards, Javier El 14/6/21 a las 8:59, Javier Diazestebaranz(UST, ES) via Xsltforms-support escribió: EXTERNAL EMAIL - Do not click any links or open any attachments unless you trust the sender and know the content is safe. Hi Alain, in my case we are using xalan (http://xalan.apache.org/), it's a java project. If I have spare time, I will try to check it with saxon. Best regards, Javier El 13/6/21 a las 17:55, Alain Couthures escribió: EXTERNAL EMAIL - Do not click any links or open any attachments unless you trust the sender and know the content is safe. Hi Javier, Thank you for fixing this issue with the XSLT transformation when performed at server side. I would like to know which XSLT engine you are using because browsers are not impacted (valid HTML serialization). Extra non-breakable spaces can be avoided for browsers but, maybe, also with other XSLT engines... Kind regards --Alain Le 11/06/2021 02:38, Javier Diazestebaranz(UST, ES) via Xsltforms-support <xsl...@li...><mailto:xsl...@li...> a écrit : Hi again, forget my previous email, I have read in a previous Alain's email in this list the following : "HTML5 also considers that custom elements cannot be written with the auto-close notation." and I have realized that the problem is that instead putting: <xforms-label xf-ref="elm[1]"/> it should be '<xforms-label xf-ref="elm[1]"></xforms-label>' We generate the html pages executing xslt in server side, using xsltforms.xsl and then sending html to server, so the problem was in that transformation. I have solved the problem doing the following change in xsltforms.xsl @@ -363,7 +363,12 @@ </xsl:when> </xsl:choose> </xsl:for-each> + <xsl:choose> + <xsl:when test="node()"> <xsl:apply-templates select="node()"/> + </xsl:when> + <xsl:otherwise> </xsl:otherwise> + </xsl:choose> </xsl:element> </xsl:when> <xsl:when test="contains('.setvalue.insert.delete.update.dispatch.property.targetid.name.action.load.toggle.send.setfocus.wrap.setselection.setindex.setnode.reset.retain.return.renew.refresh.rebuild.recalculate.revalidate.unload.hint.alert.help.value.item.itemset.copy.choices.filename.show.hide.method.resource.header.mediatype.message.control.', concat('.', local-name(), '.'))"> @@ -404,7 +409,12 @@ </xsl:when> </xsl:choose> </xsl:for-each> + <xsl:choose> + <xsl:when test="node()"> <xsl:apply-templates select="node()"/> + </xsl:when> + <xsl:otherwise> </xsl:otherwise> + </xsl:choose> </xsl:element> </xsl:when> <xsl:otherwise> So I force to insert at least a blank space to guarantee that there isn't any auto-close notation and all the previously mentioned problems have been solved!. Best Regards, Javier El 10/6/21 a las 19:21, Javier Diazestebaranz(UST, ES) via Xsltforms-support escribió: EXTERNAL EMAIL - Do not click any links or open any attachments unless you trust the sender and know the content is safe. Hello Steven, thanks a lot for your help. First of all, I have realized that I sent a wrong test case. In the setvalue 'error' I sent you the following: '<xforms-setvalue xf-ref="instance('salida')/datosTarea/numeroOrden" xf-value="aa"/>' instead '<xforms-setvalue xf-ref="instance('salida')/datosTarea/numeroOrden" xf-value=""/>. The original XForms source was as you thought, '<setvalue ref="foo" value=""/>'. It seems that older version ignored that emtpy value and cleared the value of the element in that case. We have corrected it (with <setvalue ref="foo"/>) and now it doesn't fail. The other problem related with 'bind', I also sent a bad test case. We have discovered that it only fails when 'bind' elements are not at the end of model part. So, if you put: (..) <xforms-submission id="enviar" xf-method="get" xf-mode="synchronous" xf-ref="instance('salida')/datosTarea" xf-resource="fake"> <xforms-action ev-event="xforms-submit-error"> <xforms-setvalue xf-ref="instance('salida')/datosTarea/numeroOrden"/> </xforms-action> </xforms-submission> <xforms-bind id="bind_numeroOrden" xf-ref="instance('salida')/datosTarea/numeroOrden" xf-required="true()" xf-type="xsd:string"/> </xforms-model> (...) It works ok, but if you put: (...) <xforms-bind id="bind_numeroOrden" xf-ref="instance('salida')/datosTarea/numeroOrden" xf-required="true()" xf-type="xsd:string"/> <xforms-submission id="enviar" xf-method="get" xf-mode="synchronous" xf-ref="instance('salida')/datosTarea" xf-resource="fake"> <xforms-action ev-event="xforms-submit-error"> <xforms-setvalue xf-ref="instance('salida')/datosTarea/numeroOrden"/> </xforms-action> </xforms-submission> </xforms-model> (...) It fails. Is there any rule about the order of the model elements? In older version we mixed them and there wasn't any error. We have also found another problem, regarding select1 and itemset, recovering the values from other instance (I send a testcase about this problem). If I put: <xforms-itemset xf-ref="instance('inst_tarea')/vct"> <xforms-label xf-ref="elm[1]"/> <xforms-value xf-ref="elm[2]"/> </xforms-itemset> Label is shown but value it is not processed and a 'undefined' value appears if I choose some element. If I change the order of the elements: <xforms-itemset xf-ref="instance('inst_tarea')/vct"> <xforms-value xf-ref="elm[2]"/> <xforms-label xf-ref="elm[1]"/> </xforms-itemset> There is no label shown, but the value is selected correctly. We have tried to change it in another way, but we had no luck. Thank you, Javier El 10/6/21 a las 10:29, Steven Pemberton escribió: On Thu, 10 Jun 2021 01:19:45 +0200, Javier Diazestebaranz(UST, ES) via Xsltforms-support <xsl...@li...><mailto:xsl...@li...> wrote: Hello, we are using a very ,very old Xsltforms implementation (r574, more than 8 years ago) with some local changes, and we want to migrate to last stable version. Before starting the migration, I have been testing some of our xforms pages with last version (downloaded from here: https://github.com/AlainCouthures/declarative4all/blob/master/public/direct/xsltforms.zip , I m not sure if it is a stable one), and I came across some problems. I have made a small test case, to check if we have some error in our code, there have been some syntax changes in xforms and we have to modify our code, or there is some error in last xsltform version, I hope somebody can help us. I send attached the code (submission.html). We use the .xml version (we don't want to rewrite all our old code), but i think is easier to analyse the problem with .html version. * The first error that appears when the form load is: XSLTForms Exception -------------------------- Error parsing the following XPath expression : Unexpected char at '' It seems this line have some problem, because when I comment out it, the error dissapears: <xforms-setvalue xf-ref="instance('salida')/datosTarea/numeroOrden" xf-value=""/> So this is the generated code, not your original XForms source, so I'm guessing here, but to set a value to the empty string, you use either <setvalue ref="foo" value="''"/> or equally good <setvalue ref="foo"/> This is not good: <setvalue ref="foo" value=""/> because @value has to be an expression. Steven _______________________________________________ Xsltforms-support mailing list Xsl...@li...<mailto:Xsl...@li...> https://lists.sourceforge.net/lists/listinfo/xsltforms-support _______________________________________________ Xsltforms-support mailing list Xsl...@li...<mailto:Xsl...@li...> https://lists.sourceforge.net/lists/listinfo/xsltforms-support _______________________________________________ Xsltforms-support mailing list Xsl...@li...<mailto:Xsl...@li...> https://lists.sourceforge.net/lists/listinfo/xsltforms-support |
From: Javier Diazestebaranz(UST,ES) <Jav...@us...> - 2021-06-17 07:58:10
|
Hi, I think I have found an error in last version of xsltforms, related with delay element. I have this code, to make a periodic reload: <xf:action ev:event="refrescarTareasAuto"> <xf:send submission="refrescoAuto"/> <xf:dispatch name="refrescarTareasAuto" targetid="datos"> <xf:delay>10000</xf:delay> </xf:dispatch> </xf:action> And when processing with xsltforms.xsl, it generates the following error code in html: <script xmlns="" type="text/javascript">XsltForms_browser.dialog.hide('statusPanel'); if (!XsltForms_globals.debugMode) { XsltForms_globals.debugMode = true; XsltForms_globals.debugging(); } alert("XSLTForms Exception\n--------------------------\n\nError initializing :\n\nxforms:delay is not supported"); </script> I have seen that 'delay' element is not included in xsltforms.xsl. I have done the following change in line 437: < <xsl:when test="contains('.setvalue.insert.delete.update.dispatch.property.targetid.name.action.load.toggle.send.setfocus.wrap.setselection.setindex.setnode.reset.retain.return.renew.refresh.rebuild.recalculate.revalidate.unload.hint.alert.help.value.item.itemset.copy.choices.filename.show.hide.method.resource.header.mediatype.message.control.', concat('.', local-name(), '.'))"> --- > <xsl:when test="contains('.setvalue.insert.delete.update.dispatch.delay.property.targetid.name.action.load.toggle.send.setfocus.wrap.setselection.setindex.setnode.reset.retain.return.renew.refresh.rebuild.recalculate.revalidate.unload.hint.alert.help.value.item.itemset.copy.choices.filename.show.hide.method.resource.header.mediatype.message.control.', concat('.', local-name(), '.'))"> And now it works ok. Best Regards, Javier |
From: Javier Diazestebaranz(UST,ES) <Jav...@us...> - 2021-06-14 07:15:40
|
Hi Alain, in my case we are using xalan (http://xalan.apache.org/), it's a java project. If I have spare time, I will try to check it with saxon. Best regards, Javier El 13/6/21 a las 17:55, Alain Couthures escribió: EXTERNAL EMAIL - Do not click any links or open any attachments unless you trust the sender and know the content is safe. Hi Javier, Thank you for fixing this issue with the XSLT transformation when performed at server side. I would like to know which XSLT engine you are using because browsers are not impacted (valid HTML serialization). Extra non-breakable spaces can be avoided for browsers but, maybe, also with other XSLT engines... Kind regards --Alain Le 11/06/2021 02:38, Javier Diazestebaranz(UST, ES) via Xsltforms-support <xsl...@li...><mailto:xsl...@li...> a écrit : Hi again, forget my previous email, I have read in a previous Alain's email in this list the following : "HTML5 also considers that custom elements cannot be written with the auto-close notation." and I have realized that the problem is that instead putting: <xforms-label xf-ref="elm[1]"/> it should be '<xforms-label xf-ref="elm[1]"></xforms-label>' We generate the html pages executing xslt in server side, using xsltforms.xsl and then sending html to server, so the problem was in that transformation. I have solved the problem doing the following change in xsltforms.xsl @@ -363,7 +363,12 @@ </xsl:when> </xsl:choose> </xsl:for-each> + <xsl:choose> + <xsl:when test="node()"> <xsl:apply-templates select="node()"/> + </xsl:when> + <xsl:otherwise> </xsl:otherwise> + </xsl:choose> </xsl:element> </xsl:when> <xsl:when test="contains('.setvalue.insert.delete.update.dispatch.property.targetid.name.action.load.toggle.send.setfocus.wrap.setselection.setindex.setnode.reset.retain.return.renew.refresh.rebuild.recalculate.revalidate.unload.hint.alert.help.value.item.itemset.copy.choices.filename.show.hide.method.resource.header.mediatype.message.control.', concat('.', local-name(), '.'))"> @@ -404,7 +409,12 @@ </xsl:when> </xsl:choose> </xsl:for-each> + <xsl:choose> + <xsl:when test="node()"> <xsl:apply-templates select="node()"/> + </xsl:when> + <xsl:otherwise> </xsl:otherwise> + </xsl:choose> </xsl:element> </xsl:when> <xsl:otherwise> So I force to insert at least a blank space to guarantee that there isn't any auto-close notation and all the previously mentioned problems have been solved!. Best Regards, Javier El 10/6/21 a las 19:21, Javier Diazestebaranz(UST, ES) via Xsltforms-support escribió: EXTERNAL EMAIL - Do not click any links or open any attachments unless you trust the sender and know the content is safe. Hello Steven, thanks a lot for your help. First of all, I have realized that I sent a wrong test case. In the setvalue 'error' I sent you the following: '<xforms-setvalue xf-ref="instance('salida')/datosTarea/numeroOrden" xf-value="aa"/>' instead '<xforms-setvalue xf-ref="instance('salida')/datosTarea/numeroOrden" xf-value=""/>. The original XForms source was as you thought, '<setvalue ref="foo" value=""/>'. It seems that older version ignored that emtpy value and cleared the value of the element in that case. We have corrected it (with <setvalue ref="foo"/>) and now it doesn't fail. The other problem related with 'bind', I also sent a bad test case. We have discovered that it only fails when 'bind' elements are not at the end of model part. So, if you put: (..) <xforms-submission id="enviar" xf-method="get" xf-mode="synchronous" xf-ref="instance('salida')/datosTarea" xf-resource="fake"> <xforms-action ev-event="xforms-submit-error"> <xforms-setvalue xf-ref="instance('salida')/datosTarea/numeroOrden"/> </xforms-action> </xforms-submission> <xforms-bind id="bind_numeroOrden" xf-ref="instance('salida')/datosTarea/numeroOrden" xf-required="true()" xf-type="xsd:string"/> </xforms-model> (...) It works ok, but if you put: (...) <xforms-bind id="bind_numeroOrden" xf-ref="instance('salida')/datosTarea/numeroOrden" xf-required="true()" xf-type="xsd:string"/> <xforms-submission id="enviar" xf-method="get" xf-mode="synchronous" xf-ref="instance('salida')/datosTarea" xf-resource="fake"> <xforms-action ev-event="xforms-submit-error"> <xforms-setvalue xf-ref="instance('salida')/datosTarea/numeroOrden"/> </xforms-action> </xforms-submission> </xforms-model> (...) It fails. Is there any rule about the order of the model elements? In older version we mixed them and there wasn't any error. We have also found another problem, regarding select1 and itemset, recovering the values from other instance (I send a testcase about this problem). If I put: <xforms-itemset xf-ref="instance('inst_tarea')/vct"> <xforms-label xf-ref="elm[1]"/> <xforms-value xf-ref="elm[2]"/> </xforms-itemset> Label is shown but value it is not processed and a 'undefined' value appears if I choose some element. If I change the order of the elements: <xforms-itemset xf-ref="instance('inst_tarea')/vct"> <xforms-value xf-ref="elm[2]"/> <xforms-label xf-ref="elm[1]"/> </xforms-itemset> There is no label shown, but the value is selected correctly. We have tried to change it in another way, but we had no luck. Thank you, Javier El 10/6/21 a las 10:29, Steven Pemberton escribió: On Thu, 10 Jun 2021 01:19:45 +0200, Javier Diazestebaranz(UST, ES) via Xsltforms-support <xsl...@li...><mailto:xsl...@li...> wrote: Hello, we are using a very ,very old Xsltforms implementation (r574, more than 8 years ago) with some local changes, and we want to migrate to last stable version. Before starting the migration, I have been testing some of our xforms pages with last version (downloaded from here: https://github.com/AlainCouthures/declarative4all/blob/master/public/direct/xsltforms.zip , I m not sure if it is a stable one), and I came across some problems. I have made a small test case, to check if we have some error in our code, there have been some syntax changes in xforms and we have to modify our code, or there is some error in last xsltform version, I hope somebody can help us. I send attached the code (submission.html). We use the .xml version (we don't want to rewrite all our old code), but i think is easier to analyse the problem with .html version. * The first error that appears when the form load is: XSLTForms Exception -------------------------- Error parsing the following XPath expression : Unexpected char at '' It seems this line have some problem, because when I comment out it, the error dissapears: <xforms-setvalue xf-ref="instance('salida')/datosTarea/numeroOrden" xf-value=""/> So this is the generated code, not your original XForms source, so I'm guessing here, but to set a value to the empty string, you use either <setvalue ref="foo" value="''"/> or equally good <setvalue ref="foo"/> This is not good: <setvalue ref="foo" value=""/> because @value has to be an expression. Steven _______________________________________________ Xsltforms-support mailing list Xsl...@li...<mailto:Xsl...@li...> https://lists.sourceforge.net/lists/listinfo/xsltforms-support _______________________________________________ Xsltforms-support mailing list Xsl...@li...<mailto:Xsl...@li...> https://lists.sourceforge.net/lists/listinfo/xsltforms-support |
From: Alain C. <ala...@ag...> - 2021-06-13 16:21:12
|
<!doctype html> <html> <head> <meta charset="UTF-8"> </head> <body> <div> Hi Javier, </div> <div class="default-style"> <br> </div> <div class="default-style"> Thank you for fixing this issue with the XSLT transformation when performed at server side. </div> <div class="default-style"> <br> </div> <div class="default-style"> I would like to know which XSLT engine you are using because browsers are not impacted (valid HTML serialization). </div> <div class="default-style"> <br> </div> <div class="default-style"> Extra non-breakable spaces can be avoided for browsers but, maybe, also with other XSLT engines... </div> <div class="default-style"> <br> </div> <div class="default-style"> Kind regards </div> <div class="default-style"> <br> </div> <div class="default-style"> --Alain </div> <blockquote type="cite"> <div> Le 11/06/2021 02:38, Javier Diazestebaranz(UST, ES) via Xsltforms-support <xsl...@li...> a écrit : </div> <div> <br> </div> <div> <br> </div>Hi again, <br> <br>forget my previous email, I have read in a previous Alain's email in this list the following : "HTML5 also considers that custom elements cannot be written with the auto-close notation." and I have realized that the problem is that instead putting: <xforms-label xf-ref="elm[1]"/> it should be '<xforms-label xf-ref="elm[1]"></xforms-label>' <br> <br>We generate the html pages executing xslt in server side, using xsltforms.xsl and then sending html to server, so the problem was in that transformation. <br> <br>I have solved the problem doing the following change in xsltforms.xsl <br> <br><span style="font-family: monospace;">@@ -363,7 +363,12 @@<br> </xsl:when><br> </xsl:choose><br> </xsl:for-each><br>+ <xsl:choose><br>+ <xsl:when test="node()"><br> <xsl:apply-templates select="node()"/><br>+ </xsl:when><br>+ <xsl:otherwise>&#160;</xsl:otherwise><br>+ </xsl:choose><br> </xsl:element><br> </xsl:when><br> <xsl:when test="contains('.setvalue.insert.delete.update.dispatch.property.targetid.name.action.load.toggle.send.setfocus.wrap.setselection.setindex.setnode.reset.retain.return.renew.refresh.rebuild.recalculate.revalidate.unload.hint.alert.help.value.item.itemset.copy.choices.filename.show.hide.method.resource.header.mediatype.message.control.', concat('.', local-name(), '.'))"><br>@@ -404,7 +409,12 @@<br> </xsl:when><br> </xsl:choose><br> </xsl:for-each><br>+ <xsl:choose><br>+ <xsl:when test="node()"><br> <xsl:apply-templates select="node()"/><br>+ </xsl:when><br>+ <xsl:otherwise>&#160;</xsl:otherwise><br>+ </xsl:choose><br> </xsl:element><br> </xsl:when><br> <xsl:otherwise></span> <br> <br>So I force to insert at least a blank space to guarantee that there isn't any auto-close notation and all the previously mentioned problems have been solved!. <br> <br>Best Regards, <br>Javier <br> <br> <div class="moz-cite-prefix"> El 10/6/21 a las 19:21, Javier Diazestebaranz(UST, ES) via Xsltforms-support escribió: <br> </div> <blockquote type="cite"> <p><br></p> <p style="margin: 0cm 0cm 8pt;"><strong><span style="background: silver; color: #e65e0a; line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10pt; mso-highlight: silver;">EXTERNAL EMAIL</span></strong><span style="background: #f1ebe5; line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10pt; mso-highlight: silver;"> - <span style="color: black;">Do not click any links or open any attachments unless you trust the sender and know the content is safe</span></span><span style="line-height: 107%; font-family: 'Arial',sans-serif; font-size: 10pt;">.</span></p> <p><br></p>Hello Steven, <br> <br>thanks a lot for your help. <br> <br>First of all, I have realized that I sent a wrong test case. In the setvalue 'error' I sent you the following: '<xforms-setvalue xf-ref="instance('salida')/datosTarea/numeroOrden" xf-value="aa"/>' instead '<xforms-setvalue xf-ref="instance('salida')/datosTarea/numeroOrden" xf-value=""/>. The original XForms source was as you thought, '<setvalue ref="foo" value=""/>'. It seems that older version ignored that emtpy value and cleared the value of the element in that case. We have corrected it (with <setvalue ref="foo"/>) and now it doesn't fail. <br> <br>The other problem related with 'bind', I also sent a bad test case. We have discovered that it only fails when 'bind' elements are not at the end of model part. So, if you put: <br> <br>(..) <br> <xforms-submission id="enviar" xf-method="get" xf-mode="synchronous" xf-ref="instance('salida')/datosTarea" xf-resource="fake"> <br> <xforms-action ev-event="xforms-submit-error"> <br> <xforms-setvalue xf-ref="instance('salida')/datosTarea/numeroOrden"/> <br> </xforms-action> <br> </xforms-submission> <br> <xforms-bind id="bind_numeroOrden" xf-ref="instance('salida')/datosTarea/numeroOrden" xf-required="true()" xf-type="xsd:string"/> <br> </xforms-model> <br>(...) <br> <br>It works ok, but if you put: <br> <br>(...) <br> <xforms-bind id="bind_numeroOrden" xf-ref="instance('salida')/datosTarea/numeroOrden" xf-required="true()" xf-type="xsd:string"/> <br> <xforms-submission id="enviar" xf-method="get" xf-mode="synchronous" xf-ref="instance('salida')/datosTarea" xf-resource="fake"> <br> <xforms-action ev-event="xforms-submit-error"> <br> <xforms-setvalue xf-ref="instance('salida')/datosTarea/numeroOrden"/> <br> </xforms-action> <br> </xforms-submission> <br> </xforms-model> <br>(...) <br> <br>It fails. Is there any rule about the order of the model elements? In older version we mixed them and there wasn't any error. <br> <br>We have also found another problem, regarding select1 and itemset, recovering the values from other instance (I send a testcase about this problem). If I put: <br> <br> <xforms-itemset xf-ref="instance('inst_tarea')/vct"> <br> <xforms-label xf-ref="elm[1]"/> <br> <xforms-value xf-ref="elm[2]"/> <br> </xforms-itemset> <br> <br>Label is shown but value it is not processed and a 'undefined' value appears if I choose some element. If I change the order of the elements: <br> <br> <xforms-itemset xf-ref="instance('inst_tarea')/vct"> <br> <xforms-value xf-ref="elm[2]"/> <br> <xforms-label xf-ref="elm[1]"/> <br> </xforms-itemset> <br> <br>There is no label shown, but the value is selected correctly. We have tried to change it in another way, but we had no luck. <br> <br>Thank you, <br>Javier <br> <br> <div class="moz-cite-prefix"> El 10/6/21 a las 10:29, Steven Pemberton escribió: <br> </div> <blockquote type="cite"> On Thu, 10 Jun 2021 01:19:45 +0200, Javier Diazestebaranz(UST, ES) via Xsltforms-support <a href="mailto:xsl...@li..." class="moz-txt-link-rfc2396E"> <xsl...@li...></a> wrote: <br> <br> <blockquote> Hello, <br> <br>we are using a very ,very old Xsltforms implementation (r574, more than 8 years ago) with some local changes, and we want to migrate to last stable version. <br> <br>Before starting the migration, I have been testing some of our xforms pages with last version (downloaded from here: <a href="https://github.com/AlainCouthures/declarative4all/blob/master/public/direct/xsltforms.zip" class="moz-txt-link-freetext"> https://github.com/AlainCouthures/declarative4all/blob/master/public/direct/xsltforms.zip</a> , I m not sure if it is a stable one), and I came across some problems. <br> <br>I have made a small test case, to check if we have some error in our code, there have been some syntax changes in xforms and we have to modify our code, or there is some error in last xsltform version, I hope somebody can help us. <br> <br>I send attached the code (submission.html). We use the .xml version (we don't want to rewrite all our old code), but i think is easier to analyse the problem with .html version. <br> <br>* The first error that appears when the form load is: <br> <br><span style="font-family: monospace;">XSLTForms Exception<br>--------------------------<br><br>Error parsing the following XPath expression :<br><br><br><br>Unexpected char at ''</span> <br> <br>It seems this line have some problem, because when I comment out it, the error dissapears: <br> <br><xforms-setvalue xf-ref="instance('salida')/datosTarea/numeroOrden" xf-value=""/> </blockquote> <div> So this is the generated code, not your original XForms source, so I'm guessing here, but to set a value to the empty string, you use either </div> <div> <br> </div> <div> <setvalue ref="foo" value="''"/> </div> <div> <br> </div> <div> or equally good </div> <div> <br> </div> <div> <div> <setvalue ref="foo"/> </div> <div> <br> </div> <div> This is not good: </div> <div> <br> </div> <div> <div> <setvalue ref="foo" value=""/> </div> <div> <br> </div> <div> because @value has to be an expression. </div> <div> <br> </div> <div> Steven </div> </div> </div> </blockquote> <br> <br> <br> <pre class="moz-quote-pre">_______________________________________________ Xsltforms-support mailing list <a href="mailto:Xsl...@li..." class="moz-txt-link-abbreviated">Xsl...@li...</a> <a href="https://lists.sourceforge.net/lists/listinfo/xsltforms-support" class="moz-txt-link-freetext">https://lists.sourceforge.net/lists/listinfo/xsltforms-support</a> </pre> </blockquote> <br>_______________________________________________ Xsltforms-support mailing list Xsl...@li... https://lists.sourceforge.net/lists/listinfo/xsltforms-support </blockquote> </body> </html> |
From: Javier Diazestebaranz(UST,ES) <Jav...@us...> - 2021-06-11 00:54:21
|
Hi again, forget my previous email, I have read in a previous Alain's email in this list the following : "HTML5 also considers that custom elements cannot be written with the auto-close notation." and I have realized that the problem is that instead putting: <xforms-label xf-ref="elm[1]"/> it should be '<xforms-label xf-ref="elm[1]"></xforms-label>' We generate the html pages executing xslt in server side, using xsltforms.xsl and then sending html to server, so the problem was in that transformation. I have solved the problem doing the following change in xsltforms.xsl @@ -363,7 +363,12 @@ </xsl:when> </xsl:choose> </xsl:for-each> + <xsl:choose> + <xsl:when test="node()"> <xsl:apply-templates select="node()"/> + </xsl:when> + <xsl:otherwise> </xsl:otherwise> + </xsl:choose> </xsl:element> </xsl:when> <xsl:when test="contains('.setvalue.insert.delete.update.dispatch.property.targetid.name.action.load.toggle.send.setfocus.wrap.setselection.setindex.setnode.reset.retain.return.renew.refresh.rebuild.recalculate.revalidate.unload.hint.alert.help.value.item.itemset.copy.choices.filename.show.hide.method.resource.header.mediatype.message.control.', concat('.', local-name(), '.'))"> @@ -404,7 +409,12 @@ </xsl:when> </xsl:choose> </xsl:for-each> + <xsl:choose> + <xsl:when test="node()"> <xsl:apply-templates select="node()"/> + </xsl:when> + <xsl:otherwise> </xsl:otherwise> + </xsl:choose> </xsl:element> </xsl:when> <xsl:otherwise> So I force to insert at least a blank space to guarantee that there isn't any auto-close notation and all the previously mentioned problems have been solved!. Best Regards, Javier El 10/6/21 a las 19:21, Javier Diazestebaranz(UST, ES) via Xsltforms-support escribió: EXTERNAL EMAIL - Do not click any links or open any attachments unless you trust the sender and know the content is safe. Hello Steven, thanks a lot for your help. First of all, I have realized that I sent a wrong test case. In the setvalue 'error' I sent you the following: '<xforms-setvalue xf-ref="instance('salida')/datosTarea/numeroOrden" xf-value="aa"/>' instead '<xforms-setvalue xf-ref="instance('salida')/datosTarea/numeroOrden" xf-value=""/>. The original XForms source was as you thought, '<setvalue ref="foo" value=""/>'. It seems that older version ignored that emtpy value and cleared the value of the element in that case. We have corrected it (with <setvalue ref="foo"/>) and now it doesn't fail. The other problem related with 'bind', I also sent a bad test case. We have discovered that it only fails when 'bind' elements are not at the end of model part. So, if you put: (..) <xforms-submission id="enviar" xf-method="get" xf-mode="synchronous" xf-ref="instance('salida')/datosTarea" xf-resource="fake"> <xforms-action ev-event="xforms-submit-error"> <xforms-setvalue xf-ref="instance('salida')/datosTarea/numeroOrden"/> </xforms-action> </xforms-submission> <xforms-bind id="bind_numeroOrden" xf-ref="instance('salida')/datosTarea/numeroOrden" xf-required="true()" xf-type="xsd:string"/> </xforms-model> (...) It works ok, but if you put: (...) <xforms-bind id="bind_numeroOrden" xf-ref="instance('salida')/datosTarea/numeroOrden" xf-required="true()" xf-type="xsd:string"/> <xforms-submission id="enviar" xf-method="get" xf-mode="synchronous" xf-ref="instance('salida')/datosTarea" xf-resource="fake"> <xforms-action ev-event="xforms-submit-error"> <xforms-setvalue xf-ref="instance('salida')/datosTarea/numeroOrden"/> </xforms-action> </xforms-submission> </xforms-model> (...) It fails. Is there any rule about the order of the model elements? In older version we mixed them and there wasn't any error. We have also found another problem, regarding select1 and itemset, recovering the values from other instance (I send a testcase about this problem). If I put: <xforms-itemset xf-ref="instance('inst_tarea')/vct"> <xforms-label xf-ref="elm[1]"/> <xforms-value xf-ref="elm[2]"/> </xforms-itemset> Label is shown but value it is not processed and a 'undefined' value appears if I choose some element. If I change the order of the elements: <xforms-itemset xf-ref="instance('inst_tarea')/vct"> <xforms-value xf-ref="elm[2]"/> <xforms-label xf-ref="elm[1]"/> </xforms-itemset> There is no label shown, but the value is selected correctly. We have tried to change it in another way, but we had no luck. Thank you, Javier El 10/6/21 a las 10:29, Steven Pemberton escribió: On Thu, 10 Jun 2021 01:19:45 +0200, Javier Diazestebaranz(UST, ES) via Xsltforms-support <xsl...@li...><mailto:xsl...@li...> wrote: Hello, we are using a very ,very old Xsltforms implementation (r574, more than 8 years ago) with some local changes, and we want to migrate to last stable version. Before starting the migration, I have been testing some of our xforms pages with last version (downloaded from here: https://github.com/AlainCouthures/declarative4all/blob/master/public/direct/xsltforms.zip , I m not sure if it is a stable one), and I came across some problems. I have made a small test case, to check if we have some error in our code, there have been some syntax changes in xforms and we have to modify our code, or there is some error in last xsltform version, I hope somebody can help us. I send attached the code (submission.html). We use the .xml version (we don't want to rewrite all our old code), but i think is easier to analyse the problem with .html version. * The first error that appears when the form load is: XSLTForms Exception -------------------------- Error parsing the following XPath expression : Unexpected char at '' It seems this line have some problem, because when I comment out it, the error dissapears: <xforms-setvalue xf-ref="instance('salida')/datosTarea/numeroOrden" xf-value=""/> So this is the generated code, not your original XForms source, so I'm guessing here, but to set a value to the empty string, you use either <setvalue ref="foo" value="''"/> or equally good <setvalue ref="foo"/> This is not good: <setvalue ref="foo" value=""/> because @value has to be an expression. Steven _______________________________________________ Xsltforms-support mailing list Xsl...@li...<mailto:Xsl...@li...> https://lists.sourceforge.net/lists/listinfo/xsltforms-support |
From: Javier Diazestebaranz(UST,ES) <Jav...@us...> - 2021-06-10 17:21:30
|
Hello Steven, thanks a lot for your help. First of all, I have realized that I sent a wrong test case. In the setvalue 'error' I sent you the following: '<xforms-setvalue xf-ref="instance('salida')/datosTarea/numeroOrden" xf-value="aa"/>' instead '<xforms-setvalue xf-ref="instance('salida')/datosTarea/numeroOrden" xf-value=""/>. The original XForms source was as you thought, '<setvalue ref="foo" value=""/>'. It seems that older version ignored that emtpy value and cleared the value of the element in that case. We have corrected it (with <setvalue ref="foo"/>) and now it doesn't fail. The other problem related with 'bind', I also sent a bad test case. We have discovered that it only fails when 'bind' elements are not at the end of model part. So, if you put: (..) <xforms-submission id="enviar" xf-method="get" xf-mode="synchronous" xf-ref="instance('salida')/datosTarea" xf-resource="fake"> <xforms-action ev-event="xforms-submit-error"> <xforms-setvalue xf-ref="instance('salida')/datosTarea/numeroOrden"/> </xforms-action> </xforms-submission> <xforms-bind id="bind_numeroOrden" xf-ref="instance('salida')/datosTarea/numeroOrden" xf-required="true()" xf-type="xsd:string"/> </xforms-model> (...) It works ok, but if you put: (...) <xforms-bind id="bind_numeroOrden" xf-ref="instance('salida')/datosTarea/numeroOrden" xf-required="true()" xf-type="xsd:string"/> <xforms-submission id="enviar" xf-method="get" xf-mode="synchronous" xf-ref="instance('salida')/datosTarea" xf-resource="fake"> <xforms-action ev-event="xforms-submit-error"> <xforms-setvalue xf-ref="instance('salida')/datosTarea/numeroOrden"/> </xforms-action> </xforms-submission> </xforms-model> (...) It fails. Is there any rule about the order of the model elements? In older version we mixed them and there wasn't any error. We have also found another problem, regarding select1 and itemset, recovering the values from other instance (I send a testcase about this problem). If I put: <xforms-itemset xf-ref="instance('inst_tarea')/vct"> <xforms-label xf-ref="elm[1]"/> <xforms-value xf-ref="elm[2]"/> </xforms-itemset> Label is shown but value it is not processed and a 'undefined' value appears if I choose some element. If I change the order of the elements: <xforms-itemset xf-ref="instance('inst_tarea')/vct"> <xforms-value xf-ref="elm[2]"/> <xforms-label xf-ref="elm[1]"/> </xforms-itemset> There is no label shown, but the value is selected correctly. We have tried to change it in another way, but we had no luck. Thank you, Javier El 10/6/21 a las 10:29, Steven Pemberton escribió: On Thu, 10 Jun 2021 01:19:45 +0200, Javier Diazestebaranz(UST, ES) via Xsltforms-support <xsl...@li...><mailto:xsl...@li...> wrote: Hello, we are using a very ,very old Xsltforms implementation (r574, more than 8 years ago) with some local changes, and we want to migrate to last stable version. Before starting the migration, I have been testing some of our xforms pages with last version (downloaded from here: https://github.com/AlainCouthures/declarative4all/blob/master/public/direct/xsltforms.zip , I m not sure if it is a stable one), and I came across some problems. I have made a small test case, to check if we have some error in our code, there have been some syntax changes in xforms and we have to modify our code, or there is some error in last xsltform version, I hope somebody can help us. I send attached the code (submission.html). We use the .xml version (we don't want to rewrite all our old code), but i think is easier to analyse the problem with .html version. * The first error that appears when the form load is: XSLTForms Exception -------------------------- Error parsing the following XPath expression : Unexpected char at '' It seems this line have some problem, because when I comment out it, the error dissapears: <xforms-setvalue xf-ref="instance('salida')/datosTarea/numeroOrden" xf-value=""/> So this is the generated code, not your original XForms source, so I'm guessing here, but to set a value to the empty string, you use either <setvalue ref="foo" value="''"/> or equally good <setvalue ref="foo"/> This is not good: <setvalue ref="foo" value=""/> because @value has to be an expression. Steven |
From: Steven P. <ste...@cw...> - 2021-06-10 08:29:24
|
On Thu, 10 Jun 2021 01:19:45 +0200, Javier Diazestebaranz(UST, ES) via Xsltforms-support <xsl...@li...> wrote: > Hello, > > we are using a very ,very old Xsltforms implementation (r574, more than > 8 years ago) with some local changes, and we want to >migrate to last > stable version. > > Before starting the migration, I have been testing some of our xforms > pages with last version (downloaded from here: > https://>github.com/AlainCouthures/declarative4all/blob/master/public/direct/xsltforms.zip > , I m not sure if it is a stable one), and >I came across some problems. > > I have made a small test case, to check if we have some error in our > code, there have been some syntax changes in xforms and >we have to > modify our code, or there is some error in last xsltform version, I hope > somebody can help us. > > I send attached the code (submission.html). We use the .xml version (we > don't want to rewrite all our old code), but i think >is easier to > analyse the problem with .html version. > > * The first error that appears when the form load is: > > XSLTForms Exception > -------------------------- > > Error parsing the following XPath expression : > > > > Unexpected char at '' > > It seems this line have some problem, because when I comment out it, the > error dissapears: > > <xforms-setvalue xf-ref="instance('salida')/datosTarea/numeroOrden" > xf-value=""/> So this is the generated code, not your original XForms source, so I'm guessing here, but to set a value to the empty string, you use either <setvalue ref="foo" value="''"/> or equally good <setvalue ref="foo"/> This is not good: <setvalue ref="foo" value=""/> because @value has to be an expression. Steven |