xsltforms-support Mailing List for XSLTForms (Page 33)
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: William V. <wve...@vi...> - 2013-05-10 15:19:44
|
XForms 2.0 defines variables in actions that you can use in the submission attribute of the xf:send action or any other attribute of actions, but I think it is not implemented in XSLTForms yet. Another posibility could be AVTs, but XSLTForms only support them for HTML content. Maybe somebody else in the list has another idea that can be used with XSLTForms. William David Velásquez Director de I+D Visión Tecnológica S.A.S. Tel: (4) 444 7292 Cel: 313 743 54 11 wve...@vi... ________________________________________ De: peter winstanley [p....@in...] Enviado: jueves, 09 de mayo de 2013 05:09 p.m. Para: William Velasquez; xsl...@li... Asunto: Re: [Xsltforms-support] Models and best practice for submission confirmation Hi William This is really useful stuff, but perhaps I didn't define my question well enough. I was wondering if it is possible to set up this 'confirmation' methodology to take a variable that is the name/id of the submission (or any other action that requires confirmation), so that I could use the same "yes/no" dialogue to cover 'dopost', 'dosomeotherpost', 'doadelete', or any other type of submission etc Cheers Peter > -----Original Message----- > From: wve...@vi... > Sent: Thu, 9 May 2013 20:22:18 +0000 > To: p....@in..., xsl...@li... > Subject: Re: [Xsltforms-support] Models and best practice for submission > confirmation > > You can use a JavaScript function and call it from the xf:if attribute of > the action. > > Put this script inside the <head> of your page: > > <script type="text/javascript"><![CDATA[ > var shouldsave = function(msg){ > return confirm(msg) ? "true" : "false"; > }; > ]]></script> > > > And use an xf:trigger with the xf:send action for the submission, with > the if attribute: > > <xf:trigger> > <xf:label>Save</xf:label> > <xf:action ev:event="DOMActivate" if="shouldsave('Are you sure?') = > true()" > > <xf:send submission="dopost"/> > </xf:action> > </xf:trigger> > > > > * Note that calling JavaScript from XPath expressions only works after > XSLTForms 1.0 > > William David Velásquez > Director de I+D > Visión Tecnológica S.A.S. > Tel: (4) 444 7292 > Cel: 313 743 54 11 > wve...@vi... > ________________________________________ > De: peter winstanley [p....@in...] > Enviado: miércoles, 08 de mayo de 2013 05:46 p.m. > Para: William Velasquez; xsl...@li... > Asunto: Re: [Xsltforms-support] Models and best practice for submission > confirmation > > Hi William, > > Thanks ... that is about the simplest pattern I have seen. > > Would it be possible to turn the "confirm" dialog into a sort of function > e.g. taking the identity of submission from a value in an instance node, > perhaps? > > Cheers > > Peter > >> -----Original Message----- >> From: wve...@vi... >> Sent: Wed, 8 May 2013 21:09:56 +0000 >> To: p....@in..., xsl...@li... >> Subject: Re: [Xsltforms-support] Models and best practice for submission >> confirmation >> >> You can do it using a xf:dialog with a xf:submit labeled "Yes" and a >> xf:trigger labeled "No" that closes the dialog. >> >> Below is the code: >> >> >> <xf:trigger> >> <xf:label>Save</xf:label> >> <xf:action ev:event="DOMActivate"> >> <xf:show dialog="confirm"/> >> </xf:action> >> </xf:trigger> >> >> <xf:dialog id="confirm"> >> <span>Are you sure?</span> >> <xf:submit submission="dopost"> >> <xf:label>Yes</xf:label> >> </xf:submit> >> <xf:trigger> >> <xf:label>No</xf:label> >> <xf:action ev:event="DOMActivate"> >> <xf:hide dialog="confirm"/> >> </xf:action> >> </xf:trigger> >> </xf:dialog> >> >> William David Velásquez >> Director de I+D >> Visión Tecnológica S.A.S. >> Tel: (4) 444 7292 >> Cel: 313 743 54 11 >> wve...@vi... >> ________________________________________ >> De: peter winstanley [p....@in...] >> Enviado: miércoles, 08 de mayo de 2013 11:53 a.m. >> Para: XSLTForms support >> Asunto: [Xsltforms-support] Models and best practice for submission >> confirmation >> >> Hello List >> >> Are there any good examples illustrating the best way to implement a >> confirmation dialogue for a submission event (asking the user if they >> want to continue, and reverting to the form if they don't)? >> >> Many thanks >> >> Peter >> >> ____________________________________________________________ >> FREE 3D MARINE AQUARIUM SCREENSAVER - Watch dolphins, sharks & orcas on >> your desktop! >> Check it out at http://www.inbox.com/marineaquarium >> >> >> >> ------------------------------------------------------------------------------ >> Learn Graph Databases - Download FREE O'Reilly Book >> "Graph Databases" is the definitive new guide to graph databases and >> their applications. This 200-page book is written by three acclaimed >> leaders in the field. The early access version is available now. >> Download your free book today! http://p.sf.net/sfu/neotech_d2d_may >> _______________________________________________ >> Xsltforms-support mailing list >> Xsl...@li... >> https://lists.sourceforge.net/lists/listinfo/xsltforms-support > > ____________________________________________________________ > GET FREE SMILEYS FOR YOUR IM & EMAIL - Learn more at > http://www.inbox.com/smileys > Works with AIM®, MSN® Messenger, Yahoo!® Messenger, ICQ®, Google Talk™ > and most webmails ____________________________________________________________ FREE 3D EARTH SCREENSAVER - Watch the Earth right on your desktop! Check it out at http://www.inbox.com/earth |
From: peter w. <p....@in...> - 2013-05-09 22:09:50
|
Hi William This is really useful stuff, but perhaps I didn't define my question well enough. I was wondering if it is possible to set up this 'confirmation' methodology to take a variable that is the name/id of the submission (or any other action that requires confirmation), so that I could use the same "yes/no" dialogue to cover 'dopost', 'dosomeotherpost', 'doadelete', or any other type of submission etc Cheers Peter > -----Original Message----- > From: wve...@vi... > Sent: Thu, 9 May 2013 20:22:18 +0000 > To: p....@in..., xsl...@li... > Subject: Re: [Xsltforms-support] Models and best practice for submission > confirmation > > You can use a JavaScript function and call it from the xf:if attribute of > the action. > > Put this script inside the <head> of your page: > > <script type="text/javascript"><![CDATA[ > var shouldsave = function(msg){ > return confirm(msg) ? "true" : "false"; > }; > ]]></script> > > > And use an xf:trigger with the xf:send action for the submission, with > the if attribute: > > <xf:trigger> > <xf:label>Save</xf:label> > <xf:action ev:event="DOMActivate" if="shouldsave('Are you sure?') = > true()" > > <xf:send submission="dopost"/> > </xf:action> > </xf:trigger> > > > > * Note that calling JavaScript from XPath expressions only works after > XSLTForms 1.0 > > William David Velásquez > Director de I+D > Visión Tecnológica S.A.S. > Tel: (4) 444 7292 > Cel: 313 743 54 11 > wve...@vi... > ________________________________________ > De: peter winstanley [p....@in...] > Enviado: miércoles, 08 de mayo de 2013 05:46 p.m. > Para: William Velasquez; xsl...@li... > Asunto: Re: [Xsltforms-support] Models and best practice for submission > confirmation > > Hi William, > > Thanks ... that is about the simplest pattern I have seen. > > Would it be possible to turn the "confirm" dialog into a sort of function > e.g. taking the identity of submission from a value in an instance node, > perhaps? > > Cheers > > Peter > >> -----Original Message----- >> From: wve...@vi... >> Sent: Wed, 8 May 2013 21:09:56 +0000 >> To: p....@in..., xsl...@li... >> Subject: Re: [Xsltforms-support] Models and best practice for submission >> confirmation >> >> You can do it using a xf:dialog with a xf:submit labeled "Yes" and a >> xf:trigger labeled "No" that closes the dialog. >> >> Below is the code: >> >> >> <xf:trigger> >> <xf:label>Save</xf:label> >> <xf:action ev:event="DOMActivate"> >> <xf:show dialog="confirm"/> >> </xf:action> >> </xf:trigger> >> >> <xf:dialog id="confirm"> >> <span>Are you sure?</span> >> <xf:submit submission="dopost"> >> <xf:label>Yes</xf:label> >> </xf:submit> >> <xf:trigger> >> <xf:label>No</xf:label> >> <xf:action ev:event="DOMActivate"> >> <xf:hide dialog="confirm"/> >> </xf:action> >> </xf:trigger> >> </xf:dialog> >> >> William David Velásquez >> Director de I+D >> Visión Tecnológica S.A.S. >> Tel: (4) 444 7292 >> Cel: 313 743 54 11 >> wve...@vi... >> ________________________________________ >> De: peter winstanley [p....@in...] >> Enviado: miércoles, 08 de mayo de 2013 11:53 a.m. >> Para: XSLTForms support >> Asunto: [Xsltforms-support] Models and best practice for submission >> confirmation >> >> Hello List >> >> Are there any good examples illustrating the best way to implement a >> confirmation dialogue for a submission event (asking the user if they >> want to continue, and reverting to the form if they don't)? >> >> Many thanks >> >> Peter >> >> ____________________________________________________________ >> FREE 3D MARINE AQUARIUM SCREENSAVER - Watch dolphins, sharks & orcas on >> your desktop! >> Check it out at http://www.inbox.com/marineaquarium >> >> >> >> ------------------------------------------------------------------------------ >> Learn Graph Databases - Download FREE O'Reilly Book >> "Graph Databases" is the definitive new guide to graph databases and >> their applications. This 200-page book is written by three acclaimed >> leaders in the field. The early access version is available now. >> Download your free book today! http://p.sf.net/sfu/neotech_d2d_may >> _______________________________________________ >> Xsltforms-support mailing list >> Xsl...@li... >> https://lists.sourceforge.net/lists/listinfo/xsltforms-support > > ____________________________________________________________ > GET FREE SMILEYS FOR YOUR IM & EMAIL - Learn more at > http://www.inbox.com/smileys > Works with AIM®, MSN® Messenger, Yahoo!® Messenger, ICQ®, Google Talk™ > and most webmails ____________________________________________________________ FREE 3D EARTH SCREENSAVER - Watch the Earth right on your desktop! Check it out at http://www.inbox.com/earth |
From: <fr...@fl...> - 2013-05-09 20:55:00
|
Hi Peter, The way I do it is by adding a condition to the repeat nodeset, such as [position() >= instance('search')/from and position() <= instance('search')/to]" Where 'search' is an instance, specially defined for these 'utility' functions. Then with two triggers, 'previous' and 'next', I allow the user to manipulate the from and to values: <xf:setvalue ref="instance('search')/@from" value="if(instance('search')/@from>instance('search')/@number,instance('search')/@from - instance('search')/@number,1)"/> <xf:setvalue ref="instance('search')/@to" value="if(instance('search')/@from + instance('search')/@number<count(instance('id')/Item),instance('search')/@from + instance('search')/@number - 1,count(instance('id')/Item))"/> where @number is the number of items on a page. Not sure if this is the easiest way, but it works. Kind regards, Fred van Blommestein Citeren peter winstanley <p....@in...>: > Hello List > > Is there a way of paging through items in a repeat, one page at a > time? Is there an 'iterate' function that can be used for this? > > Cheers > > Peter > > ____________________________________________________________ > FREE ONLINE PHOTOSHARING - Share your photos online with your > friends and family! > Visit http://www.inbox.com/photosharing to find out more! > > > > ------------------------------------------------------------------------------ > Learn Graph Databases - Download FREE O'Reilly Book > "Graph Databases" is the definitive new guide to graph databases and > their applications. This 200-page book is written by three acclaimed > leaders in the field. The early access version is available now. > Download your free book today! http://p.sf.net/sfu/neotech_d2d_may > _______________________________________________ > Xsltforms-support mailing list > Xsl...@li... > https://lists.sourceforge.net/lists/listinfo/xsltforms-support > |
From: William V. <wve...@vi...> - 2013-05-09 20:38:44
|
You can use a JavaScript function and call it from the xf:if attribute of the action. Put this script inside the <head> of your page: <script type="text/javascript"><![CDATA[ var shouldsave = function(msg){ return confirm(msg) ? "true" : "false"; }; ]]></script> And use an xf:trigger with the xf:send action for the submission, with the if attribute: <xf:trigger> <xf:label>Save</xf:label> <xf:action ev:event="DOMActivate" if="shouldsave('Are you sure?') = true()" > <xf:send submission="dopost"/> </xf:action> </xf:trigger> * Note that calling JavaScript from XPath expressions only works after XSLTForms 1.0 William David Velásquez Director de I+D Visión Tecnológica S.A.S. Tel: (4) 444 7292 Cel: 313 743 54 11 wve...@vi... ________________________________________ De: peter winstanley [p....@in...] Enviado: miércoles, 08 de mayo de 2013 05:46 p.m. Para: William Velasquez; xsl...@li... Asunto: Re: [Xsltforms-support] Models and best practice for submission confirmation Hi William, Thanks ... that is about the simplest pattern I have seen. Would it be possible to turn the "confirm" dialog into a sort of function e.g. taking the identity of submission from a value in an instance node, perhaps? Cheers Peter > -----Original Message----- > From: wve...@vi... > Sent: Wed, 8 May 2013 21:09:56 +0000 > To: p....@in..., xsl...@li... > Subject: Re: [Xsltforms-support] Models and best practice for submission > confirmation > > You can do it using a xf:dialog with a xf:submit labeled "Yes" and a > xf:trigger labeled "No" that closes the dialog. > > Below is the code: > > > <xf:trigger> > <xf:label>Save</xf:label> > <xf:action ev:event="DOMActivate"> > <xf:show dialog="confirm"/> > </xf:action> > </xf:trigger> > > <xf:dialog id="confirm"> > <span>Are you sure?</span> > <xf:submit submission="dopost"> > <xf:label>Yes</xf:label> > </xf:submit> > <xf:trigger> > <xf:label>No</xf:label> > <xf:action ev:event="DOMActivate"> > <xf:hide dialog="confirm"/> > </xf:action> > </xf:trigger> > </xf:dialog> > > William David Velásquez > Director de I+D > Visión Tecnológica S.A.S. > Tel: (4) 444 7292 > Cel: 313 743 54 11 > wve...@vi... > ________________________________________ > De: peter winstanley [p....@in...] > Enviado: miércoles, 08 de mayo de 2013 11:53 a.m. > Para: XSLTForms support > Asunto: [Xsltforms-support] Models and best practice for submission > confirmation > > Hello List > > Are there any good examples illustrating the best way to implement a > confirmation dialogue for a submission event (asking the user if they > want to continue, and reverting to the form if they don't)? > > Many thanks > > Peter > > ____________________________________________________________ > FREE 3D MARINE AQUARIUM SCREENSAVER - Watch dolphins, sharks & orcas on > your desktop! > Check it out at http://www.inbox.com/marineaquarium > > > > ------------------------------------------------------------------------------ > Learn Graph Databases - Download FREE O'Reilly Book > "Graph Databases" is the definitive new guide to graph databases and > their applications. This 200-page book is written by three acclaimed > leaders in the field. The early access version is available now. > Download your free book today! http://p.sf.net/sfu/neotech_d2d_may > _______________________________________________ > Xsltforms-support mailing list > Xsl...@li... > https://lists.sourceforge.net/lists/listinfo/xsltforms-support ____________________________________________________________ GET FREE SMILEYS FOR YOUR IM & EMAIL - Learn more at http://www.inbox.com/smileys Works with AIM®, MSN® Messenger, Yahoo!® Messenger, ICQ®, Google Talk™ and most webmails |
From: Alain C. <ala...@ag...> - 2013-05-09 18:58:54
|
Hi Elias, > I'm trying to validate a field that holds a file name to be stored in > exist-db. I want to ensure only characters, numbers, space and . , _ > - characters are allowed. I know I can use not(contains()) like this: > > <xf:bind nodeset="instance('local')/FileName" type="xsd:string" > required="true()" > constraint="not(contains(.,'!')) and not(contains(.,'$'))"/> > > but that means doing for every character not allowed. Is there a > better way, like a regexp match? XSLTForms is not yet supporting XPath 2.0 and the matches() is not implemented (I can add it quite easily actually...). But, as a workaround, you can define a schema type for this. In the Test Suite, there is an example for a credit card number: <html xmlns:xforms="http://www.w3.org/2002/xforms"xmlns:my="http://commerce.example.com/payment"xmlns:xsd="http://www.w3.org/2001/XMLSchema"xmlns:txs="http://www.agencexml.com/txs"xmlns="http://www.w3.org/1999/xhtml"xmlns:xhtml="http://www.w3.org/1999/xhtml"> <head> <title>2.3.a Example: Value Constraints</title> <link rel="stylesheet"href="../driverPages/forms/TestSuite11.css <view-source:http://localhost/xsltforms/trunk/src/testsuite/w3c/1.1/tests/Edition1/driverPages/forms/TestSuite11.css>"type="text/css"/> <xforms:model> <xforms:instance> <my:payment xmlns="http://commerce.example.com/payment"method="cc"> <my:number/> <my:expiry/> </my:payment> </xforms:instance> <xforms:submission id="submit01"method="post"action="../../../../../../echo.php <view-source:http://localhost/xsltforms/trunk/src/echo.php>"/> <xforms:bind nodeset="/my:payment/my:number"relevant="/my:payment/@method = 'cc'"required="/my:payment/@method='cc'"type="my:ccnumber"/> <xforms:bind nodeset="/my:payment/my:expiry"relevant="/my:payment/@method = 'cc'"required="/my:payment/@method='cc'"type="xsd:gYearMonth"/> <xsd:schema targetNamespace="http://commerce.example.com/payment"> <xsd:simpleType name="ccnumber"> <xsd:restriction base="xsd:string"> <xsd:pattern value="\d{14,18}"/> </xsd:restriction> </xsd:simpleType> <xsd:element name="payment"> <xsd:complexType> <xsd:sequence> <xsd:element name="number"type="my:ccnumber"minOccurs="0"/> <xsd:element name="expiry"type="xsd:gYearMonth"minOccurs="0"/> </xsd:sequence> <xsd:attribute name="method"type="xsd:string"/> </xsd:complexType> </xsd:element> </xsd:schema> </xforms:model> </head> <body> <xforms:group> <xforms:label class="title">2.3.a Example: Value Constraints</xforms:label> </xforms:group> <xforms:group> <xforms:label> You must see a select1 control with the values "Cash" and "Credit" as well as two input controls on the page. The Credit Card Number and Expiration Date input controls are set to be relevant only when Credit is selected. If you have selected Cash then you must be able to submit the form and the input controls must have become unavailable. </xforms:label> </xforms:group> <xforms:group> <xforms:label> If you have selected Credit then you must not be able to submit the form until valid data is entered into both input controls. A valid entry for Credit Card Number is a positive number with 14-18 digits. A valid entry for the expiration date is a date in the format of gYearMonth, which is yyyy-mm (ex. 1998-12 for December 1998). </xforms:label> </xforms:group> <xforms:group> <xforms:label> When you activate the Submit Now submit control this page must be replaced by the form data. You must see the value "cc" and the values you entered in the Credit Card Number and Expiration Date input controls if you had selected Credit or the value "cash" if you had selected Cash. </xforms:label> </xforms:group> <xforms:select1 ref="@method"> <xforms:label>Select Payment Method:</xforms:label> <xforms:item> <xforms:label>Cash</xforms:label> <xforms:value>cash</xforms:value> </xforms:item> <xforms:item> <xforms:label>Credit</xforms:label> <xforms:value>cc</xforms:value> </xforms:item> </xforms:select1> <xforms:input ref="my:number"> <xforms:label>Credit Card Number:</xforms:label> </xforms:input> <xforms:input ref="/my:payment/my:expiry"> <xforms:label>Expiration Date:</xforms:label> </xforms:input> <xforms:submit submission="submit01"> <xforms:label>Submit Now</xforms:label> </xforms:submit> </body> </html> Thank you for your feedbacks! -Alain |
From: Elias M. <eli...@gm...> - 2013-05-09 17:57:32
|
Hi. I'm trying to validate a field that holds a file name to be stored in exist-db. I want to ensure only characters, numbers, space and . , _ - characters are allowed. I know I can use not(contains()) like this: <xf:bind nodeset="instance('local')/FileName" type="xsd:string" required="true()" constraint="not(contains(.,'!')) and not(contains(.,'$'))"/> but that means doing for every character not allowed. Is there a better way, like a regexp match? Thanks. Elias |
From: peter w. <p....@in...> - 2013-05-09 13:44:36
|
Hello List Is there a way of paging through items in a repeat, one page at a time? Is there an 'iterate' function that can be used for this? Cheers Peter ____________________________________________________________ FREE ONLINE PHOTOSHARING - Share your photos online with your friends and family! Visit http://www.inbox.com/photosharing to find out more! |
From: peter w. <p....@in...> - 2013-05-08 22:47:07
|
Hi William, Thanks ... that is about the simplest pattern I have seen. Would it be possible to turn the "confirm" dialog into a sort of function e.g. taking the identity of submission from a value in an instance node, perhaps? Cheers Peter > -----Original Message----- > From: wve...@vi... > Sent: Wed, 8 May 2013 21:09:56 +0000 > To: p....@in..., xsl...@li... > Subject: Re: [Xsltforms-support] Models and best practice for submission > confirmation > > You can do it using a xf:dialog with a xf:submit labeled "Yes" and a > xf:trigger labeled "No" that closes the dialog. > > Below is the code: > > > <xf:trigger> > <xf:label>Save</xf:label> > <xf:action ev:event="DOMActivate"> > <xf:show dialog="confirm"/> > </xf:action> > </xf:trigger> > > <xf:dialog id="confirm"> > <span>Are you sure?</span> > <xf:submit submission="dopost"> > <xf:label>Yes</xf:label> > </xf:submit> > <xf:trigger> > <xf:label>No</xf:label> > <xf:action ev:event="DOMActivate"> > <xf:hide dialog="confirm"/> > </xf:action> > </xf:trigger> > </xf:dialog> > > William David Velásquez > Director de I+D > Visión Tecnológica S.A.S. > Tel: (4) 444 7292 > Cel: 313 743 54 11 > wve...@vi... > ________________________________________ > De: peter winstanley [p....@in...] > Enviado: miércoles, 08 de mayo de 2013 11:53 a.m. > Para: XSLTForms support > Asunto: [Xsltforms-support] Models and best practice for submission > confirmation > > Hello List > > Are there any good examples illustrating the best way to implement a > confirmation dialogue for a submission event (asking the user if they > want to continue, and reverting to the form if they don't)? > > Many thanks > > Peter > > ____________________________________________________________ > FREE 3D MARINE AQUARIUM SCREENSAVER - Watch dolphins, sharks & orcas on > your desktop! > Check it out at http://www.inbox.com/marineaquarium > > > > ------------------------------------------------------------------------------ > Learn Graph Databases - Download FREE O'Reilly Book > "Graph Databases" is the definitive new guide to graph databases and > their applications. This 200-page book is written by three acclaimed > leaders in the field. The early access version is available now. > Download your free book today! http://p.sf.net/sfu/neotech_d2d_may > _______________________________________________ > Xsltforms-support mailing list > Xsl...@li... > https://lists.sourceforge.net/lists/listinfo/xsltforms-support ____________________________________________________________ GET FREE SMILEYS FOR YOUR IM & EMAIL - Learn more at http://www.inbox.com/smileys Works with AIM®, MSN® Messenger, Yahoo!® Messenger, ICQ®, Google Talk™ and most webmails |
From: William V. <wve...@vi...> - 2013-05-08 21:10:41
|
You can do it using a xf:dialog with a xf:submit labeled "Yes" and a xf:trigger labeled "No" that closes the dialog. Below is the code: <xf:trigger> <xf:label>Save</xf:label> <xf:action ev:event="DOMActivate"> <xf:show dialog="confirm"/> </xf:action> </xf:trigger> <xf:dialog id="confirm"> <span>Are you sure?</span> <xf:submit submission="dopost"> <xf:label>Yes</xf:label> </xf:submit> <xf:trigger> <xf:label>No</xf:label> <xf:action ev:event="DOMActivate"> <xf:hide dialog="confirm"/> </xf:action> </xf:trigger> </xf:dialog> William David Velásquez Director de I+D Visión Tecnológica S.A.S. Tel: (4) 444 7292 Cel: 313 743 54 11 wve...@vi... ________________________________________ De: peter winstanley [p....@in...] Enviado: miércoles, 08 de mayo de 2013 11:53 a.m. Para: XSLTForms support Asunto: [Xsltforms-support] Models and best practice for submission confirmation Hello List Are there any good examples illustrating the best way to implement a confirmation dialogue for a submission event (asking the user if they want to continue, and reverting to the form if they don't)? Many thanks Peter ____________________________________________________________ FREE 3D MARINE AQUARIUM SCREENSAVER - Watch dolphins, sharks & orcas on your desktop! Check it out at http://www.inbox.com/marineaquarium ------------------------------------------------------------------------------ Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. This 200-page book is written by three acclaimed leaders in the field. The early access version is available now. Download your free book today! http://p.sf.net/sfu/neotech_d2d_may _______________________________________________ Xsltforms-support mailing list Xsl...@li... https://lists.sourceforge.net/lists/listinfo/xsltforms-support |
From: peter w. <p....@in...> - 2013-05-08 16:53:43
|
Hello List Are there any good examples illustrating the best way to implement a confirmation dialogue for a submission event (asking the user if they want to continue, and reverting to the form if they don't)? Many thanks Peter ____________________________________________________________ FREE 3D MARINE AQUARIUM SCREENSAVER - Watch dolphins, sharks & orcas on your desktop! Check it out at http://www.inbox.com/marineaquarium |
From: <fr...@fl...> - 2013-05-08 07:48:55
|
Hi Alain, Thanks for the clarification, and the solution! Fred Citeren Alain Couthures <ala...@ag...>: > Hi Fred, > >> I hit a possible issue with the combination of the context() and >> name() function. >> >> If however I replace line 67 with >> <xforms:setvalue ref="instance('fruitInstance')/bad-fruit" >> value="context()/name()" /> >> I expect to see 'fruit' when I click 'apple', but XSLTForms returns a >> warning, and the return string is empty. > Because XSLTForms implements an XPath 1.0 engine, functions cannot > be used within a path. >> >> The same problem occurs with local-name(). > For both XPath 1.0 and XPath 2.0, name() and local-name() are > functions which can have a node as parameter: "name(context())" and > "local-name(context())" work as expected. > > Thank you for your feedbacks! > > -Alain > |
From: Alain C. <ala...@ag...> - 2013-05-07 19:42:00
|
Hi Fred, > I hit a possible issue with the combination of the context() and > name() function. > > If however I replace line 67 with > <xforms:setvalue ref="instance('fruitInstance')/bad-fruit" > value="context()/name()" /> > I expect to see 'fruit' when I click 'apple', but XSLTForms returns a > warning, and the return string is empty. Because XSLTForms implements an XPath 1.0 engine, functions cannot be used within a path. > > The same problem occurs with local-name(). For both XPath 1.0 and XPath 2.0, name() and local-name() are functions which can have a node as parameter: "name(context())" and "local-name(context())" work as expected. Thank you for your feedbacks! -Alain |
From: <fr...@fl...> - 2013-05-06 17:29:48
|
Hi Alain, I hit a possible issue with the combination of the context() and name() function. The example at https://github.com/AlainCouthures/xsltforms/blob/master/testsuite/XForms1.1/Edition1/Chapt07/7.10/7.10.4/7.10.4.a.xhtml works fine (obviously). Line 67 reads: <xforms:setvalue ref="instance('fruitInstance')/bad-fruit" value="context()" /> Clicking 'apple' returns 'apple'. If I replace in line 67 with <xforms:setvalue ref="instance('fruitInstance')/bad-fruit" value="name()" /> it still is ok. Clicking 'apple' returns 'bad-fruit'. If however I replace line 67 with <xforms:setvalue ref="instance('fruitInstance')/bad-fruit" value="context()/name()" /> I expect to see 'fruit' when I click 'apple', but XSLTForms returns a warning, and the return string is empty. The same problem occurs with local-name(). What can be the problem? Thanks, Fred van Blommestein |
From: Alain C. <ala...@ag...> - 2013-05-04 11:08:26
|
<xforms:bind nodeset="sector/@percentage" constraint="sum(../../sector/@percentage) = 100" /> ???? Le 04/05/2013 12:34, peter winstanley a écrit : > Whoops! silly question! > I was calculating on individuals > i.e.<xforms:bind nodeset="sector/@percentage" constraint="sum(.) = 100" /> > > and not the nodeset :( > > <xforms:bind nodeset="sector/@percentage" constraint="sum(sector/@percentage) = 100" /> > >> -----Original Message----- >> From: p....@in... >> Sent: Sat, 4 May 2013 02:24:58 -0800 >> To: xsl...@li... >> Subject: [Xsltforms-support] constraint against the sum of a series of >> attributes >> >> Hello List >> >> I have a model with a set of one or more <sector/> elements where the sum >> of the sector/@percentage attributes should always equal 100. >> >> how do I express this as a bind constraint? >> >> Cheers >> >> Peter >> >> ____________________________________________________________ >> FREE 3D EARTH SCREENSAVER - Watch the Earth right on your desktop! >> Check it out at http://www.inbox.com/earth >> >> >> >> ------------------------------------------------------------------------------ >> Get 100% visibility into Java/.NET code with AppDynamics Lite >> It's a free troubleshooting tool designed for production >> Get down to code-level detail for bottlenecks, with <2% overhead. >> Download for free and get started troubleshooting in minutes. >> http://p.sf.net/sfu/appdyn_d2d_ap2 >> _______________________________________________ >> Xsltforms-support mailing list >> Xsl...@li... >> https://lists.sourceforge.net/lists/listinfo/xsltforms-support > ____________________________________________________________ > GET FREE SMILEYS FOR YOUR IM & EMAIL - Learn more at http://www.inbox.com/smileys > Works with AIM®, MSN® Messenger, Yahoo!® Messenger, ICQ®, Google Talk™ and most webmails > > > > ------------------------------------------------------------------------------ > Get 100% visibility into Java/.NET code with AppDynamics Lite > It's a free troubleshooting tool designed for production > Get down to code-level detail for bottlenecks, with <2% overhead. > Download for free and get started troubleshooting in minutes. > http://p.sf.net/sfu/appdyn_d2d_ap2 > _______________________________________________ > Xsltforms-support mailing list > Xsl...@li... > https://lists.sourceforge.net/lists/listinfo/xsltforms-support |
From: peter w. <p....@in...> - 2013-05-04 10:34:15
|
Whoops! silly question! I was calculating on individuals i.e.<xforms:bind nodeset="sector/@percentage" constraint="sum(.) = 100" /> and not the nodeset :( <xforms:bind nodeset="sector/@percentage" constraint="sum(sector/@percentage) = 100" /> > -----Original Message----- > From: p....@in... > Sent: Sat, 4 May 2013 02:24:58 -0800 > To: xsl...@li... > Subject: [Xsltforms-support] constraint against the sum of a series of > attributes > > Hello List > > I have a model with a set of one or more <sector/> elements where the sum > of the sector/@percentage attributes should always equal 100. > > how do I express this as a bind constraint? > > Cheers > > Peter > > ____________________________________________________________ > FREE 3D EARTH SCREENSAVER - Watch the Earth right on your desktop! > Check it out at http://www.inbox.com/earth > > > > ------------------------------------------------------------------------------ > Get 100% visibility into Java/.NET code with AppDynamics Lite > It's a free troubleshooting tool designed for production > Get down to code-level detail for bottlenecks, with <2% overhead. > Download for free and get started troubleshooting in minutes. > http://p.sf.net/sfu/appdyn_d2d_ap2 > _______________________________________________ > Xsltforms-support mailing list > Xsl...@li... > https://lists.sourceforge.net/lists/listinfo/xsltforms-support ____________________________________________________________ GET FREE SMILEYS FOR YOUR IM & EMAIL - Learn more at http://www.inbox.com/smileys Works with AIM®, MSN® Messenger, Yahoo!® Messenger, ICQ®, Google Talk™ and most webmails |
From: peter w. <p....@in...> - 2013-05-04 10:25:05
|
Hello List I have a model with a set of one or more <sector/> elements where the sum of the sector/@percentage attributes should always equal 100. how do I express this as a bind constraint? Cheers Peter ____________________________________________________________ FREE 3D EARTH SCREENSAVER - Watch the Earth right on your desktop! Check it out at http://www.inbox.com/earth |
From: Dan M. <dan...@gm...> - 2013-04-26 23:30:52
|
You should be able to do this by putting an "@' in the ref attribute. <xf:select1 ref="activity-status/@code" > ... On Fri, Apr 26, 2013 at 5:37 PM, peter winstanley <p....@in...> wrote: > Hello List > > I know this is perhaps more a generic XForms question, but I hope some > list member might be able to help me. > > I am creating a select1 element and I want to put the value into an > attribute of my model instance and the label into the corresponding element. > > e.g. <activity-status code="4">Post-completion</activity-status> where "4" > is the value and "Post-completion" is the label in the select1 box. > > Many thanks > > Peter > > ____________________________________________________________ > FREE 3D MARINE AQUARIUM SCREENSAVER - Watch dolphins, sharks & orcas on > your desktop! > Check it out at http://www.inbox.com/marineaquarium > > > > > ------------------------------------------------------------------------------ > Try New Relic Now & We'll Send You this Cool Shirt > New Relic is the only SaaS-based application performance monitoring service > that delivers powerful full stack analytics. Optimize and monitor your > browser, app, & servers with just a few lines of code. Try New Relic > and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr > _______________________________________________ > Xsltforms-support mailing list > Xsl...@li... > https://lists.sourceforge.net/lists/listinfo/xsltforms-support > -- Dan McCreary http://danmccreary.com Co-author: Making Sense of NoSQL <http://manning.com/mccreary> office: (952) 931-9198 cell: (612) 986-1552 skype: dmccreary47 |
From: peter w. <p....@in...> - 2013-04-26 23:29:05
|
Here is what I have found works: <xforms:select1 id="activity-status-select" ref="/iati-activities/iati-activity/activity-status"> <xforms:label>Activity Status</xforms:label> <xforms:action ev:event="xforms-value-changed"> <xforms:setvalue ref="/iati-activities/iati-activity/activity-status/@code" value="instance('activity-status')/ActivityStatus[name=/iati-activities/iati-activity/activity-status]/code"/> </xforms:action> <xforms:itemset nodeset="instance('activity-status')/ActivityStatus"> <xforms:label ref="./name"/> <xforms:value ref="./name"/> </xforms:itemset> </xforms:select1> > -----Original Message----- > From: p....@in... > Sent: Fri, 26 Apr 2013 14:37:28 -0800 > To: xsl...@li... > Subject: [Xsltforms-support] getting value from select1 into attribute > and label into element > > Hello List > > I know this is perhaps more a generic XForms question, but I hope some > list member might be able to help me. > > I am creating a select1 element and I want to put the value into an > attribute of my model instance and the label into the corresponding > element. > > e.g. <activity-status code="4">Post-completion</activity-status> where > "4" is the value and "Post-completion" is the label in the select1 box. > > Many thanks > > Peter > > ____________________________________________________________ > FREE 3D MARINE AQUARIUM SCREENSAVER - Watch dolphins, sharks & orcas on > your desktop! > Check it out at http://www.inbox.com/marineaquarium > > > > ------------------------------------------------------------------------------ > Try New Relic Now & We'll Send You this Cool Shirt > New Relic is the only SaaS-based application performance monitoring > service > that delivers powerful full stack analytics. Optimize and monitor your > browser, app, & servers with just a few lines of code. Try New Relic > and get this awesome Nerd Life shirt! > http://p.sf.net/sfu/newrelic_d2d_apr > _______________________________________________ > Xsltforms-support mailing list > Xsl...@li... > https://lists.sourceforge.net/lists/listinfo/xsltforms-support ____________________________________________________________ FREE ONLINE PHOTOSHARING - Share your photos online with your friends and family! Visit http://www.inbox.com/photosharing to find out more! |
From: peter w. <p....@in...> - 2013-04-26 22:37:35
|
Hello List I know this is perhaps more a generic XForms question, but I hope some list member might be able to help me. I am creating a select1 element and I want to put the value into an attribute of my model instance and the label into the corresponding element. e.g. <activity-status code="4">Post-completion</activity-status> where "4" is the value and "Post-completion" is the label in the select1 box. Many thanks Peter ____________________________________________________________ FREE 3D MARINE AQUARIUM SCREENSAVER - Watch dolphins, sharks & orcas on your desktop! Check it out at http://www.inbox.com/marineaquarium |
From: Ingrid F. <if...@un...> - 2013-04-26 09:02:23
|
Hi Peter, On 26/04/13 07:43, peter winstanley wrote: > Hi Ingrid > > You can also just create an XForm as an XML file and include the > mapping to the xsltforms (/exist/apps/xsltforms/xsltforms.xsl in the > default installation of eXist 2.0 with xsltforms installed with the > package manager) but because Betterforms is installed by default you > will need to make some global change to prevent that from > intercepting the XForms tags. [see > http://en.wikibooks.org/wiki/XRX/XSLTForms_and_eXist#Disabling_betterFORM_on_eXist_2.0_and_2.1 > ] That's exactly what I was trying to do, but I get the error I was describing in my first post. In fact when I take the exact same form I served in the xquery (where it worked) preceded by the processing instruction like so: <?xml-stylesheet type="text/xsl" href="../xsltforms/xsltforms.xsl"?> <!-- the path to xsltforms.xsl is the same as in the xquery --> <!-- what follows is the xform, also as in the xquery --> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:xf="http://www.w3.org/2002/xforms" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ev="http://www.w3.org/2001/xml-events" > .... and everything is in a file (in the database) xforms_example.xhtml then I always get the error I described in my first post when I point the browser to this file. I also disabled betterforms, as described in the wiki. However your solution is a useful workaround - but it probably should work this way too :( Ingrid >> -----Original Message----- From: if...@un... Sent: Thu, 25 Apr >> 2013 14:38:14 +0200 To: p....@in... Subject: Re: >> [Xsltforms-support] using xsltforms inside eXist-db >> >> Thanks Peter, this way it worked for me too. >> >> Only I was trying to avoid having to learn the xquery language. >> >> How did you build the xform (the thing you put into the $form >> variable)? Do you use xquery for that? >> >> If I would build the xform using Perl, I would need to build the >> xquery wrapper around it (as in your example) and load it into >> eXist, is that right? >> >> Thanks anyway, >> >> Ingrid >> >> On 24/04/13 23:17, peter winstanley wrote: >>> Hi Ingrid I use XQuery to serve up my (x)html Xforms pages using >>> XSLTForms as follows >>> >>> 1/ prevent the built in Betterform using xquery version "3.0"; >>> declare option exist:serialize "method=xhtml media-type=text/xml >>> indent=yes process-xsl-pi=no"; let $attribute := >>> request:set-attribute("betterform.filter.ignoreResponseBody", >>> "true") >>> >>> 2/ prepare the xhtml xform let $form := <html >>> xmlns="http://www.w3.org/1999/xhtml" >>> xmlns:xf="http://www.w3.org/2002/xforms" >>> xmlns:xs="http://www.w3.org/2001/XMLSchema" >>> xmlns:ev="http://www.w3.org/2001/xml-events" etc ..... >>> >>> 3/ set the processing instructions and the location of the >>> stylesheet >>> >>> let $xslt-pi := processing-instruction xml-stylesheet >>> {'type="text/xsl" >>> href="/exist/rest/db/apps/stats21/resources/xsltforms/xsltforms.xsl"'} >>> >>> let $xslt-debug := processing-instruction xsltforms-options >>> {'debug="no"'} >>> >>> 4/ output the xform preceded by the PI >>> >>> return ($xslt-pi, $xslt-debug, $form) >>> >>> >>> >>> Hope this helps >>> >>> Cheers >>> >>> Peter >>> >>> >>> -----Original Message----- *From:* ala...@ag... >>> *Sent:* Tue, 23 Apr 2013 12:29:53 +0200 *To:* if...@un... >>> *Subject:* Re: [Xsltforms-support] using xsltforms inside >>> eXist-db >>> >>> >>>> >>>> Yes, I did something similar to what you showed in the >>>> screenshot and could GET config.xsl and transform.xsl >>>> manually. >>>> >>>> However I noticed that on your screenshot the xhtml file is in >>>> the same directory as xsltforms.xsl and config.xsl. >>> No, they are not. With IE debugger: >>> >>> >>>> >>>> In the eXist-db setting I could not put my xhtml file into the >>>> same directory (application) as xsltforms.xsl - I suppose it >>>> would work, if I could. >>> I am convince it should work even if they are not in the same >>> folder. >>> >>> -Alain >>> >>> ------------------------------------------------------------------------ >>> >>> Smileys Preview <http://www.inbox.com/smileys> >>> *Get Free Smileys for Your IM & Email* - Learn more at >>> www.crawler.com/smileys <http://www.crawler.com/smileys> Works >>> with AIM^® , MSN^® Messenger, Yahoo!^® Messenger, ICQ^® , Google >>> Talk^™ and most webmails >> >> >> -- Ingrid Falk Ingénieur de Recherche Logoscope @ LiLPa >> (Linguistique, Langue, Paroles) Université de Strasbourg > > ____________________________________________________________ GET FREE > SMILEYS FOR YOUR IM & EMAIL - Learn more at > http://www.inbox.com/smileys Works with AIM®, MSN® Messenger, Yahoo!® > Messenger, ICQ®, Google Talk™ and most webmails > > -- Ingrid Falk Ingénieur de Recherche Logoscope @ LiLPa (Linguistique, Langue, Paroles) Université de Strasbourg |
From: peter w. <p....@in...> - 2013-04-26 05:43:45
|
Hi Ingrid You can also just create an XForm as an XML file and include the mapping to the xsltforms (/exist/apps/xsltforms/xsltforms.xsl in the default installation of eXist 2.0 with xsltforms installed with the package manager) but because Betterforms is installed by default you will need to make some global change to prevent that from intercepting the XForms tags. [see http://en.wikibooks.org/wiki/XRX/XSLTForms_and_eXist#Disabling_betterFORM_on_eXist_2.0_and_2.1 ] Hope this helps Peter > -----Original Message----- > From: if...@un... > Sent: Thu, 25 Apr 2013 14:38:14 +0200 > To: p....@in... > Subject: Re: [Xsltforms-support] using xsltforms inside eXist-db > > Thanks Peter, this way it worked for me too. > > Only I was trying to avoid having to learn the xquery language. > > How did you build the xform (the thing you put into the $form variable)? > Do you use xquery for that? > > If I would build the xform using Perl, I would need to build the xquery > wrapper around it (as in your example) and load it into eXist, is that > right? > > Thanks anyway, > > Ingrid > > On 24/04/13 23:17, peter winstanley wrote: >> Hi Ingrid >> I use XQuery to serve up my (x)html Xforms pages using XSLTForms as >> follows >> >> 1/ prevent the built in Betterform using >> xquery version "3.0"; >> declare option exist:serialize "method=xhtml media-type=text/xml >> indent=yes process-xsl-pi=no"; >> let $attribute := >> request:set-attribute("betterform.filter.ignoreResponseBody", "true") >> >> 2/ prepare the xhtml xform >> let $form := >> <html xmlns="http://www.w3.org/1999/xhtml" >> xmlns:xf="http://www.w3.org/2002/xforms" >> xmlns:xs="http://www.w3.org/2001/XMLSchema" >> xmlns:ev="http://www.w3.org/2001/xml-events" >> etc ..... >> >> 3/ set the processing instructions and the location of the stylesheet >> >> let $xslt-pi := processing-instruction xml-stylesheet {'type="text/xsl" >> href="/exist/rest/db/apps/stats21/resources/xsltforms/xsltforms.xsl"'} >> let $xslt-debug := processing-instruction xsltforms-options >> {'debug="no"'} >> >> 4/ output the xform preceded by the PI >> >> return ($xslt-pi, $xslt-debug, $form) >> >> >> >> Hope this helps >> >> Cheers >> >> Peter >> >> >> -----Original Message----- >> *From:* ala...@ag... >> *Sent:* Tue, 23 Apr 2013 12:29:53 +0200 >> *To:* if...@un... >> *Subject:* Re: [Xsltforms-support] using xsltforms inside eXist-db >> >> >>> >>> Yes, I did something similar to what you showed in the screenshot >>> and could GET config.xsl and transform.xsl manually. >>> >>> However I noticed that on your screenshot the xhtml file is in the >>> same directory as xsltforms.xsl and config.xsl. >> No, they are not. With IE debugger: >> >> >>> >>> In the eXist-db setting I could not put my xhtml file into the >>> same directory (application) as xsltforms.xsl - I suppose it would >>> work, if I could. >> I am convince it should work even if they are not in the same >> folder. >> >> -Alain >> >> ------------------------------------------------------------------------ >> Smileys Preview <http://www.inbox.com/smileys> >> *Get Free Smileys for Your IM & Email* - Learn more at >> www.crawler.com/smileys <http://www.crawler.com/smileys> >> Works with AIM^® , MSN^® Messenger, Yahoo!^® Messenger, ICQ^® , Google >> Talk^™ and most webmails > > > -- > Ingrid Falk > Ingénieur de Recherche > Logoscope @ LiLPa (Linguistique, Langue, Paroles) > Université de Strasbourg ____________________________________________________________ GET FREE SMILEYS FOR YOUR IM & EMAIL - Learn more at http://www.inbox.com/smileys Works with AIM®, MSN® Messenger, Yahoo!® Messenger, ICQ®, Google Talk™ and most webmails |
From: Ingrid F. <if...@un...> - 2013-04-25 12:39:47
|
Thanks Peter, this way it worked for me too. Only I was trying to avoid having to learn the xquery language. How did you build the xform (the thing you put into the $form variable)? Do you use xquery for that? If I would build the xform using Perl, I would need to build the xquery wrapper around it (as in your example) and load it into eXist, is that right? Thanks anyway, Ingrid On 24/04/13 23:17, peter winstanley wrote: > Hi Ingrid > I use XQuery to serve up my (x)html Xforms pages using XSLTForms as follows > > 1/ prevent the built in Betterform using > xquery version "3.0"; > declare option exist:serialize "method=xhtml media-type=text/xml > indent=yes process-xsl-pi=no"; > let $attribute := > request:set-attribute("betterform.filter.ignoreResponseBody", "true") > > 2/ prepare the xhtml xform > let $form := > <html xmlns="http://www.w3.org/1999/xhtml" > xmlns:xf="http://www.w3.org/2002/xforms" > xmlns:xs="http://www.w3.org/2001/XMLSchema" > xmlns:ev="http://www.w3.org/2001/xml-events" > etc ..... > > 3/ set the processing instructions and the location of the stylesheet > > let $xslt-pi := processing-instruction xml-stylesheet {'type="text/xsl" > href="/exist/rest/db/apps/stats21/resources/xsltforms/xsltforms.xsl"'} > let $xslt-debug := processing-instruction xsltforms-options {'debug="no"'} > > 4/ output the xform preceded by the PI > > return ($xslt-pi, $xslt-debug, $form) > > > > Hope this helps > > Cheers > > Peter > > > -----Original Message----- > *From:* ala...@ag... > *Sent:* Tue, 23 Apr 2013 12:29:53 +0200 > *To:* if...@un... > *Subject:* Re: [Xsltforms-support] using xsltforms inside eXist-db > > >> >> Yes, I did something similar to what you showed in the screenshot >> and could GET config.xsl and transform.xsl manually. >> >> However I noticed that on your screenshot the xhtml file is in the >> same directory as xsltforms.xsl and config.xsl. > No, they are not. With IE debugger: > > >> >> In the eXist-db setting I could not put my xhtml file into the >> same directory (application) as xsltforms.xsl - I suppose it would >> work, if I could. > I am convince it should work even if they are not in the same folder. > > -Alain > > ------------------------------------------------------------------------ > Smileys Preview <http://www.inbox.com/smileys> > *Get Free Smileys for Your IM & Email* - Learn more at > www.crawler.com/smileys <http://www.crawler.com/smileys> > Works with AIM^® , MSN^® Messenger, Yahoo!^® Messenger, ICQ^® , Google > Talk^™ and most webmails -- Ingrid Falk Ingénieur de Recherche Logoscope @ LiLPa (Linguistique, Langue, Paroles) Université de Strasbourg |
From: peter w. <p....@in...> - 2013-04-24 21:17:53
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD><META http-equiv=Content-Type content="text/html; charset=utf-8"><META content="INBOX.COM" name=GENERATOR></HEAD> <BODY> Hi Ingrid<br>I use XQuery to serve up my (x)html Xforms pages using XSLTForms as follows<br> <div><br>1/ prevent the built in Betterform using<br>xquery version "3.0";<br>declare option exist:serialize "method=xhtml media-type=text/xml indent=yes process-xsl-pi=no";<br>let $attribute := request:set-attribute("betterform.filter.ignoreResponseBody", "true") <br><br>2/ prepare the xhtml xform<br>let $form :=<br><html xmlns="http://www.w3.org/1999/xhtml"<br> xmlns:xf="http://www.w3.org/2002/xforms" <br> xmlns:xs="http://www.w3.org/2001/XMLSchema" <br> xmlns:ev="http://www.w3.org/2001/xml-events" <br>etc .....<br><br>3/ set the processing instructions and the location of the stylesheet<br><br>let $xslt-pi := processing-instruction xml-stylesheet {'type="text/xsl" href="/exist/rest/db/apps/stats21/resources/xsltforms/xsltforms.xsl"'}<br>let $xslt-debug := processing-instruction xsltforms-options {'debug="no"'} <br><br>4/ output the xform preceded by the PI<br><br>return ($xslt-pi, $xslt-debug, $form)<br><br><br><br>Hope this helps<br><br>Cheers<br><br>Peter<br></div><br><br><blockquote style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px"><div class="msgHeaders">-----Original Message-----<br><b>From:</b> ala...@ag...<br><b>Sent:</b> Tue, 23 Apr 2013 12:29:53 +0200<br><b>To:</b> if...@un...<br><b>Subject:</b> Re: [Xsltforms-support] using xsltforms inside eXist-db<br><br></div><div class="oldBody"><div> <div _class="moz-cite-prefix"><br> </div> <blockquote cite="mid:517...@un..." type="cite"><br> Yes, I did something similar to what you showed in the screenshot and could GET config.xsl and transform.xsl manually. <br> <br> However I noticed that on your screenshot the xhtml file is in the same directory as xsltforms.xsl and config.xsl. <br> </blockquote> No, they are not. With IE debugger:<br> <br> <img src="cid:b1fe046a@9f11-46ba-8162-85567a42f264" alt=""><br> <blockquote cite="mid:517...@un..." type="cite"> <br> In the eXist-db setting I could not put my xhtml file into the same directory (application) as xsltforms.xsl - I suppose it would work, if I could. <br> </blockquote> I am convince it should work even if they are not in the same folder.<br> <br> -Alain<br> </div></div></blockquote> <hr size="1px" noshade style="clear:both;margin-top:10px;height:1px;"> <div style="font:12px Verdana,sans-serif;color:Black;background:white;padding:3px;line-height:1.3em"> <a href="http://www.inbox.com/smileys"><img src="http://my.inbox.com/img/ftrs/smileys.jpg" width="438" hight="73" alt="Smileys Preview" border="0" style="margin-bottom:10px" /></a><br> <nobr><strong><font color="2086c3">Get Free Smileys for Your IM & Email</font></strong> - Learn more at <a href="http://www.crawler.com/smileys">www.crawler.com/smileys</a></nobr><br> <nobr>Works with AIM<font size="-1"><sup>®</sup></font>, MSN<font size="-1"><sup>®</sup></font> Messenger, Yahoo!<font size="-1"><sup>®</sup></font> Messenger, ICQ<font size="-1"><sup>®</sup></font>, Google Talk<font size="-1"><sup>™</sup></font> and most webmails</nobr></div> </BODY> </HTML> |
From: Alain C. <ala...@ag...> - 2013-04-23 10:30:03
|
> > Yes, I did something similar to what you showed in the screenshot and > could GET config.xsl and transform.xsl manually. > > However I noticed that on your screenshot the xhtml file is in the > same directory as xsltforms.xsl and config.xsl. No, they are not. With IE debugger: > > In the eXist-db setting I could not put my xhtml file into the same > directory (application) as xsltforms.xsl - I suppose it would work, if > I could. I am convince it should work even if they are not in the same folder. -Alain |
From: Ingrid F. <if...@un...> - 2013-04-23 09:33:24
|
On 23/04/13 10:58, Alain Couthures wrote: > >> I was trying to use a client-side transformation. >> >> >> Yes, I did check that out, but I thought it would not apply since I >> want to use a client side transformation. > Parameters cannot be set when the transformation is launched by a > processing instruction. > > Did you check with a browser debugger, such as FireBug for FireFox or > native debuggers for IE and Chrome, in the network profiler, whether the > HTTP request for config.xsl is correct? Can you get it manually? > > Yes, I did something similar to what you showed in the screenshot and could GET config.xsl and transform.xsl manually. However I noticed that on your screenshot the xhtml file is in the same directory as xsltforms.xsl and config.xsl. In the eXist-db setting I could not put my xhtml file into the same directory (application) as xsltforms.xsl - I suppose it would work, if I could. Ingrid -- Ingrid Falk Ingénieur de Recherche Logoscope @ LiLPa (Linguistique, Langue, Paroles) Université de Strasbourg |