Synonyms
Definition
An XML attribute is used to represent additional information on an XML element in the W3C XML recommendation [2].
Key Points
The name of an XML attribute has to be unique for a given element. Therefore, the following XML element is not allowed
<e a1 = “v1” a1 = “v2”/>
while the following is well-formed
<e1 a1 = “v1”> <e2 a1 = “v2”/> </e1>
An XML attribute has a value that follows the attribute value normalization rules outlined in section 3.3.3 of [2]. This means that several whitespace characters do not get preserved in attribute values, unless they are explicitly represented with a character entity (e.g., for carriage return).
Attributes can be constrained and typed by schema languages such as XML DTDs [2] or XML Schema [3].
An XML attribute is represented as an XML attribute information item in the XML Information Set [1] and an XML attribute node in the XPath and XQuery data model [4].
Cross-references
XML Document...