🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: fr.comp.text.xml
Article #180

Re: Type complexe avec minimum 1 enfant, mais en acceptant plusieurs

#180
From: Yves
Date: Thu, 21 Apr 2011 14:48
33 lines
2480 bytes
On 21 avr, 16:29, Mayeul <mayeul.marg...@free.fr> wrote:
> La seule manière de le faire en XML Schema 1.0 est d'énoncer, soi-même,
> toutes les combinaisons autorisées, et de faire un xs:choice permettant
> au choix chacune d'entre elles.
>
> <xs:choice>
>    <xs:sequence>
>      <xs:element ref="a"/>
>      <xs:element ref="b" minOccurs="0"/>
>      <xs:element ref="c" minOccurs="0"/>
>    </xs:sequence>
>    <xs:sequence>
>      <xs:element ref="b"/>
>      <xs:element ref="c" minOccurs="0"/>
>    </xs:sequence>
>    <xs:sequence>
>      <xs:element ref="c"/>
>    </xs:sequence>
> </xs:choice>
>
> On ne répète pas le a, puis le b, parce que XML Schema impose qu'une
> branche de <xs:choice> soit choisie sans ambiguïté.
>
> En XML Schema 1.1, il y a xs:assert qui permettrait de vérifier qu'il y
> en a au moins un présent, après les avoir tous rendus optionnels. Mais
> bon, peu de choses le gérant...
>
> --
> Mayeul

Merci :)
Technical Details
Message-ID: <73c403b2-50a0-49b8-a48e-66868d0980b5@34g2000pru.googlegroups.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!postnews.google.com!34g2000pru.googlegroups.com!not-for-mail
References: <f550cf71-744c-4be6-8f15-4882bdf09b14@a11g2000pro.googlegroups.com> <4db03e31$0$17796$426a74cc@news.free.fr>

Show Full Headers
Complete Article Headers
X-Google-Thread: 114f60,c4b699511cfcc3b1
X-Google-NewGroupId: yes
X-Google-Attributes: gid8a75585569,domainid0,public,usenet
X-Google-Language: FRENCH,ASCII
Path: arc1-ca.pugleaf.net!g2news2.google.com!postnews.google.com!34g2000pru.googlegroups.com!not-for-mail
From: Yves <yves@procerviq.be>
Newsgroups: fr.comp.text.xml
Subject: Re: Type complexe avec minimum 1 enfant, mais en acceptant plusieurs
Date: Thu, 21 Apr 2011 07:48:37 -0700 (PDT)
Organization: http://groups.google.com
Lines: 33
Message-ID: <73c403b2-50a0-49b8-a48e-66868d0980b5@34g2000pru.googlegroups.com>
References: <f550cf71-744c-4be6-8f15-4882bdf09b14@a11g2000pro.googlegroups.com>
 <4db03e31$0$17796$426a74cc@news.free.fr>
NNTP-Posting-Host: 217.112.179.18
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1303397318 11162 127.0.0.1 (21 Apr 2011 14:48:38 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Thu, 21 Apr 2011 14:48:38 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: 34g2000pru.googlegroups.com; posting-host=217.112.179.18; posting-account=yqIK9woAAAC9TTphALTN1rSQGMaIs7Xq
User-Agent: G2/1.0
X-HTTP-Via: 1.0 PROXY, 1.0 Efw:8080 (squid/2.6.STABLE22)
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.9.1.17)
 Gecko/20110121 Firefox/3.5.17 ( .NET CLR 3.5.30729),gzip(gfe)