Constrains question

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Constrains question

Robin Diederen
Constrains question

Hello all,

 

We're struggling with constraints; basically we want to limit the values a user can put into a textfield to certain numbers (the corresponding instance data is integer typed; want to define upper and lower bounds).

 

The example we found on the Orbeon documentation site (using Xpath constraints) doesn't seem to yield any results. We use the element in a xforms:repeat construction.

 

The relevant part from the Xforms model:

 

<xforms:instance id="tabel">
                     <ser:x xmlns:ser="http://www.anonymous.org/services">
                        <ser:pv categorie="1.1" activiteit="A">
                            <ser:handeling beschrijving="B">
                                <ser:frequentie>1</ser:frequentie>
                                <ser:checked>false</ser:checked>
                            </ser:handeling>
                            <ser:handeling beschrijving="B">
                                <ser:frequentie>1</ser:frequentie>
                                <ser:checked>false</ser:checked>
                            </ser:handeling>           
                        </ser:pv>

                    </ser:x>

</xforms:instance>

 

<xforms:bind nodeset="/ser:x/ser:pv/ser:handeling/ser:frequentie" type="xs:integer" constraint=". >= 1 and 12 >= ." readonly="true"/>

 

Where is the fault in this?

 

Best, Robin
 

 



--
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
Reply | Threaded
Open this post in threaded view
|

Re: Constrains question

Benjamin
Hi Robin,

use "gt" instead of ">=".   Its XPath 2.0 :-) :

http://orbeon-forms-ops-users.24843.n4.nabble.com/problem-with-constraints-for-numeric-values-td1561112.html#a1590015

All the best Benjamin

Robin Diederen schrieb:
Constrains question

Hello all,

 

We're struggling with constraints; basically we want to limit the values a user can put into a textfield to certain numbers (the corresponding instance data is integer typed; want to define upper and lower bounds).

 

The example we found on the Orbeon documentation site (using Xpath constraints) doesn't seem to yield any results. We use the element in a xforms:repeat construction.

 

The relevant part from the Xforms model:

 

<xforms:instance id="tabel">
                     <ser:x xmlns:ser="http://www.anonymous.org/services">
                        <ser:pv categorie="1.1" activiteit="A">
                            <ser:handeling beschrijving="B">
                                <ser:frequentie>1</ser:frequentie>
                                <ser:checked>false</ser:checked>
                            </ser:handeling>
                            <ser:handeling beschrijving="B">
                                <ser:frequentie>1</ser:frequentie>
                                <ser:checked>false</ser:checked>
                            </ser:handeling>           
                        </ser:pv>

                    </ser:x>

</xforms:instance>

 

<xforms:bind nodeset="/ser:x/ser:pv/ser:handeling/ser:frequentie" type="xs:integer" constraint=". >= 1 and 12 >= ." readonly="true"/>

 

Where is the fault in this?

 

Best, Robin
 

 


--
<b>Sven Jabusch</b>

Benjamin Jehle

Projektmanager

----------------------------------------------------------------

Deriva GmbH Financial IT and Consulting

Hans-Böckler-Straße 2 | D-37079 Göttingen

Tel: +49  (0)551 489 500-44

Fax:+49  (0)551 489 500-91

Email: [hidden email]

Web: www.deriva.de

----------------------------------------------------------------

Amtsgericht Göttingen | HRB 3240

Geschäftsführer: Dirk Baule, Ralf Rühling 

 



--
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
Reply | Threaded
Open this post in threaded view
|

RE: Re: Constrains question

Robin Diederen
RE: [ops-users] Re: Constrains question

 Hello Benjamin (and others),

 

I've been playing a bit with this and I'm getting somewhere... just not where I want to be :-).

 

For now I want all my elements called "frequentie" to carry a lower bound (=1) (and later a flexible upper bound). When I try this with a simple contraint, Orbeon complains this cannot be done because the "gt" operator cannot be applied to a sequence:

 

A sequence of more than one item is not allowed as the second operand of 'gt'

 

How do I solve this?

 

What I basically want to do is to limit the input users can give to an xforms:input field bound to such a node. 

 

Best, Robin
 

-----Original message-----
From: Benjamin Jehle <[hidden email]>
Sent: Mon 05-07-2010 10:13
To: [hidden email];
Subject: [ops-users] Re: Constrains question

Hi Robin,

use "gt" instead of ">=".   Its XPath 2.0 :-) :

http://orbeon-forms-ops-users.24843.n4.nabble.com/problem-with-constraints-for-numeric-values-td1561112.html#a1590015

All the best Benjamin

Robin Diederen schrieb:

Hello all,

 

We're struggling with constraints; basically we want to limit the values a user can put into a textfield to certain numbers (the corresponding instance data is integer typed; want to define upper and lower bounds).

 

The example we found on the Orbeon documentation site (using Xpath constraints) doesn't seem to yield any results. We use the element in a xforms:repeat construction.

 

The relevant part from the Xforms model:

 

