Altova Mailing List Archives>Archive Index >xmlschema-dev Archive Home >Recent entries >Thread Prev - empty xs:extension of a simple type >Thread Next - RE: empty xs:extension of a simple type RE: empty xs:extension of a simple typeTo: "'Andrew Welch'" <andrew.j.welch@-----.--->, <xmlschema-dev@--.---> Date: 10/8/2008 4:17:00 PM > > I'm looking at a machine generate schema which contains this: > > <xs:complexType name="foo"> > <xs:simpleContent> > <xs:extension base="xs:string"> > </xs:extension> > </xs:simpleContent> > </xs:complexType> > > That's just the same as type="xs:string" isn't it? > Not quite. It's a complex type rather than a simple type. It validates the same content as xs:string, but it can be extended and restricted (and unioned and listed...) in different ways from xs:string. It's likely to behave differently when you do Java data binding, and it's certainly different when you do type-aware XQuery and XSLT. It does raise the question of why simple types are something radically different from complex types, rather than simply a special case of a complex type that happens to define no children and no attributes. Michael Kay http://www.saxonica.com/ From andrew.j.welch@g... Wed Oct 08 14:26:52 2008 Received: from | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
