You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Jan Behrens <Ja...@offis.de> on 2006/11/07 21:43:05 UTC

cforms xml binding with xs:choice

Hi,

working on my first Cocoon project I am facing the following problem; I am 
generating a html form using cforms from a given schema (and accompanying 
xml data file). The schema contains a couple of xs:choice instructions. At 
the moment this is treated as the same as a sequence, e.g. the form 
expects _all_ elements to be filled in, not only one choice. Can somebody 
give me an idea on howto implement a transformation that generates a form 
that will enable an (xor) choice?
I am working with version 2.1.9 and have been adopting the schema2form 
example given by Niels van Kampenhout to get this far.

Any help is greatly appreciated!

TIA, Jan

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: cforms xml binding with xs:choice

Posted by Jan Behrens <Ja...@offis.de>.
Giacomo Pati <gi...@apache.org> schrieb am 08.11.2006 09:21:21:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Jan Behrens wrote:
> > Hi,
> > 
> > working on my first Cocoon project I am facing the following problem; 
I am 
> > generating a html form using cforms from a given schema (and 
accompanying 
> > xml data file). The schema contains a couple of xs:choice 
instructions. At 
> > the moment this is treated as the same as a sequence, e.g. the form 
> > expects _all_ elements to be filled in, not only one choice. Can 
somebody 
> > give me an idea on howto implement a transformation that generates a 
form 
> > that will enable an (xor) choice?
> > I am working with version 2.1.9 and have been adopting the schema2form 

> > example given by Niels van Kampenhout to get this far.
> > 
> > Any help is greatly appreciated!
> 
> Maybe the fd:union is what you are looking for (datasource selector in 
the
> forms samples) where another widget (case attribute of fd:union) 
determines
> the set of widgets you want to be displayed.

Hi Giacomo,

thanks for the suggestion, I will give it a try.

Cheers, Jan

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: cforms xml binding with xs:choice

Posted by Giacomo Pati <gi...@apache.org>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jan Behrens wrote:
> Hi,
> 
> working on my first Cocoon project I am facing the following problem; I am 
> generating a html form using cforms from a given schema (and accompanying 
> xml data file). The schema contains a couple of xs:choice instructions. At 
> the moment this is treated as the same as a sequence, e.g. the form 
> expects _all_ elements to be filled in, not only one choice. Can somebody 
> give me an idea on howto implement a transformation that generates a form 
> that will enable an (xor) choice?
> I am working with version 2.1.9 and have been adopting the schema2form 
> example given by Niels van Kampenhout to get this far.
> 
> Any help is greatly appreciated!

Maybe the fd:union is what you are looking for (datasource selector in the
forms samples) where another widget (case attribute of fd:union) determines
the set of widgets you want to be displayed.

HTH

Ciao

> 
> TIA, Jan
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 

- --
Giacomo Pati
Otego AG, Switzerland - http://www.otego.com
Orixo, the XML business alliance - http://www.orixo.com

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)

iD8DBQFFUZOBLNdJvZjjVZARAmcyAKCPWhUuJH36DhKH6H6rRgl60TubcACdFxeg
XxcshLN49Mbg9h5v7fbySRM=
=mNNz
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org