<xforms:instance id="tabel">
                     <ser:x xmlns:ser="http://www.anonymous.org/services">
                        <ser:pv categorie="1.1" activiteit="A">
                            <ser:handeling beschrijving="B">
                                <ser:frequentie>1</ser:frequentie>
                                <ser:checked>false</ser:checked>
                            </ser:handeling>
                            <ser:handeling beschrijving="B">
                                <ser:frequentie>1</ser:frequentie>
                                <ser:checked>false</ser:checked>
                            </ser:handeling>           
                        </ser:pv>

                    </ser:x>

</xforms:instance>

 

<xforms:bind nodeset="/ser:x/ser:pv/ser:handeling/ser:frequentie" type="xs:integer" constraint=". >= 1 and 12 >= ." readonly="true"/>

 

Where is the fault in this?

 

Best, Robin
 

 


--

Benjamin Jehle

Projektmanager

----------------------------------------------------------------

Deriva GmbH Financial IT and Consulting

Hans-Böckler-Straße 2 | D-37079 Göttingen

Tel: +49  (0)551 489 500-44

Fax:+49  (0)551 489 500-91

Email: [hidden email]

Web: www.deriva.de

----------------------------------------------------------------

Amtsgericht Göttingen | HRB 3240

Geschäftsführer: Dirk Baule, Ralf Rühling 

 



--
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
Reply | Threaded
Open this post in threaded view
|

Re: RE: Re: Constrains question

Alessandro  Vernet
Administrator
Robin,

What does your <xforms:bind> look right now? Even better, could you
create a small example that we can run here and that reproduces this?

Alex

On Wed, Jul 7, 2010 at 3:13 AM, Robin Diederen <[hidden email]> wrote:

>  Hello Benjamin (and others),
>
>
>
> I've been playing a bit with this and I'm getting somewhere... just not
> where I want to be :-).
>
>
>
> For now I want all my elements called "frequentie" to carry a lower bound
> (=1) (and later a flexible upper bound). When I try this with a simple
> contraint, Orbeon complains this cannot be done because the "gt" operator
> cannot be applied to a sequence:
>
>
>
> A sequence of more than one item is not allowed as the second operand of
> 'gt'
>
>
>
> How do I solve this?
>
>
>
> What I basically want to do is to limit the input users can give to an
> xforms:input field bound to such a node.
>
>
>
> Best, Robin
>
>
> -----Original message-----
> From: Benjamin Jehle <[hidden email]>
> Sent: Mon 05-07-2010 10:13
> To: [hidden email];
> Subject: [ops-users] Re: Constrains question
>
> Hi Robin,
>
> use "gt" instead of ">=".   Its XPath 2.0 :-) :
>
> http://orbeon-forms-ops-users.24843.n4.nabble.com/problem-with-constraints-for-numeric-values-td1561112.html#a1590015
>
> All the best Benjamin
>
> Robin Diederen schrieb:
>
> Hello all,
>
>
>
> We're struggling with constraints; basically we want to limit the values a
> user can put into a textfield to certain numbers (the corresponding instance
> data is integer typed; want to define upper and lower bounds).
>
>
>
> The example we found on the Orbeon documentation site (using Xpath
> constraints) doesn't seem to yield any results. We use the element in a
> xforms:repeat construction.
>
>
>
> The relevant part from the Xforms model:
>
>
>
> <xforms:instance id="tabel">
>                      <ser:x xmlns:ser="http://www.anonymous.org/services">
>                         <ser:pv categorie="1.1" activiteit="A">
>                             <ser:handeling beschrijving="B">
>                                 <ser:frequentie>1</ser:frequentie>
>                                 <ser:checked>false</ser:checked>
>                             </ser:handeling>
>                             <ser:handeling beschrijving="B">
>                                 <ser:frequentie>1</ser:frequentie>
>                                 <ser:checked>false</ser:checked>
>                             </ser:handeling>
>                         </ser:pv>
>
>                     </ser:x>
>
> </xforms:instance>
>
>
>
> <xforms:bind nodeset="/ser:x/ser:pv/ser:handeling/ser:frequentie"
> type="xs:integer" constraint=". >= 1 and 12 >= ." readonly="true"/>
>
>
>
> Where is the fault in this?
>
>
>
> Best, Robin
>
>
>
>
> --
>
> Benjamin Jehle
>
> Projektmanager
>
> ----------------------------------------------------------------
>
> Deriva GmbH Financial IT and Consulting
>
> Hans-Böckler-Straße 2 | D-37079 Göttingen
>
> Tel: +49  (0)551 489 500-44
>
> Fax:+49  (0)551 489 500-91
>
> Email: [hidden email]
>
> Web: www.deriva.de
>
> ----------------------------------------------------------------
>
> Amtsgericht Göttingen | HRB 3240
>
> Geschäftsführer: Dirk Baule, Ralf Rühling
>
>
>
> --
> 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
>
>


--
Orbeon Forms - Web forms, open-source, for the Enterprise -
http://www.orbeon.com/
My Twitter: http://twitter.com/avernet


--
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
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet