- From: zze-MARCHEGAY Michael stagiaire FTRD/DTL/LAN <michael.marchegay@rd.francetelecom.com>
- Date: Fri, 17 May 2002 16:56:17 +0200
- To: "'xmlschema-dev@w3.org'" <xmlschema-dev@w3.org>
Received on Friday, 17 May 2002 10:57:00 UTC
Hello, I'm trying to understand the interest of complexContent restrictions, but I don't find in which kind of examples it is usefull. If I look at the following example: <xs:complexType name="personName"> <xs:sequence> <xs:element name="title" minOccurs="0"/> <xs:element name="forename" minOccurs="0" maxOccurs="unbounded"/> <xs:element name="surname"/> </xs:sequence> </xs:complexType> <xs:complexType name="simpleName1"> <xs:complexContent> <xs:restriction base="personName"> <xs:sequence> <xs:element name="forename" minOccurs="1" maxOccurs="1"/> <xs:element name="surname"/> </xs:sequence> </xs:restriction> </xs:complexContent> </xs:complexType <xs:complexType name="simpleName2"> <xs:sequence> <xs:element name="forename" minOccurs="1" maxOccurs="1"/> <xs:element name="surname"/> </xs:sequence> </xs:complexType I can't figure out what is the difference between an element which has type simpleName1 and another which has type simpleName2. So are complexContents just syntaxic sugar, used by XML Schema processing tools or do they have another function? Thanks. -- Michaël Marchegay, Stagiaire France Telecom R&D du 11/02/2002 au 26/07/2002 Sous la responsabilité d'Olivier Dubuisson DTL/TAL - 22307 Lannion Cedex - France
Received on Friday, 17 May 2002 10:57:00 UTC