Login  Register

Upgrade 3.7.1 to 3.9 - Setting an id attribute value yields type error?

Posted by Thorsten Stumpf on Apr 05, 2011; 2:52pm
URL: https://discuss.orbeon.com/Upgrade-3-7-1-to-3-9-Setting-an-id-attribute-value-yields-type-error-tp3428286.html

Hi!

We are experiencing two problems on updating our 3.7.1 XForms to Orbeon
3.9.
The first is about expired sessions in portlet/embedded mode the other
is concerning an id-Attribute enforcing its' content to be a Boolean
value.

I will describe the two problems in two separate requests but I
definitely appreciate if you also have a look for the other mailing list
entry.

We are setting up our XForms on initialization by request to an external
XML document provided by an web service via an XPL-pipeline.
The retrieval of the document works good.
As soon as the document is loaded we're setting some values/drop-down
selects in our form in accordance to values provided by GET-Parameters.
This setting is done via xforms:setvalue declarations in a encapsulating
xforms:action group executed on xforms-submit-done and
xforms-value-changed events.

This is an excerpt of the document we read the value
//variante[../@typ='anreise']/@id from:

<varianten typ="anreise">
        <variante default="true" gewaehlt="true" id="VAR-2">
                <info>
                        <titel>Fluganreise</titel>
                        <dauer id="6">9</dauer>
                </info>
                <termindaten termin_id="2671340">
                ...
        </variante>
        <variante default="false" gewaehlt="false" id="VAR-10">
                <info>
                        <titel>Fluganreise</titel>
                        <dauer id="6">9</dauer>
                </info>
                <termindaten termin_id="2671353">
                ...
        </variante>
</varianten>


This is an excerpts from the document in which we set the value
//anreise/anreiseform/@id

<anreise>
        <anreiseform id=""/>
        <fluganreise>
                <abflughafen id="" iata=""/>
                <leistungscode/>
                <dlc_code/>
                <fluggesellschaft iata=""/>
                <flugzuschlag/>
                <fluganreise_bhf/>
                <businessclass/>
                <flugpzuschlag/>
        </fluganreise>
        <bahnanreise>
        ...
</anreise>


This is the executed setvalue declaration:

<xforms:setvalue
        ref="$reiseanmeldung/reisekonfiguration/anreise/anreiseform/@id"
        value="if ($reiseanmeldung/reisekonfiguration/termin/@termin_id
!= '' and . = '') then $anreisen[descendant::termindaten/@termin_id =
$reiseanmeldung/reisekonfiguration/termin/@termin_id]/@id else ." />

It does not work, throwing an 'The string "" cannot be cast to a
boolean' error.

I tried to understand what is the problem but the error seems to be
rather random:
Examples:
OK <xforms:setvalue
ref="$reiseanmeldung/reisekonfiguration/anreise/anreiseform/@id"
value="'VAR'" />
OK <xforms:setvalue
ref="$reiseanmeldung/reisekonfiguration/anreise/anreiseform/@id"
value="'VAR-'" />
ERROR <xforms:setvalue
ref="$reiseanmeldung/reisekonfiguration/anreise/anreiseform/@id"
value="'VAR-2'" />
OK <xforms:setvalue
ref="$reiseanmeldung/reisekonfiguration/anreise/anreiseform/@id"
value="'VAR-6'" />

OK <xforms:setvalue
ref="$reiseanmeldung/reisekonfiguration/anreise/anreiseform/@id"
                        value="if
($reiseanmeldung/reisekonfiguration/termin/@termin_id != '' and . = ''
and count($anreisen) &gt; 0) then
$anreisen[descendant::termindaten/@termin_id =
$reiseanmeldung/reisekonfiguration/termin/@termin_id]/info/dauer/@id
else ." />

I'm sure to miss something but I can't find out what.

Thanks for your help in advance

JT


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