XSD SchemaLesson 95Free preview
XSD <anyAttribute>
This lesson is part of XML · All levels
Summary
<xs:anyAttribute> allows for additional attributes that are not declared in the scheme, so that the data can carry developer-owned extensible metadata. Like xs:any, it is placed inside <xs:complexType> and controlled by the namespace and processContents attributes. Without the xs:anyAttributes, an unknown attribute is enough to invalidate a document.
Key points
- <xs:anyAttribute> is inside <xs:complexType>, usually after another attribute
- Namespace="##other" receives attributes from the namespace other than the target
- ProcessContents="skip" misses the examination for additional attributes
- Attributes without prefixes are derived from the local namespace of the document (##local)
- Without a wildcard, every attribute must be declared in the scheme
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.