- From: Pete Cordell <petexmldev@tech-know-ware.com>
- Date: Wed, 22 Feb 2006 07:57:00 -0000
- To: "Ed Day" <edday@obj-sys.com>, "Databinding WG" <public-xsd-databinding@w3.org>
Hi Ed, As I understand it, you are right. The versioned type would become (including documentation about the versioning): <xs:complexType name="CustomerType"> <xs:sequence> <xs:element name="firstName" type="xs:string" /> <xs:element name="lastName" type="xs:string" /> <xs:element name="extension"> <xs:complexType> <xs:annotation><xs:documentation> These members were added in version 2 </xs:documentation></xs:annotation> <xs:sequence> <xs:element name="MyV2Element" type="xs:string"/> <xs:element name="extension" type="tns:CustomerExtensionType" minOccurs="0" /> </xs:sequence> </xs:complexType> </xs:element> </xs:sequence> <xs:anyAttribute/> </xs:complexType> <xs:complexType name="CustomerExtensionType"> <xs:sequence> <xs:any processContents="lax" minOccurs="0" maxOccurs="unbounded" namespace="##targetNamespace"/> </xs:sequence> </xs:complexType> Pete. ----- Original Message ----- From: "Ed Day" <edday@obj-sys.com> To: "Databinding WG" <public-xsd-databinding@w3.org> Sent: Tuesday, February 21, 2006 7:18 PM Subject: Re: ISSUE-20: Extension of collections > > The problem with this approach is that it requires the user to embed the > <extension> element within the instance being extended. This is not what > happens in the real world. What happens is additional elements just show > up. > > Also, what happens if the schema is extended a 2nd time? Do you have an > extension in an extension? Or maybe the "extension" element should have > some kind of version number on the end to track when an extension happened > (<extension1>, <extension2>, etc.)? > > Regards, > > Ed Day > Objective Systems, Inc. > http://www.obj-sys.com > > > ----- Original Message ----- > From: "Databinding Issue Tracker" <dean+cgi@w3.org> > To: <public-xsd-databinding@w3.org> > Sent: Tuesday, February 21, 2006 9:05 AM > Subject: ISSUE-20: Extension of collections > > >> >> >> ISSUE-20: Extension of collections >> >> http://www.w3.org/2005/06/tracker/databinding/issues/20 >> >> Raised by: Paul Downey >> On product: Basic >> >> The input document offers the following pattern for a collection >> which is open to extension, thereby being useful when evolving >> or extending a schema during versioning: >> >> """ >> <xs:complexType name="CustomerType"> >> <xs:sequence> >> <xs:element name="firstName" type="xs:string" /> >> <xs:element name="lastName" type="xs:string" /> >> <xs:element name="extension" type="tns:CustomerExtensionType" > minOccurs="0" /> >> </xs:sequence> >> <xs:anyAttribute/> >> </xs:complexType> >> >> <xs:complexType name="CustomerExtensionType"> >> <xs:sequence> >> <xs:any processContents="lax" minOccurs="0" maxOccurs="unbounded" >> namespace="##targetNamespace"/> >> </xs:sequence> >> </xs:complexType> >> >> """ >> >> How well is this pattern supported by tools - does it belong in >> the Basic patterns document? >> >> Are there authoring issues with this pattern we should warn about? >> >> -- ============================================= Pete Cordell Tech-Know-Ware Ltd for XML to C++ data binding visit http://www.tech-know-ware.com/lmx (or http://www.xml2cpp.com) =============================================
Received on Wednesday, 22 February 2006 08:03:15 UTC