xs:any
<xs:any id = "ID
" maxOccurs = "nonNegativeInteger
| unbounded" minOccurs = "nonNegativeInteger
" namespace = "##any
| ##other |anyURI
* ##targetNamespace? ##local? " processContents = " lax | skip |strict
"> <!-- xs:annotation? --> </xs:any>
The wildcard element xs:any
is useful when writing schemas for languages such
as XSLT that routinely include markup from multiple vocabularies
that are unknown when the schema is written. It indicates that
between minOccurs
and maxOccurs
elements from one or more
namespaces identified by the namespace
attribute may appear at that
position in a content model. As well as literal namespace URIs,
the special value ##targetNamespace
can be included in the
list to indicate that any element from the schema's target
namespace can be used. The special value ##local
can be included in the list to
indicate that elements not in any namespace can be used. Instead
of the list of namespace URIs, you can use the special value
##any
to indicate that all
elements from any namespace or no namespace are allowed, or the
special value ##other
to
indicate that elements from namespaces other than the schema's
target namespace can be used.
The processContents
attribute indicates whether the elements represented by xs:any
have to be declared or whether
they can be completely unfamiliar to the schema. It has one of
these three values:
strict
Elements represented by this xs:any
element must be declared or
have an xsi:type
attribute. Furthermore, the element must be valid according
to its declaration or type.
skip
Elements represented by this xs:any
element need not be
declared in the schema and need not be valid even if they
are declared.
lax
Elements represented by this xs:any
element must be validated
if they are declared or if they have an xsi:type
attribute, but must not
be validated if they are neither declared nor have an
xsi:type
attribute.
The default value is strict
.