Altova Mailing List Archives>Archive Index >xmlschema-dev Archive Home >Recent entries >Thread Prev - Inheritance of "mixed" >Thread Next - schema editor? inheritance problem (newbie)To: xmlschema-dev@--.--- Date: 9/16/2004 7:47:00 PM hi people, I have got this base xsd <?xml version="1.0"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://limpens.com/blogbase" xmlns="http://limpens.com/blogbase" elementFormDefault="qualified"> <xs:element name="BlogInfo"> <xs:complexType> <xs:sequence> <xs:element name="BlogTitle" type="xs:string"/> <xs:element name="BlogDescription" type="xs:string"/> <xs:element ref="Entry" minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> <xs:attribute name="lang" type="xs:language"/> </xs:complexType> </xs:element> <xs:element name="Entry"> <xs:complexType> <xs:sequence> <xs:element name="Title"/> <xs:element name="Body"> <xs:complexType> <xs:sequence> <xs:element name="Para" maxOccurs="unbounded"/> </xs:sequence> </xs:complexType> </xs:element> </xs:sequence> <xs:attribute name="lang" type="xs:language"/> <xs:attribute name="pubdate" type="xs:dateTime"/> </xs:complexType> </xs:element> <xs:element name="Blog"> <xs:complexType> <xs:sequence> <xs:element ref="BlogInfo"/> </xs:sequence> </xs:complexType> </xs:element> </xs:schema> and I want to derive from it in this schema <?xml version="1.0"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://limpens.com/blog/illustrationblog" xmlns="http://limpens.com" elementFormDefault="qualified" xmlns:bb="http://limpens.com/blogbase"> <xs:complexType name="ImageEntry" base="bb:Entry" derivedBy="extension"> <xs:sequence> <xs:element name="SlideShow"> <xs:complexType> <xs:sequence> <xs:element name="Image" maxOccurs="unbounded"> <xs:complexType> <xs:sequence> <xs:element name="ImageTitle"/> <xs:element name="ImageDescription"/> <xs:element name="ImageUrl"/> </xs:sequence> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:schema> but validation (stylus studio, I actually don't know which engine is used here) tells me Attribute 'base' cannot appear in global complexType declarations Attribute 'derivedBy' cannot appear in global complexType declarations while this is plain English I kind of understand, I unfortunately don't know what to do now. I already stole the idea from http://www.xmlpatterns.com/ExtensibleContentModelMain.shtml, but as it seems this is not working... thanks for the help! -- Jan http://www.limpens.com From mhk@m... Fri Sep 17 10:54:30 2004 Received: from bart.w3.org ([128.30.52.40]) by frink.w3.org with esmtp (Exim 4. | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
