Enables any attribute from the specified namespace(s) to appear in the containing complexType element or in the containing attributeGroup element.
<anyAttribute id = ID namespace = ((##any | ##other) | List of (anyURI | (##targetNamespace | ##local))) : ##any processContents = (lax | skip | strict): strict {any attributes with non-schema Namespace…}> Content: (annotation?) </anyAttribute>
Optional.
##any | Attributes from any namespace can be present. |
##other | Attributes from any namespace that is not the target namespace of the parent element containing this anyAttribute element can be present. |
##local | Attributes that are not qualified with a namespace can be present. |
##targetNamespace | Attributes from the target namespace of the parent element containing this anyAttribute element can be present. |
List of {URI references, ##targetNamespace, ##local} | Attributes from a space-delimited list of the namespaces can be present. The list can contain the following: URI references of namespaces, ##targetNamespace, and ##local. |
Optional.
strict | The XML processor must obtain the schema for the required namespaces and validate any attribute from those namespaces. |
lax | The XML processor attempts to obtain the schema for the required namespaces and validate any attribute from those namespaces; however, if the schema cannot be obtained, no errors will occur. |
skip | The XML processor does not attempt to validate any attributes from the specified namespaces. |
Optional.
Number of occurrences | Unlimited |
Parent elements | complexType, restriction (simpleContent), extension (simpleContent), restriction (complexContent), extension (complexContent), attributeGroup |
Contents | annotation |
The following example shows an element declaration for an element that contains a string and can have any attribute from the target namespace.
<xs:element name="stringElementWithAnyAttribute"> <xs:complexType> <xs:simpleContent> <xs:extension base="xs:string"> <xs:anyAttribute namespace="##targetNamespace"/> </xs:extension> </xs:simpleContent> </xs:complexType> </xs:element>
XML Schema Reference (XSD) | XML Schema Elements
For more information, see the W3C XML Schema Part 1: Structures Recommendation at http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#element-anyAttribute.