<?xml version="1.0" encoding="ISO-8859-1" ?>
<!--
	Schema Component Constraint: Derivation Valid (Extension)

	1.3 If it has an {attribute wildcard}, the complex type definition must 
	also have one, and the base type definition's {attribute wildcard}'s 
	{namespace constraint} must be a subset of the complex type definition's 
	{attribute wildcard}'s {namespace constraint}, as defined by Wildcard Subset (§3.10.6).
-->
<schema xmlns="http://www.w3.org/2001/XMLSchema" 	
	targetNamespace="http://FOO" 
	xmlns:foo="http://FOO"
	elementFormDefault="qualified">
	
	<element name="foo">
		<complexType>
			<sequence>
				<element name="bar.A" type="foo:type.A" />
				<element name="bar.B" type="foo:type.B" />
			</sequence>
		</complexType>    
	</element>  

	<complexType name="type.A">
		<complexContent>
			<!-- This is OK, since the complete wildcard
			  is the wildcard of the base type. -->
			<extension base="foo:base.type.A" />				  	  						
		</complexContent>
	</complexType>    

	<complexType name="base.type.A">
		<anyAttribute namespace="##any" processContents="skip" />		
	</complexType>    

	<complexType name="type.B">
		<complexContent>
			<extension base="foo:base.type.B">	
				<!-- This is OK, since the complete wildcard is a union
				  of "##any" and "http://FOO" = "##any". Thus the complete
				  wildcard is equal to that one in the base class. -->
				<anyAttribute namespace="http://FOO" processContents="skip" />
			</extension>
		</complexContent>
	</complexType>    

	<complexType name="base.type.B">
		<anyAttribute namespace="##any" processContents="skip" />		
	</complexType>    

</schema>
