File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / libxml2 / test / schemas / derivation-ok-restriction-4-1-err_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, 8 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 (Restriction, Complex)

	4 If there is an {attribute wildcard}, all of the following must be true:

	4.1 The {base type definition} must also have one.

	4.2 The complex type definition's {attribute wildcard}'s {namespace constraint} 
	must be a subset of the {base type definition}'s {attribute wildcard}'s {namespace 
	constraint}, as defined by Wildcard Subset (§3.10.6).

	4.3 Unless the {base type definition} is the ·ur-type definition·, the complex type 
	definition's {attribute wildcard}'s {process contents} must be identical to or stronger 
	than the {base type definition}'s {attribute wildcard}'s {process contents}, 
	where strict is stronger than lax is stronger than skip.
-->
<schema xmlns="http://www.w3.org/2001/XMLSchema" 
	targetNamespace="http://FOO" 
	xmlns:foo="http://FOO"
	>
	
	<element name="foo">
		<complexType>
			<sequence>
				<element name="bar.A" type="foo:type.A" />
				<element name="bar.B" type="foo:type.B" />
				<element name="bar.C" type="foo:type.C" />
			</sequence>
		</complexType>    
	</element>  

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

	<complexType name="base.type.A">
		<attribute name="bar" type="string"/>		
	</complexType>    

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

	<complexType name="base.type.B">
		<anyAttribute namespace="http://FOO" processContents="skip" />		
	</complexType>    

	<complexType name="type.C">
		<complexContent>
			<restriction base="foo:base.type.C">				  	  			
				<anyAttribute namespace="##any" processContents="skip" />
			</restriction>
		</complexContent>
	</complexType>    

	<complexType name="base.type.C">
		<anyAttribute namespace="##any" processContents="lax" />		
	</complexType>    

</schema>

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