Re: [Xsltforms-support] Error when using event function
Brought to you by:
alain-couthures
From: Philip F. <Phi...@ma...> - 2011-05-18 06:12:26
|
Alain, > I have modified the stringValue() function so it can also support a null value. Please have a look at r503. Yes I did, it works just fine now, thank you very much. Regards Philip From: Alain Couthures [mailto:ala...@ag...] Sent: Tuesday, May 17, 2011 9:46 PM To: Philip Fennell Cc: xsl...@li... Subject: Re: [Xsltforms-support] Error when using event function Hello Philip, I have modified the stringValue() function so it can also support a null value. Please have a look at r503. The test case you sent says that xf:message is actually already evaluated when initializing the form which should be avoided, I think. Thanks! -Alain Le 17/05/2011 13:30, Philip Fennell a écrit : When I try the same thing with Google Chrome () I get a little more info on the error: Type Error Cannot read property 'length' of null Something in or around the parsing of the event() function appears to be trying to get the length of a null value. Regards Philip Fennell Consultant MarkLogic Corporation One Kingdom Street Paddington Central London W2 6BD United Kingdom Mobile: +44 (0) 7824 830 866 Tel: +44 (0) 203 402 3619 email Phi...@ma...<mailto:Fir...@ma...> web www.marklogic.com<http://www.marklogic.com/> From: Philip Fennell [mailto:Phi...@ma...] Sent: Monday, May 16, 2011 1:10 PM To: xsl...@li...<mailto:xsl...@li...> Subject: [Xsltforms-support] Error when using event function Hello, I have found an issue with the r502 build of XSLTForms. I download the tarball for the 502 revision and copied its contents into my application. When my forms are being processed I get the following message: XSLTForms Exception -------------------------- Error initializing : stringValue(null)@http://localhost:8031/resource/xsltforms/xsltforms.js:8334<mailto:null)@http://localhost:8031/resource/xsltforms/xsltforms.js:8334> ([object Element],[object Array],0,[object Array])@http://localhost:8031/resource/xsltforms/xsltforms.js:1944<mailto:Array])@http://localhost:8031/resource/xsltforms/xsltforms.js:1944> ([object Object],[object Element])@http://localhost:8031/resource/xsltforms/xsltforms.js:4027<mailto:Element])@http://localhost:8031/resource/xsltforms/xsltforms.js:4027> ([object Element])@http://localhost:8031/resource/xsltforms/xsltforms.js:4136<mailto:Element])@http://localhost:8031/resource/xsltforms/xsltforms.js:4136> ([object Element])@http://localhost:8031/resource/xsltforms/xsltforms.js:4013<mailto:Element])@http://localhost:8031/resource/xsltforms/xsltforms.js:4013> ([object HTMLSpanElement],[object Element],true)@http://localhost:8031/resource/xsltforms/xsltforms.js:1807<mailto:true)@http://localhost:8031/resource/xsltforms/xsltforms.js:1807> ([object HTMLSpanElement],[object Element],true)@http://localhost:8031/resource/xsltforms/xsltforms.js:1824<mailto:true)@http://localhost:8031/resource/xsltforms/xsltforms.js:1824> ([object HTMLBodyElement],[object Element],true)@http://localhost:8031/resource/xsltforms/xsltforms.js:1824<mailto:true)@http://localhost:8031/resource/xsltforms/xsltforms.js:1824> ()@http://localhost:8031/resource/xsltforms/xsltforms.js:1754 ()@http://localhost:8031/resource/xsltforms/xsltforms.js:1643 initImpl()@http://localhost:8031/admin/events:27 init()@http://localhost:8031/admin/events:2 onload([object Event])@http://localhost:8031/admin/events:1 TypeError value is null After a process of elimination I got to this repeatable test case (see below) which generates the error. This is also a problem with r490 too. It does work with Beta3. <?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet href="/resource/xsltforms/xsltforms.xsl" type="text/xsl"?> <html xml:lang="en" lang="en" xmlns:atom="http://www.w3.org/2005/Atom"<http://www.w3.org/2005/Atom> xmlns:ev="http://www.w3.org/2001/xml-events"<http://www.w3.org/2001/xml-events> xmlns:xf="http://www.w3.org/2002/xforms"<http://www.w3.org/2002/xforms> xmlns:xs="http://www.w3.org/2001/XMLSchema"<http://www.w3.org/2001/XMLSchema> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"<http://www.w3.org/2001/XMLSchema-instance> xmlns:xhtml="http://www.w3.org/1999/xhtml"<http://www.w3.org/1999/xhtml> xmlns="http://www.w3.org/1999/xhtml"<http://www.w3.org/1999/xhtml>> <head> <title>EOI: Events Management</title> <meta http-equiv="content-language" content="en"/> <meta http-equiv="cache-control" content="no-cache"/> <meta http-equiv="Content-Type" content="text/html; <xf:model> <!-- === Collection. =========================================== --> <xf:submission id="retrieve-collection" method="get" instance="collection" replace="instance" resource="/events.atom" serialization="none"> <xf:action ev:event="xforms-submit-error"> <xf:message level="modal"> <xf:output value="event('response-reason-phrase')"/> </xf:message> </xf:action> </xf:submission> <xf:instance id="collection"> <atom:feed/> </xf:instance> <xf:bind id="entries" nodeset="instance('collection')/atom:entry"/> </xf:model> </head> <body> <div id="content"> </div> </body> </html> ------------------------------------------------------------------------------ Achieve unprecedented app performance and reliability What every C/C++ and Fortran developer should know. Learn how Intel has extended the reach of its next-generation tools to help boost performance applications - inlcuding clusters. http://p.sf.net/sfu/intel-dev2devmay _______________________________________________ Xsltforms-support mailing list Xsl...@li...<mailto:Xsl...@li...> https://lists.sourceforge.net/lists/listinfo/xsltforms-support |