Re: [Xsltforms-support] Problem using submission
Brought to you by:
alain-couthures
|
From: Javier D. <jd...@ge...> - 2009-11-10 17:21:46
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Hello,<br>
My answer, below.<br>
<br>
COUTHURES Alain escribió:
<blockquote cite="mid:4AF...@ag..." type="cite">
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
Hello Javier,
<blockquote cite="mid:4AF...@ge..." type="cite">Hello,<br>
<br>
I have a xform with the following submission:<br>
<br>
<tt><xf:submission id="s01" method="post" replace="all" action="<b>/nucleo?FILE=pruebas/entornoReq.xml&amp;GRM_RESPUESTA=whitehtml&amp;XML=XFORM</b>"><br>
<xf:message level="modeless"
ev:event="xforms-submit-error">Submit error.</xf:message><br>
</xf:submission></tt><br>
<br>
That is get through the following url:<br>
<br>
<tt><a moz-do-not-send="true" class="moz-txt-link-freetext"
href="https://tuerca:8080/nucleo?FILE=pruebas/javi/xforms/pai-ip.xml&GRM_RESPUESTA=xsltforms">https://tuerca:8080/nucleo?FILE=pruebas/javi/xforms/pai-ip.xml&GRM_RESPUESTA=xsltforms</a><br>
<br>
</tt>When I use the submit that triggers the action of above, I get
that the page that is requested is:<br>
<br>
<tt><a moz-do-not-send="true" class="moz-txt-link-freetext"
href="https://tuerca:8080/nucleo?FILE=pruebas/javi/xforms/">https://tuerca:8080/nucleo?FILE=pruebas/javi/xforms/</a><b>/nucleo?FILE=pruebas/entornoReq.xml&GEREMIAS_RESPUESTA=whitehtml&XML=XFORM<br>
<br>
</b></tt>¿Is this a bug or a feature?<br>
</blockquote>
This is clearly not yet supported to have an action attribute value
starting with / ... Have a look at constructURI method of Core class to
add this feature (this should not be difficult in fact!) and I will
integrate your fix in XSLTForms.<br>
</blockquote>
Ok, I will investigate with constructURI.<br>
<br>
But I think the behaviour of the construction of the uri is also a bit
strange in the case that action does not start with / and is a relative
one. I mean, I you have an url like this:<br>
<br>
<tt><a moz-do-not-send="true" class="moz-txt-link-freetext"
href="https://tuerca:8080/nucleo?FILE=pruebas/javi/xforms/pai-ip.xml&GRM_RESPUESTA=xsltforms">https://tuerca:8080/nucleo?FILE=pruebas/javi/xforms/pai-ip.xml&GRM_RESPUESTA=xsltforms</a><br>
<br>
</tt>to construct the relative path to send a submit should be used
taking out the query part of the url, in this case "<tt><a
moz-do-not-send="true" class="moz-txt-link-freetext"
href="https://tuerca:8080/nucleo?FILE=pruebas/javi/xforms/pai-ip.xml&GRM_RESPUESTA=xsltforms">?FILE=pruebas/javi/xforms/pai-ip.xml&GRM_RESPUESTA=xsltforms</a></tt>",
so the url constructed (without taking into account the initial /)
should be, from: <br>
<br>
<tt>nucleo?FILE=pruebas/entornoReq.xml&amp;GRM_RESPUESTA=whitehtml&amp;XML=XFORM</tt><br>
<br>
the following:<br>
<br>
<tt><a class="moz-txt-link-freetext"
href="https://tuerca:8080/nucleo?FILE=pruebas/entornoReq.xml&GRM_RESPUESTA=whitehtml&XML=XFORM">https://tuerca:8080/nucleo?FILE=pruebas/entornoReq.xml&amp;GRM_RESPUESTA=whitehtml&amp;XML=XFORM</a></tt><br>
<br>
or in case you have subdirectories, from
<a class="moz-txt-link-rfc2396E"
href="https://tuerca:8080/subdir1/subdir2/nucleo?FILE=pruebas/entornoReq.xml&GRM_RESPUESTA=whitehtml&XML=XFORM">"https://tuerca:8080/subdir1/subdir2/nucleo?FILE=pruebas/entornoReq.xml&amp;GRM_RESPUESTA=whitehtml&amp;XML=XFORM"</a>,
the absolute uri of
"nucleo?FILE=pruebas/entornoReq.xml&amp;GRM_RESPUESTA=whitehtml&amp;XML=XFORM"
should be:<br>
<br>
<tt><a class="moz-txt-link-rfc2396E"
href="https://tuerca:8080/subdir1/subdir2/nucleo?FILE=pruebas/entornoReq.xml&GRM_RESPUESTA=whitehtml&XML=XFORM">"https://tuerca:8080/subdir1/subdir2/nucleo?FILE=pruebas/entornoReq.xml&amp;GRM_RESPUESTA=whitehtml&amp;XML=XFORM"</a></tt><br>
<u><br>
</u>In this last example, if we had as relative uri
"/nucleo?FILE=pruebas/entornoReq.xml&amp;GRM_RESPUESTA=whitehtml&amp;XML=XFORM",
the absolute uri should be:<br>
<tt><br>
<a class="moz-txt-link-rfc2396E"
href="https://tuerca:8080/nucleo?FILE=pruebas/entornoReq.xml&GRM_RESPUESTA=whitehtml&XML=XFORM">"https://tuerca:8080/nucleo?FILE=pruebas/entornoReq.xml&amp;GRM_RESPUESTA=whitehtml&amp;XML=XFORM"</a><br>
<br>
</tt>Am I missing something? I will try to change constructURI to have
this behaviour, I suppose it fits better with <a
href="http://tools.ietf.org/html/rfc3986">RFC 3986</a> (see section
5.2).<br>
<br>
Best Regards,<br>
Javier<br>
<blockquote cite="mid:4AF...@ag..." type="cite"><br>
Thanks!<br>
<br>
-Alain<br>
<br>
</blockquote>
</body>
</html>
|