ZVON > Tutorials > XML Schema and Relax NG Tutorial
Index
Contents > attributeFormDefault

attributeFormDefault

Target namespace is not null, attributeFormDefault is qualified

The target namespace is not null here. If the attribute "attributeFormDefault" is set to "qualified", the attribute "xx" must be from the target namespace.

If we want the attribute to be from some particular non-null namespace, we must specify this explicitly, using the "name" element with "ns" attribute, or element "attribute" with both "name" and "ns" attributes.

...
Target namespace is not null, attributeFormDefault is unqualified

When the form is "unqualified" (default behaviour), the attributes must be from the null namespace.

We can set the namespace using the "ns" attribute, but if we want the attributes to be from some non-null namespace, we must explicitly put the "ns" attribute either to the "attribute/name" element or to the "attribute[@name]" element.

...
Target namespace is null

The target namespace is null here. The attribute "attributeFormDefault" does not play any role here.

When the form is "unqualified" (this is the default), the attributes must be from the null namespace. The attribute "attributeFormDefault" does not play any role here.

We can set the namespace using the "ns" attribute, but if we want the attributes to be from some non-null namespace, we must explicitly put the "ns" attribute either to the "attribute/name" element or to the "attribute[@name]" element.

...