Hello Mark!
Sorry for the delay.
As specified at http://www.w3.org/TR/2009/REC-xforms-20091020/#submit-get, the
default instance is always serialized as application/x-www-form-urlencoded
unless the serialization attribute is set to "none".
Thank you for your feedback!
--Alain
> Le 13 août 2014 à 17:05, Mark Lawson <[email protected]> a écrit :
>
>
> Hi,
>
> I’ve got an issue with calculated submissions using <xf:resource/> in 1.0RC2
>
> I’ve got a control instance with a case element. This gets set in a select1 to
> what case I want.
> I’ve a submission to get this case and put the results in the case_record
> instance:
>
>
> <!— Instance to hold the case —>
> <xf:instance id="case_record" xmlns="">
> <data></data>
> </xf:instance>
>
> <!— Instance to control bits of the form —>
> <xf:instance id=“control" xmlns="">
> <data>
> <case>A100000</case>
> <qstatus>OK</qstatus>
> </data>
> </xf:instance>
>
> <xf:submission id="getcase"
> method="get" replace="instance" instance="case_record"
> omit-xml-declaration="yes" >
> <xf:resource
> value="concat('v1/documents?uri=/cases/',instance(‘control')/case,'/case.xml')"/>
> </xf:submission>
>
> If I run this it works the first time, however the second time, it sends the
> calculated uri, *plus* every element now in the case_record (actually what
> ever is the first instance in the form). I can get around that, by creating a
> dummy instance at the top of my form that’s empty, i.e.
> <xf:instance><data/></xf:instance> but that seems a little messy.
>
> I’ve also found that adding an action attribute with the base of my uri works
> as well:
>
> <xf:submission id="getcase" action="v1/documents"
> method="get" replace="instance" instance="case_record"
> omit-xml-declaration="yes" >
> <xf:resource
> value="concat('v1/documents?uri=/cases/',instance(‘control')/case,'/case.xml')"/>
> </xf:submission>
>
> My question should I be able to create a submission with just a <xf:resource>
> in it, without a ref/action/resource attribute?
>
> Thanks,
>
> Mark Lawson
> Senior Technical Architect
> Staffordshire and West Midlands
> Community Rehabilitation Company
> [email protected]
> [sent from home email]
>
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Xsltforms-support mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/xsltforms-support------------------------------------------------------------------------------
Slashdot TV.
Video for Nerds. Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Xsltforms-support mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xsltforms-support