Login  Register

Re: getting xml-text from request into instance as xml

Posted by fl.schmitt(ops-users) on Mar 23, 2011; 7:12am
URL: https://discuss.orbeon.com/getting-xml-text-from-request-into-instance-as-xml-tp3398083p3398678.html

Heinrich,

> I would like to have xml-formatted text which comes with the
> request-attributes into the form as *real* xml into aninstance.
>
>          <xf:bind
>             nodeset="instance('myInstance')/config"
>             calculate="xxforms:serialize(xxforms:get-request-attribute('myInstance'), 'xml')"/>
>
> is not working as expected/wished. The result differs in look and feel
> from writing it directly into the instance.

the calculate attribute is described in the 1.1 specs as follows (1):

"supplies an expression used to calculate a string value for the
associated instance data node"

important: a string value, not a nodeset. So, i assume you cant insert
a nodeset into a xforms:instance using bind/@calculate.

The wiki contains an example using xforms:insert:
http://wiki.orbeon.com/forms/how-to/load-initial-form-data#TOC-The-push-solution

Another way would be to use a xforms:submission, shown on the same page.

HTH
florian

(1) http://www.w3.org/TR/xforms11/#model-prop-calculate


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws