Altova Mailing List Archives>Archive Index >xmlschema-dev Archive Home >Recent entries >Thread Prev - special tags >Thread Next - Re: special tags Re: special tagsTo: xmlschema-dev@--.--- Date: 9/21/2006 6:40:00 AM At 2006-09-21 16:28 +0200, Debora Vanni wrote: >I have this problem now. >I have this xml messagge > > <parameters> > <family-name>Rossi</family-name> > <first-name>Paolo</first-name> > <cod-fisc>123123123</cod-fisc> > <home-address>via Vai</home-address> > <cell-phone>12354356</cell-phone> > <e-mail> pippo@y...</e-mail> > </parameters> > The problem is that family-name, first-name, > cod-fisc and home-address are mandatory and I need at least one of= cell-phone Using Kleene notation as a short cut, I think you would need: home-address, ( ( cell-phone, email? ) | ( email, cell-phone? ) ) ... so that you have one or the other or both, but not neither. Which would validate your examples below, and at the same time not be ambiguous. I hope this helps. . . . . . . . . . . . . Ken > or e-mail, so I could have these 3 kind of messages: > <parameters> > <family-name>Rossi</family-name> > <first-name>Paolo</first-name> > <cod-fisc>123123123</cod-fisc> > <home-address>via Vai</home-address> > <cell-phone>12354356</cell-phone> > <e-mail> pippo@y...</e-mail> > </parameters> > > <parameters> > <family-name>Rossi</family-name> > <first-name>Paolo</first-name> > <cod-fisc>123123123</cod-fisc> > <home-address>via Vai</home-address> > <cell-phone>12354356</cell-phone> > > </parameters> > > <parameters> > <family-name>Rossi</family-name> > <first-name>Paolo</first-name> > <cod-fisc>123123123</cod-fisc> > <home-address>via Vai</home-address> > > <e-mail> pippo@y...</e-mail> > </parameters> > >There is some way to do this with XSD? >Thank you very much for your help >Debora Vanni -- UBL/XML/XSLT/XSL-FO training: V=E5r=F8, Denmark 2006-10-02/06,11-20/24 UBL International 2006 2006-11-13/17 http://www.ublconference.com World-wide corporate, govt. & user group UBL, XSL, & XML training. G. Ken Holman mailto:gkholman@C... Crane Softwrights Ltd. http://www.CraneSoftwrights.com/x/ Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (F:-0995) Male Cancer Awareness Aug'05 http://www.CraneSoftwrights.com/x/bc Legal business disclaimers: http://www.CraneSoftwrights.com/legal From Simon.Cox@c... Thu Sep 21 14:41:38 2006 Received: from maggie.w3.org ([193.51.208.68]) by fri | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
