Login  Register

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

Posted by Erik Bruchez on Mar 29, 2011; 4:51am
URL: https://discuss.orbeon.com/getting-xml-text-from-request-into-instance-as-xml-tp3398083p3413742.html

Heinrich,

You can configure xxforms:serialize() by passing a pointer to an
xsl:output element:

xxforms:serialize(/my/node, instance('xsl-output-instance'))"/>

<xforms:instance id="xsl-output-instance">
    <xsl:output xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
method="xml" omit-xml-declaration="yes"/>
</xforms:instance>

-Erik

On Wed, Mar 23, 2011 at 4:20 AM, Heinrich Götzger <[hidden email]> wrote:

> Florian,
>
> thanks for the answer.
>
> On 03/23/11 07:12, Florian Schmitt wrote:
>>
>> 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.
>
> Ok, that's what I figured.
>
>> The wiki contains an example using xforms:insert:
>>
>> http://wiki.orbeon.com/forms/how-to/load-initial-form-data#TOC-The-push-solution
>
> No, this is not working either.
>>
>> Another way would be to use a xforms:submission, shown on the same page.
>
> well that's the problem, I want to configure the endpoint by params coming
> from my servlet of a WebService used by a submission.
>>
>> HTH
>> florian
>>
>> (1) http://www.w3.org/TR/xforms11/#model-prop-calculate
>
> Cheers
>
> Heinrich
>
> --
> Before printing this e-mail, think about our environmental responsibility.
>
>
>
> --
> 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
>
>


--
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