processContents specifies the behavior of the
validator regarding the elements or attributes from the specified
namespaces. The possible values are
"skip" (no validation is attempted
on these elements or attributes),
"strict" (schemas for the
namespaces that will be included need to be available, and validators
will validate the elements and attributes against these schemas), or
"lax" (validators will do their
best to find a schema for the included elements and attributes,
validate them when they have found one, and silently skip the
validation when they haven't). For example:
<?xml version="1.0"?>
<xs:schema targetNamespace="http://dyomedea.com/ns/library"
elementFormDefault="qualified"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns="http://dyomedea.com/ns/library">
<xs:element name="library">
<xs:complexType>
<xs:sequence>
<xs:element ref="book"/>
</xs:sequence>
<xs:anyAttribute namespace="http://dyomedea.com/ns/library/mkt"
processContents="skip"/>
</xs:complexType>
</xs:element>
<xs:element name="book">
<xs:complexType>
<xs:sequence>
<xs:element name="title" type="xs:string"/>
<xs:element name="authors">
<xs:complexType>
<xs:sequence>
<xs:element name="person">
<xs:complexType>
<xs:sequence>
<xs:element name="name" type="xs:string"/>
</xs:sequence>
<xs:attribute name="id" type="xs:string"
use="required"/>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:any namespace="http://dyomedea.com/ns/library/mkt"
processContents="skip"minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="id" use="required">
<xs:simpleType>
<xs:restriction base="xs:hexBinary"/>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:schema>
This schema has been opened to accept any element from a single
namespace and can be further opened to accept any element from any
namespace other than the target namespace:
<xs:anyAttribute namespace="##other" processContents="skip"/>