Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


inheritance problem (newbie)

From: Jan Limpens <jan.limpens@-----.--->
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.


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent