<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://xsdtesting" xmlns:x="http://xsdtesting" xmlns:imp="http://importedXSD">
	<xsd:complexType name="B">
		<xsd:choice>
			<xsd:any namespace="##local foo bar ##targetNamespace" minOccurs="1" maxOccurs="1"/>
		</xsd:choice>
	</xsd:complexType>
	<xsd:complexType name="R">
		<xsd:complexContent>
			<xsd:restriction base="x:B">
				<xsd:choice>
					<xsd:any namespace="##targetNamespace" minOccurs="1" maxOccurs="1"/>
				</xsd:choice>
			</xsd:restriction>
		</xsd:complexContent>
	</xsd:complexType>
	<xsd:element name="doc">
		<xsd:complexType>
			<xsd:choice>
				<xsd:element name="elem" type="x:R"/>
			</xsd:choice>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="foo"/>
</xsd:schema>
