Altova Mailing List Archives>Archive Index >xmlschema-dev Archive Home >Recent entries >Thread Prev - RE: XML Schemas patterns (was: Re: Defining recursive elements?) >Thread Next - XML Schema Element ordering Re: Defining recursive elements?To: "Boris Kolpackov" <boris@-------------.--->, <xmlschema-dev@--.---> Date: 5/17/2007 11:50:00 PM ----- Original Message From: "Boris Kolpackov" <...> > Hi, > > Andrew Welch <andrew.j.welch@g...> writes: > >> Well it's a matter of taste, but if you use the venetian blind style >> of schema then you wouldn't use element ref="" much, but @type >> instead, eg: >> >> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> >> >> <xs:element name="part" type="part"/> >> >> <xs:complexType name="part"> >> <xs:sequence> >> <xs:element name="part" type="part" minOccurs="0" >> maxOccurs="unbounded"/> >> </xs:sequence> >> <xs:attribute name="serial" type="xs:string"/> >> </xs:complexType> >> >> </xs:schema> > > Note that this change will result in a different schema if there > was a target namespace involved. In the original example, both > elements are qualified while in this schema the global one would > be qualified while the local one wouldn't. Although, just to clarify for those that are a bit fuzzy about namespaces in schema, commonly if people define a schema that specifies a target namespace, 9 times out of 10 they will also make elementFormDefault="qualified". Hence all elements will end up qualified and the same result can be achieved. Pete. -- ============================================= Pete Cordell Tech-Know-Ware Ltd for XML Schema to C++ data binding visit http://www.tech-know-ware.com/lmx/ http://www.codalogic.com/lmx/ ============================================= From petexmldev@t... Thu May 17 22:07:29 2007 Received: from lisa.w3.org ([12 | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
