xsltforms-support Mailing List for XSLTForms (Page 65)
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: Philip F. <Phi...@ma...> - 2011-03-09 15:38:24
|
If I set the type attribute on an xf:bind to xs:date then a date picker is rendered for a control that uses that bind. However, the xs:date type does not allow for empty values and therefore cannot be used where a date field might have no value. Is there a way that I can use the date picker widget for controls bound to elements that have no type other than a plain string? Regards Philip Fennell |
From: Raja <m.r...@ni...> - 2011-03-09 13:32:04
|
Hi AC!!! >From February mid onwards we are using the latest version of XSLTForms-beta3 for the Local File/Save option Testing. Its working fine and generating correct XML output file... So, Better you can use the following link to download the latest one which has the support for local file/save. http://sourceforge.net/projects/xsltforms/files/xsltforms/Beta%203/xsltforms-beta3.zip(http://sourceforge.net/projects/xsltforms/files/xsltforms/Beta%203/xsltforms-beta3.zip/download) By Rajamani Marimuthu XRX Team(Lead) On 03/09/11, ac <ac...@hy...> wrote: > > > > > > > > > > > > Hi Alain, > > > > Unfortunately, I am still puzzled by the errors that I am getting > from trying to use applet-based save/load in XSLTForms. If this is > a version related issue, could you point me to a working version, or > indicate which file version I should pickup from SVN. > > > > If, rather, it is something else that I am doing wrong, could you > provide some indication? > > > > Does somebody else effectively use XSLTForms' new applet-based local > save/load features? if so, which version of XSLTForms and XSLTForms > components are you using? > > > > Thank you. > > > > Regards, > > Andre > > > > > > > > > > Hi Alain, > > > > Sometime, the simplest things ... > > > > I checked the version number and it was and is still 487. > > > > I went to the SVN repo (http://xsltforms.svn.sourceforge.net/viewvc/xsltforms/branches/dataisland/build/) > and picked up every file updated in the last 10 days, including the > xsltforms.js, xsltforms.xsl, and xsltforms.jar > > > > Still using Firefox v3.6.14, and having reset the cache, I got this > error, on pressing the "Local Save" button: > > > > > > XSLTForms Exception > > -------------------------- > > > > Error initializing : > > > > ((void 0),"UTF-8","string","XSLTForms Java > Saver","<stratml:PerformancePlanOrReport xmlns:stratml=\"http://www.stratml.net/PerformancePlanOrReport\"(http://www.stratml.net/PerformancePlanOrReport%5C) > Type=\"Strategic_Plan\"><stratml:Name>Plan Name Goes > Here</stratml:Name><stratml:Desc-ription/><stratml:OtherInformation/><stratml:StrategicPlanCore><stratml:Organization><stratml:Name/><stratml:Acronym/><stratml:Identifier/><stratml:Desc-ription/><stratml:Stakeholder><stratml:Name/><stratml:Desc-ription/><stratml:Role><stratml:Name/><stratml:Desc-ription/><stratml:RoleType/></stratml:Role></stratml:Stakeholder></stratml:Organization><stratml:Vision><stratml:Desc-ription/><stratml:Identifier/></stratml:Vision><stratml:Mission><stratml:Desc-ription/><stratml:Identifier/></stratml:Mission><stratml:Value><stratml:Name/><stratml:Desc-ription/></stratml:Value><stratml:Goal><stratml:Name/><stratml:Desc-ription/><stratml:Identifier/><stratml:SequenceIndicator/><stratml:OtherInformation/><stratml:Stakeholder><st > > ratml:Name/><stratml:Desc-ription/><stratml:Role><stratml:Name/><stratml:Desc-ription/><stratml:RoleType/></stratml:Role></stratml:Stakeholder><stratml:Objective><stratml:Name/><stratml:Desc-ription/><stratml:Identifier/><stratml:SequenceIndicator/><stratml:OtherInformation/><stratml:Stakeholder><stratml:Name/><stratml:Desc-ription/><stratml:Role><stratml:Name/><stratml:Desc-ription/><stratml:RoleType/></stratml:Role></stratml:Stakeholder><stratml:PerformanceIndicator > > ValueChainStage=\"\" > IndicatorType=\"\"><stratml:MeasurementDimension/><stratml:UnitOfMeasurement/><stratml:Identifier/><stratml:OtherInformation/><stratml:RelationshipRelationshipType=\"\"><stratml:Name/><stratml:Desc-ription/><stratml:Identifier/></stratml:Relationship><stratml:MeasurementInstance><stratml:TargetResult><stratml:Desc-ription/><stratml:NumberOfUnits/><stratml:StartDate/><stratml:EndDate/></stratml:TargetResult><stratml:ActualResult><stratml:Desc-ription/><stratml:NumberOfUnits/><stratml:StartDate/><stratml:EndDate/></stratml:ActualResult></stratml:MeasurementInstance></stratml:PerformanceIndicator></stratml:Objective></stratml:Goal></stratml:StrategicPlanCore><stratml:AdministrativeInformation><stratml:StartDate/><stratml:EndDate/><stratml:PublicationDate/><stratml:Source/></stratml:Admi > nistrativeInformation><stratml:Submitter><stratml:FirstName/><stratml:LastName/><stratml:PhoneNumber/><stratml:EmailAddress/></stratml:Submit > ter></stratml:PerformancePlanOrReport>")@http://localhost:8080/library/hyperform/stratml/asset/xml/xsltforms/xsltforms.js:341 > > ("","UTF-8","string","XSLTForms Java > Saver","<stratml:PerformancePlanOrReport xmlns:stratml=\"http://www.stratml.net/PerformancePlanOrReport\"(http://www.stratml.net/PerformancePlanOrReport%5C) > Type=\"Strategic_Plan\"><stratml:Name>Plan Name Goes > Here</stratml:Name><stratml:Desc-ription/><stratml:OtherInformation/><stratml:StrategicPlanCore><stratml:Organization><stratml:Name/><stratml:Acronym/><stratml:Identifier/><stratml:Desc-ription/><stratml:Stakeholder><stratml:Name/><stratml:Desc-ription/><stratml:Role><stratml:Name/><stratml:Desc-ription/><stratml:RoleType/></stratml:Role></stratml:Stakeholder></stratml:Organization><stratml:Vision><stratml:Desc-ription/><stratml:Identifier/></stratml:Vision><stratml:Mission><stratml:Desc-ription/><stratml:Identifier/></stratml:Mission><stratml:Value><stratml:Name/><stratml:Desc-ription/></stratml:Value><stratml:Goal><stratml:Name/><stratml:Desc-ription/><stratml:Identifier/><stratml:SequenceIndicator/><stratml:OtherInformation/><stratml:Stakeholder><st > > ratml:Name/><stratml:Desc-ription/><stratml:Role><stratml:Name/><stratml:Desc-ription/><stratml:RoleType/></stratml:Role></stratml:Stakeholder><stratml:Objective><stratml:Name/><stratml:Desc-ription/><stratml:Identifier/><stratml:SequenceIndicator/><stratml:OtherInformation/><stratml:Stakeholder><stratml:Name/><stratml:Desc-ription/><stratml:Role><stratml:Name/><stratml:Desc-ription/><stratml:RoleType/></stratml:Role></stratml:Stakeholder><stratml:PerformanceIndicator > > ValueChainStage=\"\" > IndicatorType=\"\"><stratml:MeasurementDimension/><stratml:UnitOfMeasurement/><stratml:Identifier/><stratml:OtherInformation/><stratml:RelationshipRelationshipType=\"\"><stratml:Name/><stratml:Desc-ription/><stratml:Identifier/></stratml:Relationship><stratml:MeasurementInstance><stratml:TargetResult><stratml:Desc-ription/><stratml:NumberOfUnits/><stratml:StartDate/><stratml:EndDate/></stratml:TargetResult><stratml:ActualResult><stratml:Desc-ription/><stratml:NumberOfUnits/><stratml:StartDate/><stratml:EndDate/></stratml:ActualResult></stratml:MeasurementInstance></stratml:PerformanceIndicator></stratml:Objective></stratml:Goal></stratml:StrategicPlanCore><stratml:AdministrativeInformation><stratml:StartDate/><stratml:EndDate/><stratml:PublicationDate/><stratml:Source/></stratml:Admi > nistrativeInformation><stratml:Submitter><stratml:FirstName/><stratml:LastName/><stratml:PhoneNumber/><stratml:EmailAddress/></stratml:Submit > ter></stratml:PerformancePlanOrReport>")@http://localhost:8080/library/hyperform/stratml/asset/xml/xsltforms/xsltforms.js:355 > > ()@http://localhost:8080/library/hyperform/stratml/asset/xml/xsltforms/xsltforms.js:2659 > > ([object > Event])@http://localhost:8080/library/hyperform/stratml/asset/xml/xsltforms/xsltforms.js:7387 <Event]%29@http://localhost:8080/library/hyperform/stratml/asset/xml/xsltforms/xsltforms.js:7387> > > ([object > HTMLSpanElement],"xforms-submit")@http://localhost:8080/library/hyperform/stratml/asset/xml/xsltforms/xsltforms.js:7285 > > ([object HTMLSpanElement],[object Element],[object > Event])@http://localhost:8080/library/hyperform/stratml/asset/xml/xsltforms/xsltforms.js:3280 <Event]%29@http://localhost:8080/library/hyperform/stratml/asset/xml/xsltforms/xsltforms.js:3280> > > ([object HTMLSpanElement],[object Element],[object > Event])@http://localhost:8080/library/hyperform/stratml/asset/xml/xsltforms/xsltforms.js:3141 <Event]%29@http://localhost:8080/library/hyperform/stratml/asset/xml/xsltforms/xsltforms.js:3141> > > ([object HTMLSpanElement],[object Element],[object > Event])@http://localhost:8080/library/hyperform/stratml/asset/xml/xsltforms/xsltforms.js:3126 <Event]%29@http://localhost:8080/library/hyperform/stratml/asset/xml/xsltforms/xsltforms.js:3126> > > (2)@http://localhost:8080/library/hyperform/stratml/asset/xml/xsltforms/xsltforms.js:1319 <2%29@http://localhost:8080/library/hyperform/stratml/asset/xml/xsltforms/xsltforms.js:1319> > > > > > > TypeError > > > > document.applets.xsltforms.writeFile is not a function > > > > > > > > Line 341 in xsltforms.js is indeed > > return document.applets["xsltforms"].writeFile(fname, > encoding, xsdtype, title, content) == 1; > > > > So it seems that there was an improvement, but I must still have > something wrong. Any light that you could shed would be still much > appreciated. > > > > Thank you. > > > > Regards, > > Andre > > > > > > > > > > > > > > > Hi André, > > > > > > > > The message you obtained comes from an older version than Beta3 > > which was indeed released on 2011-02-27. > > > > > > > > Please check the first line in the xsltforms.js file. > > > > > > > > Thanks! > > > > > > > > -Alain > > > > > > > > Le 04/03/2011 19:19, Andre Cusson a écrit : > > > > > > > > > > > > > > Hi Alain, > > > > > > > > > > > > Using RC3 from 2011-02-27, I tried getting the applet-based > > > saving and loading but I must have missed something as I am > > > getting this message when I either try to load or save: > > > > > > > > > > > > XSLTForms Submission > > > > > > --------------------------- > > > > > > > > > > > > file:// > > > > > > > > > > > > file:// is not supported for security > > > reasons. > > > > > > > > > > > > Contents copied instead in clipboard if possible > > > > > > and displayed by the browser. > > > > > > > > > > > > > > > > > > In the model, I used > > > > > > > > > > > > <xf:submission id="save" method="put" replace="none" action="file://"(file://)> > > > > > > <xf:message level="modeless" > > > ev:event="xforms-submit-error">Submit > > > > > > error.</xf:message> > > > > > > </xf:submission> > > > > > > <xf:submission id="load" method="get" serialization="none" > > > > > > replace="instance" action="file://"(file://)> > > > > > > <xf:message level="modeless" > > > ev:event="xforms-submit-error">Submit > > > > > > error.</xf:message> > > > > > > </xf:submission> > > > > > > > > > > > > and in the form I have: > > > > > > > > > > > > <xf:submit submission="save"> > > > > > > <xf:label>Save to local disk</xf:label> > > > > > > </xf:submit> > > > > > > <xf:submit submission="load"> > > > > > > <xf:label>Restore from local disk</xf:label> > > > > > > </xf:submit> > > > > > > > > > > > > > > > > > > What must I be doing wrong this time :)? > > > > > > > > > > > > Thank you. > > > > > > > > > > > > Rgards, > > > > > > Andre > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Hello, > > > > > > I have added "file://"(file://) support in submission allowing users to save and > > > restore data instances on local disk with regular files. > > > > > > This is based on a Java applet. There are some integrated security > > > restrictions such as forbidden file extensions (.exe,...) and maximum > > > size (100 Mo). BOM is not yet supported. > > > > > > Each time, a Java file dialog is displayed to allow the user to select > > > the folder and to enter the file shortname. This dialog is initialized > > > with the path after "file://"(file://), if any. > > > > > > I have tested this successfully on Windows with FireFox, IE and Chrome > > > (there were some errors before accepting the applet, maybe wait > > > instructions (1 or 2 seconds) might help...) but it doesn't work yet > > > with Opera. Please find my test case below. > > > > > > Thank you for your feedbacks! > > > > > > -Alain > > > ------------------------------------------------------------------------ > > > <?xml version="1.0" encoding="UTF-8"?> > > > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" > > > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> > > > <html xmlns="http://www.w3.org/1999/xhtml" > > > xmlns:xf="http://www.w3.org/2002/xforms"> > > > <head> > > > <title>Address Form</title> > > > <xf:model> > > > <xf:instance> > > > <Address xmlns=""> > > > <LocationStreetFullText/> > > > <LocationCityName/> > > > <LocationStateName/> > > > <LocationPostalID/> > > > </Address> > > > </xf:instance> > > > <xf:submission id="save" method="put" replace="none" action="file://"(file://)> > > > <xf:message level="modeless" ev:event="xforms-submit-error">Submit > > > error.</xf:message> > > > </xf:submission> > > > <xf:submission id="load" method="get" serialization="none" > > > replace="instance" action="file://"(file://)> > > > <xf:message level="modeless" ev:event="xforms-submit-error">Submit > > > error.</xf:message> > > > </xf:submission> > > > </xf:model> > > > </head> > > > <body> > > > <xf:group ref="/Address"> > > > <fieldset> > > > <legend>Mailing Address</legend> > > > <xf:input ref="LocationStreetFullText"> > > > <xf:label>Street: </xf:label> > > > </xf:input> > > > <br/> > > > <xf:input ref="LocationCityName"> > > > <xf:label>City: </xf:label> > > > </xf:input> > > > <br/> > > > <xf:input ref="LocationStateName"> > > > <xf:label>State: </xf:label> > > > </xf:input> > > > <br/> > > > <xf:input ref="LocationPostalID"> > > > <xf:label>Postal Code: </xf:label> > > > </xf:input> > > > </fieldset> > > > </xf:group> > > > <xf:submit submission="save"> > > > <xf:label>Save to local disk</xf:label> > > > </xf:submit> > > > <xf:submit submission="load"> > > > <xf:label>Restore from local disk</xf:label> > > > </xf:submit> > > > </body> > > > </html> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ------------------------------------------------------------------------------ > > What You Don't Know About Data Connectivity CAN Hurt You > > This paper provides an overview of data connectivity, details > > its effect on application quality, and explores various alternative > > solutions. http://p.sf.net/sfu/progress-d2d > > > > > > > > _______________________________________________ > > Xsltforms-support mailing list > > Xsl...@li... <Xsl...@li...> > > https://lists.sourceforge.net/lists/listinfo/xsltforms-support > > > > > > > > > > > > -- Rajamani Marimuthu Junior Research Fellow-JRF NIC -Open Technology Centre Rajaji Bhavan Besant Nagar, Chennai - 90 Cell : 9791125383 |
From: ac <ac...@hy...> - 2011-03-09 13:25:37
|
------------------------------------------------------------------------------ What You Don't Know About Data Connectivity CAN Hurt You This paper provides an overview of data connectivity, details its effect on application quality, and explores various alternative solutions. http://p.sf.net/sfu/progress-d2d |
From: COUTHURES A. <ala...@ag...> - 2011-03-06 10:38:21
|
Hello David, Cross-browser SVG sizing is still not well supported in XSLTForms. I'm afraid it won't be a priority soon. SVG within XSLTForms has just been considered as a proof case for graphs generated from graph2svg.xsl at client-side http://www.svgopen.org/2010/papers/14-Dynamic_SVG_graphs_for_XForms/. About SVGWeb, I have to admit I was disappointed. With graphs again, the rendering wasn't as good as with native SVG, especially about dotted lines. The XML document has to be in the default namespace because prefix use is not supported, not even "svg:". I proposed my own patch for prefix support but it was rejected by the SVGWeb team http://code.google.com/p/svgweb/issues/detail?id=454 :-( Are you in a hurry about good SVG sizing support? Thanks! -Alain Le 03/03/2011 23:17, David French a écrit : > > I am trying to output an SVG image through xlstforms clientside > (following the example of http://en.wikibooks.org/wiki/XForms/SVG). > > With Firefox 3.6 ,Firefox 4.0 and Chrome, nothing I do seems to affect > the size of the output resulting in horizontal and vertical sliders > being applied when actual image is larger than space assumed. A > minimal test example is available here > http://soundings01.appspot.com/xsltforms/xfsvg4.xml > The default image size also varies depending on browser. Chrome shows > a smaller portion of the image than Firefox (4 beta 12). Inspecting > the element in Chrome shows span.xforms-value of 300x19. > > IE 8 appears to be constrained by the style width and height so that > if the width/height are less than the image dimensions the top left > corner of the image alone is visible with no sliders added (see > http://soundings01.appspot.com/xsltforms/xfsvg5.xml) but if the image > is smaller than the styling width height, the full image is seen. The > rendering appears to be done by silverlight in this instance. > > I am looking for consistent behaviour and a better understanding of > how to work around any differences. Any pointers? > Thanks > David > |
From: ac <ac...@hy...> - 2011-03-05 23:36:31
|
Hi Alain, Sometime, the simplest things ... I checked the version number and it was and is still 487. I went to the SVN repo (http://xsltforms.svn.sourceforge.net/viewvc/xsltforms/branches/dataisland/build/) and picked up every file updated in the last 10 days, including the xsltforms.js, xsltforms.xsl, and xsltforms.jar Still using Firefox v3.6.14, and having reset the cache, I got this error, on pressing the "Local Save" button: XSLTForms Exception -------------------------- Error initializing : ((void 0),"UTF-8","string","XSLTForms Java Saver","<stratml:PerformancePlanOrReport xmlns:stratml=\"http://www.stratml.net/PerformancePlanOrReport\" Type=\"Strategic_Plan\"><stratml:Name>Plan Name Goes Here</stratml:Name><stratml:Description/><stratml:OtherInformation/><stratml:StrategicPlanCore><stratml:Organization><stratml:Name/><stratml:Acronym/><stratml:Identifier/><stratml:Description/><stratml:Stakeholder><stratml:Name/><stratml:Description/><stratml:Role><stratml:Name/><stratml:Description/><stratml:RoleType/></stratml:Role></stratml:Stakeholder></stratml:Organization><stratml:Vision><stratml:Description/><stratml:Identifier/></stratml:Vision><stratml:Mission><stratml:Description/><stratml:Identifier/></stratml:Mission><stratml:Value><stratml:Name/><stratml:Description/></stratml:Value><stratml:Goal><stratml:Name/><stratml:Description/><stratml:Identifier/><stratml:SequenceIndicator/><stratml:OtherInformation/><stratml:Stakeholder><stratml:Name/><stratml:Description/><stratml:Role><stratml:Name/><stratml:Description/><stratml:RoleType/></stratml:Role></stratml:Stakeholder><stratml:Objective><stratml:Name/><stratml:Description/><stratml:Identifier/><stratml:SequenceIndicator/><stratml:OtherInformation/><stratml:Stakeholder><stratml:Name/><stratml:Description/><stratml:Role><stratml:Name/><stratml:Description/><stratml:RoleType/></stratml:Role></stratml:Stakeholder><stratml:PerformanceIndicator ValueChainStage=\"\" IndicatorType=\"\"><stratml:MeasurementDimension/><stratml:UnitOfMeasurement/><stratml:Identifier/><stratml:OtherInformation/><stratml:Relationship RelationshipType=\"\"><stratml:Name/><stratml:Description/><stratml:Identifier/></stratml:Relationship><stratml:MeasurementInstance><stratml:TargetResult><stratml:Description/><stratml:NumberOfUnits/><stratml:StartDate/><stratml:EndDate/></stratml:TargetResult><stratml:ActualResult><stratml:Description/><stratml:NumberOfUnits/><stratml:StartDate/><stratml:EndDate/></stratml:ActualResult></stratml:MeasurementInstance></stratml:PerformanceIndicator></stratml:Objective></stratml:Goal></stratml:StrategicPlanCore><stratml:AdministrativeInformation><stratml:StartDate/><stratml:EndDate/><stratml:PublicationDate/><stratml:Source/></stratml:AdministrativeInformation><stratml:Submitter><stratml:FirstName/><stratml:LastName/><stratml:PhoneNumber/><stratml:EmailAddress/></stratml:Submitter></stratml:PerformancePlanOrReport>")@http://localhost:8080/library/hyperform/stratml/asset/xml/xsltforms/xsltforms.js:341 ("","UTF-8","string","XSLTForms Java Saver","<stratml:PerformancePlanOrReport xmlns:stratml=\"http://www.stratml.net/PerformancePlanOrReport\" Type=\"Strategic_Plan\"><stratml:Name>Plan Name Goes Here</stratml:Name><stratml:Description/><stratml:OtherInformation/><stratml:StrategicPlanCore><stratml:Organization><stratml:Name/><stratml:Acronym/><stratml:Identifier/><stratml:Description/><stratml:Stakeholder><stratml:Name/><stratml:Description/><stratml:Role><stratml:Name/><stratml:Description/><stratml:RoleType/></stratml:Role></stratml:Stakeholder></stratml:Organization><stratml:Vision><stratml:Description/><stratml:Identifier/></stratml:Vision><stratml:Mission><stratml:Description/><stratml:Identifier/></stratml:Mission><stratml:Value><stratml:Name/><stratml:Description/></stratml:Value><stratml:Goal><stratml:Name/><stratml:Description/><stratml:Identifier/><stratml:SequenceIndicator/><stratml:OtherInformation/><stratml:Stakeholder><stratml:Name/><stratml:Description/><stratml:Role><stratml:Name/><stratml:Description/><stratml:RoleType/></stratml:Role></stratml:Stakeholder><stratml:Objective><stratml:Name/><stratml:Description/><stratml:Identifier/><stratml:SequenceIndicator/><stratml:OtherInformation/><stratml:Stakeholder><stratml:Name/><stratml:Description/><stratml:Role><stratml:Name/><stratml:Description/><stratml:RoleType/></stratml:Role></stratml:Stakeholder><stratml:PerformanceIndicator ValueChainStage=\"\" IndicatorType=\"\"><stratml:MeasurementDimension/><stratml:UnitOfMeasurement/><stratml:Identifier/><stratml:OtherInformation/><stratml:Relationship RelationshipType=\"\"><stratml:Name/><stratml:Description/><stratml:Identifier/></stratml:Relationship><stratml:MeasurementInstance><stratml:TargetResult><stratml:Description/><stratml:NumberOfUnits/><stratml:StartDate/><stratml:EndDate/></stratml:TargetResult><stratml:ActualResult><stratml:Description/><stratml:NumberOfUnits/><stratml:StartDate/><stratml:EndDate/></stratml:ActualResult></stratml:MeasurementInstance></stratml:PerformanceIndicator></stratml:Objective></stratml:Goal></stratml:StrategicPlanCore><stratml:AdministrativeInformation><stratml:StartDate/><stratml:EndDate/><stratml:PublicationDate/><stratml:Source/></stratml:AdministrativeInformation><stratml:Submitter><stratml:FirstName/><stratml:LastName/><stratml:PhoneNumber/><stratml:EmailAddress/></stratml:Submitter></stratml:PerformancePlanOrReport>")@http://localhost:8080/library/hyperform/stratml/asset/xml/xsltforms/xsltforms.js:355 ()@http://localhost:8080/library/hyperform/stratml/asset/xml/xsltforms/xsltforms.js:2659 ([object Event])@http://localhost:8080/library/hyperform/stratml/asset/xml/xsltforms/xsltforms.js:7387 ([object HTMLSpanElement],"xforms-submit")@http://localhost:8080/library/hyperform/stratml/asset/xml/xsltforms/xsltforms.js:7285 ([object HTMLSpanElement],[object Element],[object Event])@http://localhost:8080/library/hyperform/stratml/asset/xml/xsltforms/xsltforms.js:3280 ([object HTMLSpanElement],[object Element],[object Event])@http://localhost:8080/library/hyperform/stratml/asset/xml/xsltforms/xsltforms.js:3141 ([object HTMLSpanElement],[object Element],[object Event])@http://localhost:8080/library/hyperform/stratml/asset/xml/xsltforms/xsltforms.js:3126 (2)@http://localhost:8080/library/hyperform/stratml/asset/xml/xsltforms/xsltforms.js:1319 TypeError document.applets.xsltforms.writeFile is not a function Line 341 in xsltforms.js is indeed return document.applets["xsltforms"].writeFile(fname, encoding, xsdtype, title, content) == 1; So it seems that there was an improvement, but I must still have something wrong. Any light that you could shed would be still much appreciated. Thank you. Regards, Andre > Hi André, > > The message you obtained comes from an older version than Beta3 which > was indeed released on 2011-02-27. > > Please check the first line in the xsltforms.js file. > > Thanks! > > -Alain > > Le 04/03/2011 19:19, Andre Cusson a écrit : >> Hi Alain, >> >> Using RC3 from 2011-02-27, I tried getting the applet-based saving >> and loading but I must have missed something as I am getting this >> message when I either try to load or save: >> >> XSLTForms Submission >> --------------------------- >> >> file:// >> >> file:// is not supported for security reasons. >> >> Contents copied instead in clipboard if possible >> and displayed by the browser. >> >> >> In the model, I used >> >> <xf:submission id="save" method="put" replace="none" action="file://"> >> <xf:message level="modeless" ev:event="xforms-submit-error">Submit >> error.</xf:message> >> </xf:submission> >> <xf:submission id="load" method="get" serialization="none" >> replace="instance" action="file://"> >> <xf:message level="modeless" ev:event="xforms-submit-error">Submit >> error.</xf:message> >> </xf:submission> >> >> and in the form I have: >> >> <xf:submit submission="save"> >> <xf:label>Save to local disk</xf:label> >> </xf:submit> >> <xf:submit submission="load"> >> <xf:label>Restore from local disk</xf:label> >> </xf:submit> >> >> >> What must I be doing wrong this time :)? >> >> Thank you. >> >> Rgards, >> Andre >> >> >> >> >> Hello, >> >> I have added"file://" support in submission allowing users to save and >> restore data instances on local disk with regular files. >> >> This is based on a Java applet. There are some integrated security >> restrictions such as forbidden file extensions (.exe,...) and maximum >> size (100 Mo). BOM is not yet supported. >> >> Each time, a Java file dialog is displayed to allow the user to select >> the folder and to enter the file shortname. This dialog is initialized >> with the path after"file://", if any. >> >> I have tested this successfully on Windows with FireFox, IE and Chrome >> (there were some errors before accepting the applet, maybe wait >> instructions (1 or 2 seconds) might help...) but it doesn't work yet >> with Opera. Please find my test case below. >> >> Thank you for your feedbacks! >> >> -Alain >> ------------------------------------------------------------------------ >> <?xml version="1.0" encoding="UTF-8"?> >> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" >> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> >> <html xmlns="http://www.w3.org/1999/xhtml" >> xmlns:xf="http://www.w3.org/2002/xforms"> >> <head> >> <title>Address Form</title> >> <xf:model> >> <xf:instance> >> <Address xmlns=""> >> <LocationStreetFullText/> >> <LocationCityName/> >> <LocationStateName/> >> <LocationPostalID/> >> </Address> >> </xf:instance> >> <xf:submission id="save" method="put" replace="none" action="file://"> >> <xf:message level="modeless" ev:event="xforms-submit-error">Submit >> error.</xf:message> >> </xf:submission> >> <xf:submission id="load" method="get" serialization="none" >> replace="instance" action="file://"> >> <xf:message level="modeless" ev:event="xforms-submit-error">Submit >> error.</xf:message> >> </xf:submission> >> </xf:model> >> </head> >> <body> >> <xf:group ref="/Address"> >> <fieldset> >> <legend>Mailing Address</legend> >> <xf:input ref="LocationStreetFullText"> >> <xf:label>Street:</xf:label> >> </xf:input> >> <br/> >> <xf:input ref="LocationCityName"> >> <xf:label>City:</xf:label> >> </xf:input> >> <br/> >> <xf:input ref="LocationStateName"> >> <xf:label>State:</xf:label> >> </xf:input> >> <br/> >> <xf:input ref="LocationPostalID"> >> <xf:label>Postal Code:</xf:label> >> </xf:input> >> </fieldset> >> </xf:group> >> <xf:submit submission="save"> >> <xf:label>Save to local disk</xf:label> >> </xf:submit> >> <xf:submit submission="load"> >> <xf:label>Restore from local disk</xf:label> >> </xf:submit> >> </body> >> </html> >> >> > > > ------------------------------------------------------------------------------ > What You Don't Know About Data Connectivity CAN Hurt You > This paper provides an overview of data connectivity, details > its effect on application quality, and explores various alternative > solutions. http://p.sf.net/sfu/progress-d2d > > > _______________________________________________ > Xsltforms-support mailing list > Xsl...@li... > https://lists.sourceforge.net/lists/listinfo/xsltforms-support |
From: COUTHURES A. <ala...@ag...> - 2011-03-05 11:24:44
|
Hi André, The message you obtained comes from an older version than Beta3 which was indeed released on 2011-02-27. Please check the first line in the xsltforms.js file. Thanks! -Alain Le 04/03/2011 19:19, Andre Cusson a écrit : > Hi Alain, > > Using RC3 from 2011-02-27, I tried getting the applet-based saving and > loading but I must have missed something as I am getting this message > when I either try to load or save: > > XSLTForms Submission > --------------------------- > > file:// > > file:// is not supported for security reasons. > > Contents copied instead in clipboard if possible > and displayed by the browser. > > > In the model, I used > > <xf:submission id="save" method="put" replace="none" action="file://"> > <xf:message level="modeless" ev:event="xforms-submit-error">Submit > error.</xf:message> > </xf:submission> > <xf:submission id="load" method="get" serialization="none" > replace="instance" action="file://"> > <xf:message level="modeless" ev:event="xforms-submit-error">Submit > error.</xf:message> > </xf:submission> > > and in the form I have: > > <xf:submit submission="save"> > <xf:label>Save to local disk</xf:label> > </xf:submit> > <xf:submit submission="load"> > <xf:label>Restore from local disk</xf:label> > </xf:submit> > > > What must I be doing wrong this time :)? > > Thank you. > > Rgards, > Andre > > > > > Hello, > > I have added"file://" support in submission allowing users to save and > restore data instances on local disk with regular files. > > This is based on a Java applet. There are some integrated security > restrictions such as forbidden file extensions (.exe,...) and maximum > size (100 Mo). BOM is not yet supported. > > Each time, a Java file dialog is displayed to allow the user to select > the folder and to enter the file shortname. This dialog is initialized > with the path after"file://", if any. > > I have tested this successfully on Windows with FireFox, IE and Chrome > (there were some errors before accepting the applet, maybe wait > instructions (1 or 2 seconds) might help...) but it doesn't work yet > with Opera. Please find my test case below. > > Thank you for your feedbacks! > > -Alain > ------------------------------------------------------------------------ > <?xml version="1.0" encoding="UTF-8"?> > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> > <html xmlns="http://www.w3.org/1999/xhtml" > xmlns:xf="http://www.w3.org/2002/xforms"> > <head> > <title>Address Form</title> > <xf:model> > <xf:instance> > <Address xmlns=""> > <LocationStreetFullText/> > <LocationCityName/> > <LocationStateName/> > <LocationPostalID/> > </Address> > </xf:instance> > <xf:submission id="save" method="put" replace="none" action="file://"> > <xf:message level="modeless" ev:event="xforms-submit-error">Submit > error.</xf:message> > </xf:submission> > <xf:submission id="load" method="get" serialization="none" > replace="instance" action="file://"> > <xf:message level="modeless" ev:event="xforms-submit-error">Submit > error.</xf:message> > </xf:submission> > </xf:model> > </head> > <body> > <xf:group ref="/Address"> > <fieldset> > <legend>Mailing Address</legend> > <xf:input ref="LocationStreetFullText"> > <xf:label>Street:</xf:label> > </xf:input> > <br/> > <xf:input ref="LocationCityName"> > <xf:label>City:</xf:label> > </xf:input> > <br/> > <xf:input ref="LocationStateName"> > <xf:label>State:</xf:label> > </xf:input> > <br/> > <xf:input ref="LocationPostalID"> > <xf:label>Postal Code:</xf:label> > </xf:input> > </fieldset> > </xf:group> > <xf:submit submission="save"> > <xf:label>Save to local disk</xf:label> > </xf:submit> > <xf:submit submission="load"> > <xf:label>Restore from local disk</xf:label> > </xf:submit> > </body> > </html> > > |
From: ac <ac...@hy...> - 2011-03-04 18:25:53
|
Hi Alain, Using RC3 from 2011-02-27, I tried getting the applet-based saving and loading but I must have missed something as I am getting this message when I either try to load or save: XSLTForms Submission --------------------------- file:// file:// is not supported for security reasons. Contents copied instead in clipboard if possible and displayed by the browser. In the model, I used <xf:submission id="save" method="put" replace="none" action="file://"> <xf:message level="modeless" ev:event="xforms-submit-error">Submit error.</xf:message> </xf:submission> <xf:submission id="load" method="get" serialization="none" replace="instance" action="file://"> <xf:message level="modeless" ev:event="xforms-submit-error">Submit error.</xf:message> </xf:submission> and in the form I have: <xf:submit submission="save"> <xf:label>Save to local disk</xf:label> </xf:submit> <xf:submit submission="load"> <xf:label>Restore from local disk</xf:label> </xf:submit> What must I be doing wrong this time :)? Thank you. Rgards, Andre Hello, I have added"file://" support in submission allowing users to save and restore data instances on local disk with regular files. This is based on a Java applet. There are some integrated security restrictions such as forbidden file extensions (.exe,...) and maximum size (100 Mo). BOM is not yet supported. Each time, a Java file dialog is displayed to allow the user to select the folder and to enter the file shortname. This dialog is initialized with the path after"file://", if any. I have tested this successfully on Windows with FireFox, IE and Chrome (there were some errors before accepting the applet, maybe wait instructions (1 or 2 seconds) might help...) but it doesn't work yet with Opera. Please find my test case below. Thank you for your feedbacks! -Alain ------------------------------------------------------------------------ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:xf="http://www.w3.org/2002/xforms"> <head> <title>Address Form</title> <xf:model> <xf:instance> <Address xmlns=""> <LocationStreetFullText/> <LocationCityName/> <LocationStateName/> <LocationPostalID/> </Address> </xf:instance> <xf:submission id="save" method="put" replace="none" action="file://"> <xf:message level="modeless" ev:event="xforms-submit-error">Submit error.</xf:message> </xf:submission> <xf:submission id="load" method="get" serialization="none" replace="instance" action="file://"> <xf:message level="modeless" ev:event="xforms-submit-error">Submit error.</xf:message> </xf:submission> </xf:model> </head> <body> <xf:group ref="/Address"> <fieldset> <legend>Mailing Address</legend> <xf:input ref="LocationStreetFullText"> <xf:label>Street:</xf:label> </xf:input> <br/> <xf:input ref="LocationCityName"> <xf:label>City:</xf:label> </xf:input> <br/> <xf:input ref="LocationStateName"> <xf:label>State:</xf:label> </xf:input> <br/> <xf:input ref="LocationPostalID"> <xf:label>Postal Code:</xf:label> </xf:input> </fieldset> </xf:group> <xf:submit submission="save"> <xf:label>Save to local disk</xf:label> </xf:submit> <xf:submit submission="load"> <xf:label>Restore from local disk</xf:label> </xf:submit> </body> </html> |
From: Dan M. <dan...@gm...> - 2011-03-04 12:20:33
|
Hi David, I think this might be a mix of SVG and XForms questions. I am using the SVGWeb JavaScript library that gives me more consistent SVG rendering on most platforms. See: http://code.google.com/p/svgweb The User Manual here shows how to get consistent sizing behavior even on IE 6, 7 and 8 which is automatically converted to flash. I have had very good success using the JQuery slider control to create interactive SVG applications but unfortunatly I have had to use JavaScript to do this. I am hoping that eventually XSLTforms has range control support. I have a few demos here: http://demo.danmccreary.com/rest/db/dma/apps/svg/views/view-item.xq?id=2 - Dan On Thu, Mar 3, 2011 at 4:17 PM, David French <da...@so...> wrote: > > I am trying to output an SVG image through xlstforms clientside (following > the example of http://en.wikibooks.org/wiki/XForms/SVG). > > With Firefox 3.6 ,Firefox 4.0 and Chrome, nothing I do seems to affect the > size of the output resulting in horizontal and vertical sliders being > applied when actual image is larger than space assumed. A minimal test > example is available here > http://soundings01.appspot.com/xsltforms/xfsvg4.xml > The default image size also varies depending on browser. Chrome shows a > smaller portion of the image than Firefox (4 beta 12). Inspecting the > element in Chrome shows span.xforms-value of 300x19. > > IE 8 appears to be constrained by the style width and height so that if the > width/height are less than the image dimensions the top left corner of the > image alone is visible with no sliders added (see > http://soundings01.appspot.com/xsltforms/xfsvg5.xml) but if the image is > smaller than the styling width height, the full image is seen. The rendering > appears to be done by silverlight in this instance. > > I am looking for consistent behaviour and a better understanding of how to > work around any differences. Any pointers? > Thanks > David > > > ------------------------------------------------------------------------------ > What You Don't Know About Data Connectivity CAN Hurt You > This paper provides an overview of data connectivity, details > its effect on application quality, and explores various alternative > solutions. http://p.sf.net/sfu/progress-d2d > _______________________________________________ > Xsltforms-support mailing list > Xsl...@li... > https://lists.sourceforge.net/lists/listinfo/xsltforms-support > > -- Dan McCreary Semantic Solutions Architect office: (952) 931-9198 cell: (612) 986-1552 |
From: David F. <da...@so...> - 2011-03-03 22:17:47
|
I am trying to output an SVG image through xlstforms clientside (following the example of http://en.wikibooks.org/wiki/XForms/SVG). With Firefox 3.6 ,Firefox 4.0 and Chrome, nothing I do seems to affect the size of the output resulting in horizontal and vertical sliders being applied when actual image is larger than space assumed. A minimal test example is available here http://soundings01.appspot.com/xsltforms/xfsvg4.xml The default image size also varies depending on browser. Chrome shows a smaller portion of the image than Firefox (4 beta 12). Inspecting the element in Chrome shows span.xforms-value of 300x19. IE 8 appears to be constrained by the style width and height so that if the width/height are less than the image dimensions the top left corner of the image alone is visible with no sliders added (see http://soundings01.appspot.com/xsltforms/xfsvg5.xml) but if the image is smaller than the styling width height, the full image is seen. The rendering appears to be done by silverlight in this instance. I am looking for consistent behaviour and a better understanding of how to work around any differences. Any pointers? Thanks David |
From: COUTHURES A. <ala...@ag...> - 2011-02-25 08:08:28
|
Hi André, > I have a first, not too large, xf:instance that we can call "data" > and its elements and attributes are mapped to displayed form fields as > first: string, last: string, for example. > > I have an xf:select1 that gets loaded from server calculations > including database accesses (not from preset files) > > This is in a multi-user context, where, for example, the xf:select1 > options depend on user rights or affiliations, as well as context, > state, and content. > > When a user makes a selection in the xf:select, typically, a new > "data" xf:instance, with the same structure but different content, is > dynamically generated on the server and returned to the form. > Accordingly, based on a (state/type) value (that is only changed by > the server) in an attribute of that xf:instance, the corresponding > displayed fields can change, where, for example, first and last are > now (visually) replaced by id: integer, count:integer, date: date XForms can manage such a situation: * an xf:repeat on any element (for example, just "*") will permit to have a variable number of input controls * the label for each input control can be generated from the name() XPath function if there is no attribute, for example, for that purpose in the instance * bindings in the model, a specific XML Schema or the use of the xsi:type attribute will change the input control behavior from string to integer or date > > The form also has an "update" button, which when clicked, sends the > current xf:select1 selected value and the current "data" xf:instance > to the server, to get a new set of computed values for the xf:select1, > as well as a new "data" xf:instance (matching the new default > xf:select1 selected value), requiring a new set of display fields to > match the content of the new "data" xf:instance. The constraint is that only one instance can be serialized for a submission. But, you can maintain a dedicated instance just for submission, you can also use the resource element to generate a query string or a composed URL. In your example, a unique instance sounds good. > > Although there is more, including more buttons and submission types, > as well as the possibility of local save/load for any xf:instance, > they remain stable through the different states, and should not affect > the state dependent strategy at stake here, and for which I have to > select an approach, that I am still unsure of. XForms is powerful enough for this situation because it can be versatile. > > I first considered doing a submit on every change and letting the > server regenerate a new (version of the) form and send it back to the > user. That should probably work, but I can see options that may > provide a possibly more responsive user interface, including having > some Javascript to dynamically build the appropriate display fields > for the varying "data" xf:instance cases (there are currently up to > 16, quite similar, but with some differences). This dynamic > Javascript-based display area building may be also quite useful when > local-loading the xf:model. > > I understand that this is quite specific, application oriented, that > different options may be relatively equivalent, and that you have > other things to worry about, but if you do have a feel for this, I > would appreciate your guidance, knowing that in the worst case, I will > simply let the server regenerate the form at every change (submit), > possibly allowing local-load only in the proper form context/state. I consider that there is no need for replacing all the form at each selection. I don't understand why extra Javascript instructions would be required for local-loading, the new XSLTForms Java applet should be enough, don't you think? Thanks! -Alain |
From: ac <ac...@hy...> - 2011-02-25 04:56:33
|
Hi Alain, This is quite useful and provides me with a good example. On the other hand, the issue I am facing is a little different and I will try to briefly describe a simplified version and focus on points that I am still unsure of, if you do not mind. I have a first, not too large, xf:instance that we can call "data" and its elements and attributes are mapped to displayed form fields as first: string, last: string, for example. I have an xf:select1 that gets loaded from server calculations including database accesses (not from preset files) This is in a multi-user context, where, for example, the xf:select1 options depend on user rights or affiliations, as well as context, state, and content. When a user makes a selection in the xf:select, typically, a new "data" xf:instance, with the same structure but different content, is dynamically generated on the server and returned to the form. Accordingly, based on a (state/type) value (that is only changed by the server) in an attribute of that xf:instance, the corresponding displayed fields can change, where, for example, first and last are now (visually) replaced by id: integer, count:integer, date: date The form also has an "update" button, which when clicked, sends the current xf:select1 selected value and the current "data" xf:instance to the server, to get a new set of computed values for the xf:select1, as well as a new "data" xf:instance (matching the new default xf:select1 selected value), requiring a new set of display fields to match the content of the new "data" xf:instance. Although there is more, including more buttons and submission types, as well as the possibility of local save/load for any xf:instance, they remain stable through the different states, and should not affect the state dependent strategy at stake here, and for which I have to select an approach, that I am still unsure of. I first considered doing a submit on every change and letting the server regenerate a new (version of the) form and send it back to the user. That should probably work, but I can see options that may provide a possibly more responsive user interface, including having some Javascript to dynamically build the appropriate display fields for the varying "data" xf:instance cases (there are currently up to 16, quite similar, but with some differences). This dynamic Javascript-based display area building may be also quite useful when local-loading the xf:model. I understand that this is quite specific, application oriented, that different options may be relatively equivalent, and that you have other things to worry about, but if you do have a feel for this, I would appreciate your guidance, knowing that in the worst case, I will simply let the server regenerate the form at every change (submit), possibly allowing local-load only in the proper form context/state. In any case, thank you. Regards, Andre > Hi André, > > Please find attached an example with two xf:select, the second one > been loaded from the first one. > > It appears there is a small issue with XSLTForms: the second xf:select > is not reseted to "no value" after loading. Mozilla XForms Extension > handles this example correctly. > > Is it what you were looking for? > > -Alain > > Le 24/02/2011 17:21, ac a écrit : >> Hi Alain, >> >> This sounds just great. It seems that my main issue is getting >> access to so XSLTForms examples and documentation. Unfortunately I >> have not found much. Do you know better? For example, how would the >> server return a loaded xf:select? as part of the model? in a separate >> model? The separate model sounds just fine. How should I address >> each model? This is obviously basic usage stuff. There must some >> documentation somewhere. I checked the spec, the wiki, XForms. I >> get some ideas but I need to get operational quick here. Just a few >> appropriate examples would surely do the trick. Where could I find them? >> >> I am sorry to waste your time with this. >> >> Thank you. >> >> Andre > |
From: COUTHURES A. <ala...@ag...> - 2011-02-24 21:18:25
|
Hi André, Please find attached an example with two xf:select, the second one been loaded from the first one. It appears there is a small issue with XSLTForms: the second xf:select is not reseted to "no value" after loading. Mozilla XForms Extension handles this example correctly. Is it what you were looking for? -Alain Le 24/02/2011 17:21, ac a écrit : > Hi Alain, > > This sounds just great. It seems that my main issue is getting access > to so XSLTForms examples and documentation. Unfortunately I have not > found much. Do you know better? For example, how would the server > return a loaded xf:select? as part of the model? in a separate model? > The separate model sounds just fine. How should I address each > model? This is obviously basic usage stuff. There must some > documentation somewhere. I checked the spec, the wiki, XForms. I get > some ideas but I need to get operational quick here. Just a few > appropriate examples would surely do the trick. Where could I find them? > > I am sorry to waste your time with this. > > Thank you. > > Andre |
From: COUTHURES A. <ala...@ag...> - 2011-02-24 17:57:09
|
Hi Grégoire, Sorry for this regression. Could you please test again with if (action.substr && action.substr(0,7) == "file://" && !document.applets["xsltforms"]) { Thanks! -Alain Le 24/02/2011 18:35, Grégoire COLBERT a écrit : > Hi Alain, > > Thank you for rev 485! :-) Though, I have the following error message > during initialization: > > /Error initializing : > > TypeError: Object #<a Binding> has no method 'substr' > at XFCoreElement.XFSubmission > (http://localhost:8080/xsltforms/branches/dataisland/build/xsltforms.js:2459:13)/ > > The problem is there: > > this.action = action; > if (*action.substr(0,7)* == "file://" && > !document.applets["xsltforms"]) { > Core.loadapplet(); > } > > My form looks like: > > <xf:model id="modele-connexion"> > <xf:submission id="some-id" method="get" serialization="none" > replace="instance" instance="id-for-the-response-instance"> > <xf:resource value="concat('/services/clients/connexion/' , > instance('instance-connexion-requete')/courriel , ':' , > instance('instance-connexion-requete')/hash-mot-de-passe)"/> > <xf:action ev:event="xforms-submit-done" > if="instance('instance-connexion-reponse')/clef != 0"> > (...) > </xf:action> > </xf:submission> > </xf:model> > > Hope this helps! > > Grégoire |
From: Grégoire C. <gco...@gm...> - 2011-02-24 17:35:52
|
Hi Alain, Thank you for rev 485! :-) Though, I have the following error message during initialization: /Error initializing : TypeError: Object #<a Binding> has no method 'substr' at XFCoreElement.XFSubmission (http://localhost:8080/xsltforms/branches/dataisland/build/xsltforms.js:2459:13)/ The problem is there: this.action = action; if (*action.substr(0,7)* == "file://" && !document.applets["xsltforms"]) { Core.loadapplet(); } My form looks like: <xf:model id="modele-connexion"> <xf:submission id="some-id" method="get" serialization="none" replace="instance" instance="id-for-the-response-instance"> <xf:resource value="concat('/services/clients/connexion/' , instance('instance-connexion-requete')/courriel , ':' , instance('instance-connexion-requete')/hash-mot-de-passe)"/> <xf:action ev:event="xforms-submit-done" if="instance('instance-connexion-reponse')/clef != 0"> (...) </xf:action> </xf:submission> </xf:model> Hope this helps! Grégoire |
From: Efraim F. <efr...@gm...> - 2011-02-24 16:57:18
|
Hi Alain, I retried my test form on r485, and it is now working. Thanks! -- --- Efraim Feinstein Lead Developer Open Siddur Project http://opensiddur.net http://wiki.jewishliturgy.org |
From: ac <ac...@hy...> - 2011-02-24 16:21:50
|
Hi Alain, This sounds just great. It seems that my main issue is getting access to so XSLTForms examples and documentation. Unfortunately I have not found much. Do you know better? For example, how would the server return a loaded xf:select? as part of the model? in a separate model? The separate model sounds just fine. How should I address each model? This is obviously basic usage stuff. There must some documentation somewhere. I checked the spec, the wiki, XForms. I get some ideas but I need to get operational quick here. Just a few appropriate examples would surely do the trick. Where could I find them? I am sorry to waste your time with this. Thank you. Andre > Hi André, > > XForms instances are basically used to store input values entered by > the user but can also be used to dynamically construct and update > controls such as xf:select1 or others. Instances can be initialized > internally or externally and submissions permit to replace data into > them. This can appear on every possible event so a sub-control can be > populated dynamically. > > Defining different models allows to limit refresh operations. I'm also > considering the always read only constraint for performance. > > Mixing HTML controls with XForms controls is possible with XSLTForms > but not recommended because it requires complex use of Javascript. > > Do you have other questions? > > -Alain > > Le 23/02/2011 16:38, ac a écrit : >> Hi Alain, >> >> This seems like a trivial question, but looking around, I have not >> found an answer yet, so I am turning to you. >> >> Along with a main model, some XSLTForms have to display a selector >> (e.g. xf:select1) where the options are typically provided by a >> server, typically on return from a previous form submission. What is >> the best practice for managing this? Should the options be part of >> the model and some script in the form loads them to the selector? >> can the pre-loaded selector be part of the model? is there a better >> way of doing this? In this case, although it seems preferable, there >> is no requirement for the selector to be xForm, as it could be html, >> other than it needs to be transmitted and received together with the >> (main) XSLTForms model. The number and exact nature of the selector >> options do vary according to context, previous selections, and >> submitted model content. Also there is typically more than one >> selector involved, along with other guizmos like checkboxes etc. >> >> Thank you. >> >> Regards, >> Andre >> >> >> > > |
From: COUTHURES A. <ala...@ag...> - 2011-02-24 14:25:46
|
Hi André, XForms instances are basically used to store input values entered by the user but can also be used to dynamically construct and update controls such as xf:select1 or others. Instances can be initialized internally or externally and submissions permit to replace data into them. This can appear on every possible event so a sub-control can be populated dynamically. Defining different models allows to limit refresh operations. I'm also considering the always read only constraint for performance. Mixing HTML controls with XForms controls is possible with XSLTForms but not recommended because it requires complex use of Javascript. Do you have other questions? -Alain Le 23/02/2011 16:38, ac a écrit : > Hi Alain, > > This seems like a trivial question, but looking around, I have not > found an answer yet, so I am turning to you. > > Along with a main model, some XSLTForms have to display a selector > (e.g. xf:select1) where the options are typically provided by a > server, typically on return from a previous form submission. What is > the best practice for managing this? Should the options be part of > the model and some script in the form loads them to the selector? can > the pre-loaded selector be part of the model? is there a better way of > doing this? In this case, although it seems preferable, there is no > requirement for the selector to be xForm, as it could be html, other > than it needs to be transmitted and received together with the (main) > XSLTForms model. The number and exact nature of the selector options > do vary according to context, previous selections, and submitted model > content. Also there is typically more than one selector involved, > along with other guizmos like checkboxes etc. > > Thank you. > > Regards, > Andre > > > |
From: Grégoire C. <gco...@gm...> - 2011-02-23 16:52:46
|
Hi, I don't know what the "req.status = 0" case is for, but for sure I forgot about it! The fix should be: if ((req.status != 0 && req.status < 200) || req.status >= 300) { evcontext["error-type"] = "resource-error"; subm.issueSubmitException_(evcontext, req, null); xforms.closeAction(); return; } Hope this is right, now! :-) Regards, Grégoire Le 23/02/2011 17:43, Grégoire COLBERT a écrit : > Me again! > > I found where the problem comes from! Not from the > "xforms-submit-done" event, but from my 201 return code (XSLTForms rev > 484 only expects 200). > > *Fix:* in function "XFSubmission.prototype.submit", replace: > > if (req.status != 200 && req.status != 0) { > evcontext["error-type"] = "resource-error"; > subm.issueSubmitException_(evcontext, req, null); > xforms.closeAction(); > return; > } > > with : > > if (req.status < 200 || req.status >= 300) { > evcontext["error-type"] = "resource-error"; > subm.issueSubmitException_(evcontext, req, null); > xforms.closeAction(); > return; > } > > Just tested it and it works fine! Very cool! > > Cheers, > Grégoire > > > Le 23/02/2011 17:02, Grégoire COLBERT a écrit : >> Hi! >> >> Another problem I encountered (r484) is that it only works with >> "xforms-submit-error" and not with "xforms-submit-done". >> >> Non-working (but valid) example: >> >> <xf:action ev:event="*xforms-submit-done*" >> if="event('response-status-code') = 201"> >> <xf:message>Response is 201, good!</xf:message> >> </xf:action> >> >> Working (but non-valid) example: >> >> <xf:action ev:event="*xforms-submit-error*" >> if="event('response-status-code') = 201"> >> <xf:message>Response is 201, good!</xf:message> >> </xf:action> >> >> As you know, status-codes 2xx are not errors but successes. >> >> According to: >> http://www.w3.org/TR/xforms11/#submit-evt-submit-done >> this looks like a bug. >> >> Best regards, >> Grégoire >> >> PS : Efraim is right, the 'response-body' header does something strange. >> >> Le 22/02/2011 17:14, Efraim Feinstein a écrit : >>> Hi, >>> >>> I made a little more progress understanding the failures involving >>> responses/REST errors. I'm using dataisland branch r484. >>> >>> The attached code demonstrates that if you receive an error, it will >>> invoke the error handler and show the message. >>> >>> If, however the 'response-body' event is referenced (uncomment it in >>> the example), the event handler never occurs. That may be why >>> Grégoire and I were getting different results. >>> >>> Hope this helps, >>> -Efraim >>> >>> On 02/13/2011 10:49 AM, Grégoire COLBERT wrote: >>>> Hi! >>>> >>>> Le 13/02/2011 04:30, Efraim Feinstein a écrit : >>>>> Hi, >>>>> Never mind. I see that r480 has some new code in it for response >>>>> headers. I tried it with the attached code. I'm finding that it >>>>> does give the correct 404 error message when you press the button, >>>>> but it also returns a long error message in a popup dialog when >>>>> the page is first loaded. >>>>> >>>>> The text of the error is: >>>>> XSLTForms Exception >>>>> -------------------------- >>>>> (...) >>>> >>>> I get the same initialization error, but I don't get any output >>>> (the pop-up is not displayed and no JS error is raised). >>>> >>>> I use: >>>> >>>> <xf:action ev:event="xforms-submit-done"> >>>> <xf:message><xf:output >>>> value="event('response-status-code')"/></xf:message> >>>> </xf:action> >>>> >>>> This is based on the example at : >>>> http://www.w3.org/TR/xforms11/#submit-evt-submit-done >>>> >>>> Anyway, thank you Alain for your very quick answer! >>>> >>>> Best regards, >>>> Grégoire >>>> >>>> >>>> ------------------------------------------------------------------------------ >>>> The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: >>>> Pinpoint memory and threading errors before they happen. >>>> Find and fix more than 250 security defects in the development cycle. >>>> Locate bottlenecks in serial and parallel code that limit performance. >>>> http://p.sf.net/sfu/intel-dev2devfeb >>>> >>>> >>>> _______________________________________________ >>>> Xsltforms-support mailing list >>>> Xsl...@li... >>>> https://lists.sourceforge.net/lists/listinfo/xsltforms-support >>>> >>> >>> >>> -- >>> --- >>> Efraim Feinstein >>> Lead Developer >>> Open Siddur Project >>> http://opensiddur.net >>> http://wiki.jewishliturgy.org >>> >>> >>> ------------------------------------------------------------------------------ >>> Index, Search & Analyze Logs and other IT data in Real-Time with Splunk >>> Collect, index and harness all the fast moving IT data generated by your >>> applications, servers and devices whether physical, virtual or in the cloud. >>> Deliver compliance at lower cost and gain new business insights. >>> Free Software Download: http://p.sf.net/sfu/splunk-dev2dev >>> >>> >>> _______________________________________________ >>> Xsltforms-support mailing list >>> Xsl...@li... >>> https://lists.sourceforge.net/lists/listinfo/xsltforms-support >> > |
From: Grégoire C. <gco...@gm...> - 2011-02-23 16:43:58
|
Me again! I found where the problem comes from! Not from the "xforms-submit-done" event, but from my 201 return code (XSLTForms rev 484 only expects 200). *Fix:* in function "XFSubmission.prototype.submit", replace: if (req.status != 200 && req.status != 0) { evcontext["error-type"] = "resource-error"; subm.issueSubmitException_(evcontext, req, null); xforms.closeAction(); return; } with : if (req.status < 200 || req.status >= 300) { evcontext["error-type"] = "resource-error"; subm.issueSubmitException_(evcontext, req, null); xforms.closeAction(); return; } Just tested it and it works fine! Very cool! Cheers, Grégoire Le 23/02/2011 17:02, Grégoire COLBERT a écrit : > Hi! > > Another problem I encountered (r484) is that it only works with > "xforms-submit-error" and not with "xforms-submit-done". > > Non-working (but valid) example: > > <xf:action ev:event="*xforms-submit-done*" > if="event('response-status-code') = 201"> > <xf:message>Response is 201, good!</xf:message> > </xf:action> > > Working (but non-valid) example: > > <xf:action ev:event="*xforms-submit-error*" > if="event('response-status-code') = 201"> > <xf:message>Response is 201, good!</xf:message> > </xf:action> > > As you know, status-codes 2xx are not errors but successes. > > According to: > http://www.w3.org/TR/xforms11/#submit-evt-submit-done > this looks like a bug. > > Best regards, > Grégoire > > PS : Efraim is right, the 'response-body' header does something strange. > > Le 22/02/2011 17:14, Efraim Feinstein a écrit : >> Hi, >> >> I made a little more progress understanding the failures involving >> responses/REST errors. I'm using dataisland branch r484. >> >> The attached code demonstrates that if you receive an error, it will >> invoke the error handler and show the message. >> >> If, however the 'response-body' event is referenced (uncomment it in >> the example), the event handler never occurs. That may be why >> Grégoire and I were getting different results. >> >> Hope this helps, >> -Efraim >> >> On 02/13/2011 10:49 AM, Grégoire COLBERT wrote: >>> Hi! >>> >>> Le 13/02/2011 04:30, Efraim Feinstein a écrit : >>>> Hi, >>>> Never mind. I see that r480 has some new code in it for response >>>> headers. I tried it with the attached code. I'm finding that it >>>> does give the correct 404 error message when you press the button, >>>> but it also returns a long error message in a popup dialog when the >>>> page is first loaded. >>>> >>>> The text of the error is: >>>> XSLTForms Exception >>>> -------------------------- >>>> (...) >>> >>> I get the same initialization error, but I don't get any output (the >>> pop-up is not displayed and no JS error is raised). >>> >>> I use: >>> >>> <xf:action ev:event="xforms-submit-done"> >>> <xf:message><xf:output >>> value="event('response-status-code')"/></xf:message> >>> </xf:action> >>> >>> This is based on the example at : >>> http://www.w3.org/TR/xforms11/#submit-evt-submit-done >>> >>> Anyway, thank you Alain for your very quick answer! >>> >>> Best regards, >>> Grégoire >>> >>> >>> ------------------------------------------------------------------------------ >>> The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: >>> Pinpoint memory and threading errors before they happen. >>> Find and fix more than 250 security defects in the development cycle. >>> Locate bottlenecks in serial and parallel code that limit performance. >>> http://p.sf.net/sfu/intel-dev2devfeb >>> >>> >>> _______________________________________________ >>> Xsltforms-support mailing list >>> Xsl...@li... >>> https://lists.sourceforge.net/lists/listinfo/xsltforms-support >>> >> >> >> -- >> --- >> Efraim Feinstein >> Lead Developer >> Open Siddur Project >> http://opensiddur.net >> http://wiki.jewishliturgy.org >> >> >> ------------------------------------------------------------------------------ >> Index, Search & Analyze Logs and other IT data in Real-Time with Splunk >> Collect, index and harness all the fast moving IT data generated by your >> applications, servers and devices whether physical, virtual or in the cloud. >> Deliver compliance at lower cost and gain new business insights. >> Free Software Download: http://p.sf.net/sfu/splunk-dev2dev >> >> >> _______________________________________________ >> Xsltforms-support mailing list >> Xsl...@li... >> https://lists.sourceforge.net/lists/listinfo/xsltforms-support > |
From: ac <ac...@hy...> - 2011-02-23 16:38:41
|
Hi Alain, This seems like a trivial question, but looking around, I have not found an answer yet, so I am turning to you. Along with a main model, some XSLTForms have to display a selector (e.g. xf:select1) where the options are typically provided by a server, typically on return from a previous form submission. What is the best practice for managing this? Should the options be part of the model and some script in the form loads them to the selector? can the pre-loaded selector be part of the model? is there a better way of doing this? In this case, although it seems preferable, there is no requirement for the selector to be xForm, as it could be html, other than it needs to be transmitted and received together with the (main) XSLTForms model. The number and exact nature of the selector options do vary according to context, previous selections, and submitted model content. Also there is typically more than one selector involved, along with other guizmos like checkboxes etc. Thank you. Regards, Andre |
From: Andre C. <ac...@01...> - 2011-02-23 16:26:50
|
Hi Alain, This seems like a trivial question, but looking around, I have not found an answer yet, so I am turning to you. Along with a main model, some XSLTForms have to display a selector (e.g. xf:select1) where the options are typically provided by a server, typically on return from a previous form submission. What is the best practice for managing this? Should the options be part of the model and some script in the form loads them to the selector? can the pre-loaded selector be part of the model? is there a better way of doing this? In this case, although it seems preferable, there is no requirement for the selector to be xForm, as it could be html, other than it needs to be transmitted and received together with the (main) XSLTForms model. The number and exact nature of the selector options do vary according to context, previous selections, and submitted model content. Also there is typically more than one selector involved, along with other guizmos like checkboxes etc. Thank you. Regards, Andre |
From: Grégoire C. <gco...@gm...> - 2011-02-23 16:02:32
|
Hi! Another problem I encountered (r484) is that it only works with "xforms-submit-error" and not with "xforms-submit-done". Non-working (but valid) example: <xf:action ev:event="*xforms-submit-done*" if="event('response-status-code') = 201"> <xf:message>Response is 201, good!</xf:message> </xf:action> Working (but non-valid) example: <xf:action ev:event="*xforms-submit-error*" if="event('response-status-code') = 201"> <xf:message>Response is 201, good!</xf:message> </xf:action> As you know, status-codes 2xx are not errors but successes. According to: http://www.w3.org/TR/xforms11/#submit-evt-submit-done this looks like a bug. Best regards, Grégoire PS : Efraim is right, the 'response-body' header does something strange. Le 22/02/2011 17:14, Efraim Feinstein a écrit : > Hi, > > I made a little more progress understanding the failures involving > responses/REST errors. I'm using dataisland branch r484. > > The attached code demonstrates that if you receive an error, it will > invoke the error handler and show the message. > > If, however the 'response-body' event is referenced (uncomment it in > the example), the event handler never occurs. That may be why Grégoire > and I were getting different results. > > Hope this helps, > -Efraim > > On 02/13/2011 10:49 AM, Grégoire COLBERT wrote: >> Hi! >> >> Le 13/02/2011 04:30, Efraim Feinstein a écrit : >>> Hi, >>> Never mind. I see that r480 has some new code in it for response >>> headers. I tried it with the attached code. I'm finding that it >>> does give the correct 404 error message when you press the button, >>> but it also returns a long error message in a popup dialog when the >>> page is first loaded. >>> >>> The text of the error is: >>> XSLTForms Exception >>> -------------------------- >>> (...) >> >> I get the same initialization error, but I don't get any output (the >> pop-up is not displayed and no JS error is raised). >> >> I use: >> >> <xf:action ev:event="xforms-submit-done"> >> <xf:message><xf:output >> value="event('response-status-code')"/></xf:message> >> </xf:action> >> >> This is based on the example at : >> http://www.w3.org/TR/xforms11/#submit-evt-submit-done >> >> Anyway, thank you Alain for your very quick answer! >> >> Best regards, >> Grégoire >> >> >> ------------------------------------------------------------------------------ >> The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: >> Pinpoint memory and threading errors before they happen. >> Find and fix more than 250 security defects in the development cycle. >> Locate bottlenecks in serial and parallel code that limit performance. >> http://p.sf.net/sfu/intel-dev2devfeb >> >> >> _______________________________________________ >> Xsltforms-support mailing list >> Xsl...@li... >> https://lists.sourceforge.net/lists/listinfo/xsltforms-support >> > > > -- > --- > Efraim Feinstein > Lead Developer > Open Siddur Project > http://opensiddur.net > http://wiki.jewishliturgy.org > > > ------------------------------------------------------------------------------ > Index, Search & Analyze Logs and other IT data in Real-Time with Splunk > Collect, index and harness all the fast moving IT data generated by your > applications, servers and devices whether physical, virtual or in the cloud. > Deliver compliance at lower cost and gain new business insights. > Free Software Download: http://p.sf.net/sfu/splunk-dev2dev > > > _______________________________________________ > Xsltforms-support mailing list > Xsl...@li... > https://lists.sourceforge.net/lists/listinfo/xsltforms-support |
From: C. M. Sperberg-M. <cm...@bl...> - 2011-02-23 15:10:24
|
On Feb 23, 2011, at 1:48 AM, COUTHURES Alain wrote: > Hello Michael, > >> A form I've written is behaving in an unexpected way; I wonder if >> there is a flaw in the way XSLTForms is loading this external instance >> or if there is a flaw in my expectations or my form. >> >> I've made a simplified version of the form and placed it at >> >> http://www.blackmesatech.com/2011/02/test.xhtml >> >> Short description: specifying an instance on another site leads either >> to a cross-site scripting error (more or less expected), or to a parse >> error because the browser (? or someone -- who?) is trying to parse >> the external XML document as Javascript. Main question: what is >> going on? >> > Here is my short answer ;-) Thank you very much. > > The cross-domain feature in XSLTForms is experimental. It is limited to JSONP because it appears to be the unique possibility. I will present this at XML Prague 2011! OK! I look forward to the talk. > >> I didn't think this would work, since I expected it to raise an >> immediate cross-site scripting error, but I made the change anyway so >> I could transcribe the precise wording of the error message and >> persuade the system administrator that his suggestion would not work >> and we'll need to work something else out. To my surprise, the form >> appears to be loading the document, without raising a cross-site >> scripting error (at least not in Safari). But it's not initializing >> the instance successfully. >> >> The demo test form has two instances, A and B. A is internal and is >> only there to illustrate that some things do work as expected. B is >> external and from a different domain (here, the form is on >> www.blackmesatech.com and instance B is served from >> tei2010.blackmesatech.com). >> >> The Safari activity window, the browser debugging tools in various >> browsers, and my server logs all show that when the form requests >> document B, it's appending '&callback=jsoninst' to the URI. So >> instead of a request for >> >> http://tei2010.blackmesatech.com/data/Gorbals/gorbals-1851-status-codes.xml >> >> the server is receiving a request for >> >> http://tei2010.blackmesatech.com/data/Gorbals/gorbals-1851-status-codes.xml&callback=jsoninst >> >> which doesn't exist. When I first encountered this problem, the URI >> in question already contained query parameters, so the >> "&callback=jsoninst" at the end was just one more and the document is >> served normally regardless. >> >> So my first question is: should the code that appends >> "callback=jsoninst" check to see whether there are already query >> parameters, and use "?" instead of "&" if there are not? >> >> For testing purposes, I've changed the relevant line in the definition >> of XFInstance.prototype.construct to >> >> scriptelt.setAttribute("src", this.src >> + ((this.src.indexOf("?") == -1) ? "?" : "&") + "callback=jsoninst"); >> >> The server is now receiving a request with "?callback=jsoninst" at the >> end, and serving the data normally (ignoring the unexpected query >> parameter). > Thank you for pointing at this issue. Because it's just experimental, it hadn't been tested yet without any parameter... > > XSLTForms is considering every cross-domain request to be of JSONP kind... I think that is the key point I failed to understand going in to this problem. It makes sense -- indeed, the fact that cross-site scripting restrictions are not enforced is often given as a reason to prefer JSON to XML, so I should have realized that any cross-site loading of data must use Javascript. >> > This is the way JSONP is working: a call to the callback function is generated by the external server with the JSON object as parameter. Right. OK, I think I understand that. > > > URL Rewriting might be a workaround: > > I tried adding this line in my localhost .htaccess Apache config file: > > RewriteRule gorbals-1851-status-codes.xml http://tei2010.blackmesatech.com/data/Gorbals/gorbals-1851-status-codes.xml [L] > > This way, an HTTP 302 Found code is sent back to the browser to ask for the redirection to be performed locally. Then, the corresponding new request sent by the browser is slightly different from the first one (a Range parameter is present...) and, unfortunately, tei2010.blackmesatech.com, at last, is answering with a 206 Partial Content code and a link-exception is generated... I will have to do some research to understand this, but it looks as if it should be worth the effort to learn. If it's possible to do simple proxying in this way by adding rewrite rules to the Apache configuration, that would solve this kind of problem for many purposes. Whenever we know, when writing a form, exactly what class of documents will be needed from other domains, then it would be very convenient to be able to provide proxy access to them simply by using rewrite rules in the .htaccess file. > > Activating the Apache proxy mechanism should be another possibility... > > Maybe your system administrator can change something for you in at least one of the servers config files. Yes. At the server configuration level, many things are possible. Michael -- **************************************************************** * C. M. Sperberg-McQueen, Black Mesa Technologies LLC * http://www.blackmesatech.com * http://cmsmcq.com/mib * http://balisage.net **************************************************************** |
From: COUTHURES A. <ala...@ag...> - 2011-02-23 08:47:57
|
Hello Michael, > A form I've written is behaving in an unexpected way; I wonder if > there is a flaw in the way XSLTForms is loading this external instance > or if there is a flaw in my expectations or my form. > > I've made a simplified version of the form and placed it at > > http://www.blackmesatech.com/2011/02/test.xhtml > > Short description: specifying an instance on another site leads either > to a cross-site scripting error (more or less expected), or to a parse > error because the browser (? or someone -- who?) is trying to parse > the external XML document as Javascript. Main question: what is > going on? > Here is my short answer ;-) The cross-domain feature in XSLTForms is experimental. It is limited to JSONP because it appears to be the unique possibility. I will present this at XML Prague 2011! > Longer description: I'm working on a form that loads a particular > external document. For reasons too complicated to go into here, the > document has more than one URI, and the system administrator has > suggested (or requested) that I load it from site X, even though my > form will be on site Y. If it matters, these are different host names > in the same second-level domain. Cross domain limitations appear if the full domain names with ports are different. > I didn't think this would work, since I expected it to raise an > immediate cross-site scripting error, but I made the change anyway so > I could transcribe the precise wording of the error message and > persuade the system administrator that his suggestion would not work > and we'll need to work something else out. To my surprise, the form > appears to be loading the document, without raising a cross-site > scripting error (at least not in Safari). But it's not initializing > the instance successfully. > > The demo test form has two instances, A and B. A is internal and is > only there to illustrate that some things do work as expected. B is > external and from a different domain (here, the form is on > www.blackmesatech.com and instance B is served from > tei2010.blackmesatech.com). > > The Safari activity window, the browser debugging tools in various > browsers, and my server logs all show that when the form requests > document B, it's appending '&callback=jsoninst' to the URI. So > instead of a request for > > http://tei2010.blackmesatech.com/data/Gorbals/gorbals-1851-status-codes.xml > > the server is receiving a request for > > http://tei2010.blackmesatech.com/data/Gorbals/gorbals-1851-status-codes.xml&callback=jsoninst > > which doesn't exist. When I first encountered this problem, the URI > in question already contained query parameters, so the > "&callback=jsoninst" at the end was just one more and the document is > served normally regardless. > > So my first question is: should the code that appends > "callback=jsoninst" check to see whether there are already query > parameters, and use "?" instead of "&" if there are not? > > For testing purposes, I've changed the relevant line in the definition > of XFInstance.prototype.construct to > > scriptelt.setAttribute("src", this.src > + ((this.src.indexOf("?") == -1) ? "?" : "&") + "callback=jsoninst"); > > The server is now receiving a request with "?callback=jsoninst" at the > end, and serving the data normally (ignoring the unexpected query > parameter). Thank you for pointing at this issue. Because it's just experimental, it hadn't been tested yet without any parameter... XSLTForms is considering every cross-domain request to be of JSONP kind... > Which leads to my main problem: the debugging tools in the browser > show that the external instance is being loaded, but they also show > the instance as having a fatal error, because it's not parseable as > Javascript. > A script element is created so it is executed immediately! > In Safari (5.0.3), the Web Inspector 'Resources' tab shows the XML > document being loaded, and clicking on the URI shows the header (yes > it's being served as application/xml) and content (looks like XML). > But the Content view also shows an error after the second line > (containing "<!DOCTYPE" ...): "SyntaxError: Parse error". The Error > console also shows line 2 of the document as raising a syntax error. > > In Firefox (3.6.13), the error console first shows a security error: > > Error: XForms Error (31): Security check failed! Trying to load > instance data from a different domain than document > Source File: http://www.blackmesatech.com/2011/02/test.xhtml > Line: 0 > Source Code: > <xf:instance id="B" resource="http://tei2010.blackmesatech.com/data/Gorbals/gorbals-1851-status-codes.xml"/> > > and then shows that the document has a syntax error on line 2, which > suggests that it was loaded anyway (I do not think I understand this, > but I have enough puzzles on my plate already). Mozilla XForms extension is intrusive: even if it shouldn't be activated, it always tries to show its own errors! > In Chrome (9.0.597.102), the error message in the error console reads > > Uncaught SyntaxError: Unexpected token< > > In Opera (11.01), the error console entry reads > > JavaScript - http://www.blackmesatech.com/2011/02/test.xhtml > Linked script compilation > Syntax error at line 2 while loading: > <!DOCTYPE codelist [ > ^ > expected expression, got '<' This is the way JSONP is working: a call to the callback function is generated by the external server with the JSON object as parameter. > Reading the source for the construct() function for instances, I am > not sure I understand what is going on, but it rather looks as if the > code is performing a simple end-run around the cross-site scripting > restrictions by pretending the external instance is Javascript and > adding a 'script' element to the document to cause the instance to be > loaded. In such a design, I would expect something somewhere to > undertake the task of doing something with the data once it's loaded. > I guess that it's the jsoninst() function that's supposed to do that. > > So perhaps it's significant that none of the debugging messages I've > added to jsoninst() ever show up in the debugging log. It looks a lot > as if jsoninst() is never being called, and I'm not entirely certain I > understand the mechanism by which it is supposed to be called. > > My second question is: ... well, I'm not sure what to ask. I'd like > to understand better what is going on here (sometimes I like being > able to avoid knowledge of the internals of tools I use, but it looks > like I need to suspend that principle here). Is this a known issue? > Does cross-site instance loading ever work? (I guess it must -- I > just don't understand how.) > > Any help anyone can give would be very welcome. There are other HTML elements than SCRIPT that have an src attribute but as far as I know, none of them allow to read their content with Javascript. > I'm running version 449 of xsltforms (which I think is what's included > in the xsltforms-beta3RC on sourceforge). The only modifications I > have made are the one indicated above and the inclusion of some > additional calls to DebugConsole.write in the construct() and > jsoninst() functions. > > ... > > p.s. Having drafted this, I've now spent some time reading a lot of > Web pages about the technique of dynamic 'script' elements and > have begun to wonder: is this intended to work only for XML > encoded as Javascript? Is the 'callback=jsoninst' a signal to the > server (a) to return JSON or Javascript, not XML or some other > format, and (b) to append a call to jsoninst() at the end of the > data? > > If so, then it's no wonder that loading an XML document doesn't > work. I wish I understood why security experts believe loading > XML documents from other sites is dangerous, but loading > executable code is safe. > Yes, browser security has big flaws to allow Web developers to use external Javascript libraries, external images and external frames passing them parameters. URL Rewriting might be a workaround: I tried adding this line in my localhost .htaccess Apache config file: RewriteRule gorbals-1851-status-codes.xml http://tei2010.blackmesatech.com/data/Gorbals/gorbals-1851-status-codes.xml [L] This way, an HTTP 302 Found code is sent back to the browser to ask for the redirection to be performed locally. Then, the corresponding new request sent by the browser is slightly different from the first one (a Range parameter is present...) and, unfortunately, tei2010.blackmesatech.com, at last, is answering with a 206 Partial Content code and a link-exception is generated... Activating the Apache proxy mechanism should be another possibility... Maybe your system administrator can change something for you in at least one of the servers config files. Thanks! -Alain |
From: C. M. Sperberg-M. <cm...@bl...> - 2011-02-23 02:38:21
|
A form I've written is behaving in an unexpected way; I wonder if there is a flaw in the way XSLTForms is loading this external instance or if there is a flaw in my expectations or my form. I've made a simplified version of the form and placed it at http://www.blackmesatech.com/2011/02/test.xhtml Short description: specifying an instance on another site leads either to a cross-site scripting error (more or less expected), or to a parse error because the browser (? or someone -- who?) is trying to parse the external XML document as Javascript. Main question: what is going on? Longer description: I'm working on a form that loads a particular external document. For reasons too complicated to go into here, the document has more than one URI, and the system administrator has suggested (or requested) that I load it from site X, even though my form will be on site Y. If it matters, these are different host names in the same second-level domain. I didn't think this would work, since I expected it to raise an immediate cross-site scripting error, but I made the change anyway so I could transcribe the precise wording of the error message and persuade the system administrator that his suggestion would not work and we'll need to work something else out. To my surprise, the form appears to be loading the document, without raising a cross-site scripting error (at least not in Safari). But it's not initializing the instance successfully. The demo test form has two instances, A and B. A is internal and is only there to illustrate that some things do work as expected. B is external and from a different domain (here, the form is on www.blackmesatech.com and instance B is served from tei2010.blackmesatech.com). The Safari activity window, the browser debugging tools in various browsers, and my server logs all show that when the form requests document B, it's appending '&callback=jsoninst' to the URI. So instead of a request for http://tei2010.blackmesatech.com/data/Gorbals/gorbals-1851-status-codes.xml the server is receiving a request for http://tei2010.blackmesatech.com/data/Gorbals/gorbals-1851-status-codes.xml&callback=jsoninst which doesn't exist. When I first encountered this problem, the URI in question already contained query parameters, so the "&callback=jsoninst" at the end was just one more and the document is served normally regardless. So my first question is: should the code that appends "callback=jsoninst" check to see whether there are already query parameters, and use "?" instead of "&" if there are not? For testing purposes, I've changed the relevant line in the definition of XFInstance.prototype.construct to scriptelt.setAttribute("src", this.src + ((this.src.indexOf("?") == -1) ? "?" : "&") + "callback=jsoninst"); The server is now receiving a request with "?callback=jsoninst" at the end, and serving the data normally (ignoring the unexpected query parameter). Which leads to my main problem: the debugging tools in the browser show that the external instance is being loaded, but they also show the instance as having a fatal error, because it's not parseable as Javascript. In Safari (5.0.3), the Web Inspector 'Resources' tab shows the XML document being loaded, and clicking on the URI shows the header (yes it's being served as application/xml) and content (looks like XML). But the Content view also shows an error after the second line (containing "<!DOCTYPE" ...): "SyntaxError: Parse error". The Error console also shows line 2 of the document as raising a syntax error. In Firefox (3.6.13), the error console first shows a security error: Error: XForms Error (31): Security check failed! Trying to load instance data from a different domain than document Source File: http://www.blackmesatech.com/2011/02/test.xhtml Line: 0 Source Code: <xf:instance id="B" resource="http://tei2010.blackmesatech.com/data/Gorbals/gorbals-1851-status-codes.xml"/> and then shows that the document has a syntax error on line 2, which suggests that it was loaded anyway (I do not think I understand this, but I have enough puzzles on my plate already). In Chrome (9.0.597.102), the error message in the error console reads Uncaught SyntaxError: Unexpected token < In Opera (11.01), the error console entry reads JavaScript - http://www.blackmesatech.com/2011/02/test.xhtml Linked script compilation Syntax error at line 2 while loading: <!DOCTYPE codelist [ ^ expected expression, got '<' Reading the source for the construct() function for instances, I am not sure I understand what is going on, but it rather looks as if the code is performing a simple end-run around the cross-site scripting restrictions by pretending the external instance is Javascript and adding a 'script' element to the document to cause the instance to be loaded. In such a design, I would expect something somewhere to undertake the task of doing something with the data once it's loaded. I guess that it's the jsoninst() function that's supposed to do that. So perhaps it's significant that none of the debugging messages I've added to jsoninst() ever show up in the debugging log. It looks a lot as if jsoninst() is never being called, and I'm not entirely certain I understand the mechanism by which it is supposed to be called. My second question is: ... well, I'm not sure what to ask. I'd like to understand better what is going on here (sometimes I like being able to avoid knowledge of the internals of tools I use, but it looks like I need to suspend that principle here). Is this a known issue? Does cross-site instance loading ever work? (I guess it must -- I just don't understand how.) Any help anyone can give would be very welcome. I'm running version 449 of xsltforms (which I think is what's included in the xsltforms-beta3RC on sourceforge). The only modifications I have made are the one indicated above and the inclusion of some additional calls to DebugConsole.write in the construct() and jsoninst() functions. ... p.s. Having drafted this, I've now spent some time reading a lot of Web pages about the technique of dynamic 'script' elements and have begun to wonder: is this intended to work only for XML encoded as Javascript? Is the 'callback=jsoninst' a signal to the server (a) to return JSON or Javascript, not XML or some other format, and (b) to append a call to jsoninst() at the end of the data? If so, then it's no wonder that loading an XML document doesn't work. I wish I understood why security experts believe loading XML documents from other sites is dangerous, but loading executable code is safe. -- **************************************************************** * C. M. Sperberg-McQueen, Black Mesa Technologies LLC * http://www.blackmesatech.com * http://cmsmcq.com/mib * http://balisage.net **************************************************************** |