Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: special tags

From: Debora Vanni <debora.vanni@------.--->
To: "G. Ken Holman" <gkholman@----------------.--->
Date: 9/21/2006 8:35:00 PM
That it doesn't work: it says that element choice has an invalid
content. 
I didn't find anywhere that I can write both "all" and "choice" inside
the same complextype, is that possible?
I probably need somenthing like "union" but for complex type, is there
somenting like that?
Thank you very much for your answer
Debora
Il giorno gio, 21/09/2006 alle 11.26 -0400, G. Ken Holman ha scritto:
> At 2006-09-21 17:15 +0200, Debora Vanni wrote:
> >I have this schema
> ><xs:element name="parameters">
> >         <xs:complexType>
> >                 <xs:all>
> >                 <xs:element name="family-name" type = "simple_text"=
/>
> >                 <xs:element name="first-name"type = "simple_text"/>
> >                 <xs:element name="cod-fisc" type = "alfa_numeric"/>
> >
> >                 <xs:element name="home-address" type = "simple_text=
"/>
> >
> >                 </xs:all>
> >         </xs:complexType>
> ></xs:element>
> >I need somenthing to say that the other 2 elements(e-mail and
> >cell-phone) are special(one or other or both), how could I use the
> >Kleene notation inside that?
> 
> I haven't taken the time to check the following 
> for errors, but you need something along the lines of:
> 
> <xs:element name="parameters">
>    <xs:complexType>
>      <xs:sequence>
>        <xs:element name="family-name" type = "simple_text"/>
>        <xs:element name="first-name" type = "simple_text"/>
>        <xs:element name="cod-fisc" type = "alfa_numeric"/>
>        <xs:element name="home-address" type = "simple_text"/>
>        <xs:choice>
>           <xs:sequence>
>             <xs:element name="cell-phone" type = "simple_text"/>
>             <xs:element name="email" type = "simple_text" minOccurs=
="0"/>
>           </xs:sequence>
>           <xs:sequence>
>             <xs:element name="email" type = "simple_text"/>
>             <xs:element name="cell-phone" type = "simple_text" minOcc=
urs="0"/>
>           </xs:sequence>
>        </xs:choice>
>      </xs:sequence>
>    </xs:complexType>
> </xs:element>
> 
> Which will implement my earlier suggestion.
> 
> I hope this helps.
> 
> . . . . . . . . . . . Ken
> 
> Il giorno gio, 21/09/2006 alle 10.40 -0400, G. Ken Holman ha scritto:
> > > 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.
> 
> 
> --
> 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
> 
> 
> 
-- 
 Debora Vanni - TVBLOB S.r.l.
 Software Engineer

 Via G. Paisiello, 9 20131 Milano, Italia
 -----------------------------------------
 Phone +39 02 36562440
 Fax +39 02 20408347
 Web Site http://www.tvblob.com
 E-mail debora.vanni@t...



From paul@x... Thu Sep 21 17:44:04 2006
Received: from wiggum.w3.org ([128.30.52.23])
	by frink.w3.org with esmtp (Exim 4.50)
	id 1GQ


transparent
Print
Mail
Digg
delicious
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent