[Xsltforms-support] Problem with preventing submission
Brought to you by:
alain-couthures
From: Aleksandar S. <ale...@pr...> - 2010-02-09 15:13:47
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=ISO-8859-2"> </head> <body bgcolor="#ffffff" text="#000000"> <font face="Calibri">Hi,<br> <br> I have a problem to prevent submission when form is not valid. Here is my test case:<br> <br> <small><font face="Courier New, Courier, monospace"><?xml version="1.0" encoding="utf-8"?><br> <?xml-stylesheet type="text/xsl" href="xsltforms/xsltforms.xsl"?><br> <html xmlns:xforms=<a class="moz-txt-link-rfc2396E" href="http://www.w3.org/2002/xforms">"http://www.w3.org/2002/xforms"</a> xmlns:ev=<a class="moz-txt-link-rfc2396E" href="http://www.w3.org/2001/xml-events">"http://www.w3.org/2001/xml-events"</a> xmlns:an=<a class="moz-txt-link-rfc2396E" href="http://www.together.at/2006/ANOTHER">"http://www.together.at/2006/ANOTHER"</a> xmlns=<a class="moz-txt-link-rfc2396E" href="http://www.w3.org/1999/xhtml">"http://www.w3.org/1999/xhtml"</a> xmlns:xsi=<a class="moz-txt-link-rfc2396E" href="http://www.w3.org/2001/XMLSchema-instance">"http://www.w3.org/2001/XMLSchema-instance"</a> xmlns:xpdl=<a class="moz-txt-link-rfc2396E" href="http://www.wfmc.org/2002/XPDL1.0">"http://www.wfmc.org/2002/XPDL1.0"</a> xmlns:xsd=<a class="moz-txt-link-rfc2396E" href="http://www.w3.org/2001/XMLSchema">"http://www.w3.org/2001/XMLSchema"</a> xmlns:xpil=<a class="moz-txt-link-rfc2396E" href="http://www.together.at/2006/XPIL1.0">"http://www.together.at/2006/XPIL1.0"</a>><br> <head><br> <title>Contact</title><br> <xforms:model><br> <br> <xforms:submission id="s01" method="post" show="new" replace="all" action="whatever.xml"><br> <xforms:message level="modeless" ev:event="xforms-submit-error">Submit error.</xforms:message><br> </xforms:submission><br> <br> <xforms:instance id="firstInstance"><br> <xpil:ExtendedWorkflowFacilityInstance><br> <xpil:StringDataInstance Id="firstname" Value="VALUE">INSIDE</xpil:StringDataInstance><br> </xpil:ExtendedWorkflowFacilityInstance><br> </xforms:instance><br> <br> <!--THIS DOESN'T WORK GOOD--><br> <xforms:bind id="firstname" required="true()" nodeset="instance('firstInstance')/xpil:StringDataInstance/@Value" constraint="string-length(.) &gt; 0" type="xsd:string" /><br> <br> <!--THIS WORKS--><br> <!--<xforms:bind id="firstname" required="true()" nodeset="instance('firstInstance')/xpil:StringDataInstance" constraint="string-length(.) &gt; 0" type="xsd:string" />--><br> <br> </xforms:model><br> </head><br> <body><br> <h2>Contact</h2><br> <xforms:group appearance="minimal"><br> <br> <xforms:input bind="firstname"><br> <xforms:label>Name</xforms:label><br> </xforms:input><br> <br> </xforms:group><br> <br> <xforms:submit submission="s01"><br> <xforms:label>View</xforms:label><br> </xforms:submit><br> </body><br> </html><br> </font></small><br> When I change value in input element validation is properly performed but I'm able to submit non-valid form.<br> I discovered that I CAN'T submit non-valid form when <small><font face="Courier New, Courier, monospace">nodeset </font></small>in <small><font face="Courier New, Courier, monospace">bind </font></small>element is "</font><font face="Calibri"><small><font face="Courier New, Courier, monospace">instance('firstInstance')/xpil:StringDataInstance</font></small></font><font face="Calibri">"</font><font face="Calibri"> but I CAN submit non-valid form when <small><font face="Courier New, Courier, monospace">nodset</font> </small>is "</font><font face="Calibri"><small><font face="Courier New, Courier, monospace">instance('firstInstance')/xpil:StringDataInstance/@Value</font></small></font><font face="Calibri">".<br> <br> Is this bug or I'm missing something?<br> <br> Regards</font><br> <b><span style="font-size: 9pt; font-family: "Tahoma","sans-serif"; letter-spacing: 0.3pt;" lang="SR"></span></b><span style="font-size: 8pt; font-family: "Tahoma","sans-serif"; letter-spacing: 0.3pt;" lang="SR"><o:p></o:p></span><o:p><br> </o:p> <div class="moz-signature"> <div class="Section1"></div> </div> </body> </html> |