W3C home > Mailing lists > Public > xmlschema-dev@w3.org > September 2004

Re: inheritance problem (newbie)

From: George Cristian Bina <george@sync.ro>
Date: Sat, 18 Sep 2004 02:32:02 +0300
Message-ID: <414B73F2.5080707@sync.ro>
To: Jan Limpens <jan.limpens@gmail.com>
CC: xmlschema-dev@w3.org

Hi Jan,

(This does not follow the initial article that uses xsi:type attribute)
You can just change

<xs:element name="ImageEntry" type="ImageEntryType"/>


<xs:element name="ImageEntry" type="ImageEntryType" 

in the derived.xsd and then you should be able to have an instance 
document like:

<?xml version="1.0" encoding="UTF-8"?>
<Blog xmlns="http://limpens.com/blogbase"
    xsi:schemaLocation="http://limpens.com/blogbase base.xsd 
http://limpens.com/blog/illustrationblog derived.xsd">
     <ImageEntry xmlns="http://limpens.com/blog/illustrationblog">
       <Title xmlns="http://limpens.com/blogbase"></Title>
       <Body xmlns="http://limpens.com/blogbase">

Best Regards,
George Cristian Bina
<oXygen/> XML Editor & XSLT Editor/Debugger

Jan Limpens wrote:

> Hmm, I think I am almost there...
> How can I achieve that in my derived schema the <Blog> element
> continues to be my root element?
> As it is right now, I could start my IllustrationBlog.xml only with an
> ImageEntry element, (which would be correct, if i stored my entries in
> individual files, which makes sense as well, thinking....hmmmm).
> thanks again
> jan
Received on Friday, 17 September 2004 23:35:15 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:15:24 UTC