🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Nombre d'occurences>1

#9683
From: Laurent AJDNIK
Date: Sun, 25 Feb 2001 09:45
24 lines
1712 bytes
Bonjour,

la DTD permet de specifier le nombre d'occurences d'un enfant pour un
element:

<!ELEMENT element-name (child-name)> : 1 occurence
<!ELEMENT element-name (child-name+)> : 1 occurence au moins
<!ELEMENT element-name (child-name*)> : 0 ou plusieurs occurences

Mais comment exprimer des cardinalites plus variees ?
Par exemple, comment specifier qu'un element peut avoir 2 ou plus
enfants du meme type ?

Je suppose qu'une solution serait:
<!ELEMENT element-name (child-name,child-name+)>
ou encore:
<!ELEMENT element-name (child-name,child-name,child-name*)>

Par contre, pour l'extensibilite...
Comment forcer 8 enfants du meme type au moins ?

Merci pour toute suggestion.

Laurent
Technical Details
Message-ID: <3A98D424.7C945CB9@insalien.org>
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!freenix!fr.clara.net!heighliner.fr.clara.net!news.tele.dk!134.222.94.5!npeer.kpnqwest.net!univ-lyon1.fr!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: FRENCH,ASCII-7-bit
X-Google-Thread: 114f60,73a06015bf62852c,start
X-Google-Attributes: gid114f60,public
X-Google-ArrivalTime: 2001-02-25 01:42:06 PST
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!freenix!fr.clara.net!heighliner.fr.clara.net!news.tele.dk!134.222.94.5!npeer.kpnqwest.net!univ-lyon1.fr!not-for-mail
From: Laurent AJDNIK <laurent.ajdnik@insalien.org>
Newsgroups: fr.comp.text.xml
Subject: Nombre d'occurences>1
Date: Sun, 25 Feb 2001 10:45:08 +0100
Organization: CISM (Universite Claude Bernard Lyon I et INSA Lyon)
Lines: 24
Message-ID: <3A98D424.7C945CB9@insalien.org>
NNTP-Posting-Host: i121.resi.insa-lyon.fr
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Trace: demo2.univ-lyon1.fr 983094109 30849 134.214.164.70 (25 Feb 2001 09:41:49 GMT)
X-Complaints-To: abuse@univ-lyon1.fr
NNTP-Posting-Date: 25 Feb 2001 09:41:49 GMT
X-Mailer: Mozilla 4.76 [en] (Win98; U)
X-Accept-Language: en