Name

xs:attribute

Attributes

default

A value for the attribute that should be reported in cases where instance documents don’t explicitly include the attribute. (An xs:attribute element may have either a default attribute or a fixed attribute, but not both.)

fixed

A value for the attribute that cannot be changed. Documents may not provide a different value for the attribute, and this value is provided if the documents don’t explicitly include the attribute. (An xs:attribute element may have either a default attribute or a fixed attribute, but not both.)

form

Takes the values qualified and unqualified. If qualified, the attribute must be used—with a prefix—in the schema’s target namespace. If unqualified, the attribute must be used without a namespace. (form provides an opportunity to override the attributeFormDefault attribute of the xs:schema element.) This only works on local attribute declarations.

name

The local name of the attribute. Note that this is not the qualified name; the namespace for the attribute is determined by the value of the form attribute if name is used. (An xs:attribute element may have either a name attribute or a ref attribute, but not both. An xs:attribute element that uses name must also provide a type attribute to complete the definition of the attribute; otherwise, it defaults to xs:anySimpleType.)

ref

The namespace-qualified name of the attribute to be included by reference to a declaration at the top level of the schema. (An xs:attribute element may have either ...

Get XML Pocket Reference, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.