RE: now trying extending schemas using xs:include

Hi,

Put mixed="true" on the derived type also.  The quality of being mixed
is not inherited - you have to respecify it.

Hope that helps,
Priscilla

-----------------------------------------------------
Priscilla Walmsley             priscilla@walmsley.com
Author, Definitive XML Schema     (Prentice Hall PTR)
----------------------------------------------------- 

> -----Original Message-----
> From: xmlschema-dev-request@w3.org 
> [mailto:xmlschema-dev-request@w3.org] On Behalf Of Robert Koberg
> Sent: Thursday, February 27, 2003 1:46 PM
> To: xmlschema-dev@w3.org
> Subject: now trying extending schemas using xs:include
> 
> 
> 
> Hi again,
> 
> This time I am having problems extending some schemas 
> (basically xhtml1-strict
> with some modifications) using xs:include. The extending 
> schema and instance
> document validates in XMLSpy and msv-20020414, but gives an 
> error when trying to
> load in IE6/MSXML4:
> 
> Error:
> http://localhost:8080/lsb/Schemas/content.xsd#schema[1]/elemen
> t[position()=1 and
> @name='article']/complexType[1]/complexContent[1]/extension[1]
> Derived type and the base type must have the same content type
> 
> The extending schema looks like:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <xs:schema
>   
> targetNamespace="http://livestoryboard.com/lsb/Schemas/2003/03
> /content"
>   xmlns="http://livestoryboard.com/lsb/Schemas/2003/03/content"
>   xmlns:xs="http://www.w3.org/2001/XMLSchema"
>   elementFormDefault="qualified"
>   version="1.0">
> 
>   <xs:include schemaLocation="simple_types.xsd"/>
>   <xs:include schemaLocation="attributes.xsd"/>
>   <xs:include schemaLocation="inlines.xsd"/>
>   <xs:include schemaLocation="blocks.xsd"/>
>   <xs:include schemaLocation="lsb_blocks.xsd"/>
>   <xs:include schemaLocation="global_defs.xsd"/>
>   <xs:include schemaLocation="table.xsd"/>
>   <xs:include schemaLocation="lists.xsd"/>
>   <xs:include schemaLocation="form.xsd"/>
> 
>   <xs:element name="article">
>     <xs:complexType>
>       <xs:complexContent>
>         <xs:extension base="Flow">
>           <xs:attributeGroup ref="attrs"/>
>         </xs:extension>
>       </xs:complexContent>
>     </xs:complexType>
>   </xs:element>
> 
> ...[snipped other content types (like article) that show in 
> the msv-20020414
> error msgs]...
> 
> </xs:schema>
> 
> The reference to the extension 'Flow' is in the blocks.xsd 
> and it looks like:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <xs:schema
>   
> targetNamespace="http://livestoryboard.com/lsb/Schemas/2003/03
> /content"
>   xmlns:xs="http://www.w3.org/2001/XMLSchema"
>   xmlns="http://livestoryboard.com/lsb/Schemas/2003/03/content"
>   elementFormDefault="qualified"
>   version="1.0">
> ...[snip]...
> 
>   <xs:complexType name="Flow" mixed="true">
>     <xs:annotation>
>       <xs:documentation>
>       "Flow" mixes block and inline and is used for list items etc.
>       </xs:documentation>
>     </xs:annotation>
>     <xs:choice minOccurs="0" maxOccurs="unbounded">
>       <xs:group ref="block"/>
>       <xs:element ref="form"/>
>       <xs:group ref="inline"/>
>       <xs:group ref="misc"/>
>     </xs:choice>
>   </xs:complexType>
> 
> ...[snip]...
> </xs:schema>
> 
> Can anybody see where I am going wrong?
> 
> Thank you very much for any help,
> -Rob
> 
> 
> 

Received on Thursday, 27 February 2003 14:35:23 UTC