Altova Mailing List Archives>Archive Index >xmlschema-dev Archive Home >Recent entries >Thread Prev - Re: inheritance problem (newbie) [Thread Next] Re: inheritance problem (newbie)To: Jan Limpens <jan.limpens@-----.---> Date: 9/18/2004 5:32:00 AM
Hi Jan,
(This does not follow the initial article that uses xsi:type attribute)
You can just change
<xs:element name="ImageEntry" type="ImageEntryType"/>
to
<xs:element name="ImageEntry" type="ImageEntryType"
substitutionGroup="bb:Entry"/>
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"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://limpens.com/blogbase base.xsd
http://limpens.com/blog/illustrationblog derived.xsd">
<BlogInfo>
<BlogTitle></BlogTitle>
<BlogDescription></BlogDescription>
<ImageEntry xmlns="http://limpens.com/blog/illustrationblog">
<Title xmlns="http://limpens.com/blogbase"></Title>
<Body xmlns="http://limpens.com/blogbase">
<Para></Para>
</Body>
<SlideShow>
<Image>
<ImageTitle></ImageTitle>
<ImageDescription></ImageDescription>
<ImageUrl></ImageUrl>
</Image>
</SlideShow>
</ImageEntry>
</BlogInfo>
</Blog>
Best Regards,
George
-----------------------------------------------
George Cristian Bina
<oXygen/> XML Editor & XSLT Editor/Debugger
www.---.com
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
From brs@i... Mon Sep 20 07:42:54 2004
Received: from lisa.w3.org ([128.30.52.41])
b | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
