File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / libxml2 / test / schemas / cos-ct-extends-1-3_0.xsd
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Tue Feb 21 23:37:59 2012 UTC (12 years, 5 months ago) by misho
Branches: libxml2, MAIN
CVS tags: v2_9_1p0, v2_9_1, v2_8_0p0, v2_8_0, v2_7_8, HEAD
libxml2

<?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>

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>