XML attribute '{0}' is not defined

XML attribute '{0}' is not defined. Expected xml:space or xml:lang.

This error occurs when you use an attribute scoped to the xml namespace which is not defined. The only valid attributes in the xml namespace are xml:space and xml:lang.

This error is raised when the file is a valid XML document, but is not a well-formed XAML document.

Error ID: XAML0423

To correct this error

  • Change the attribute to one of the valid values for an xml namespace attribute, xml:space and xml:lang.

To correct this error

  • Check the spelling of the xml namespace attribute.

Example

The following code example shows valid assignments to the xml:space and xml:lang attributes.

<Button xml:space='preserve'> OK </Button>
<Button xml:lang='rfc3066lang'>OK</Button>

<!-- Uncomment the following line to raise error XAML0423. -->
<!-- <Button xml:unknown='default'> OK </Button> -->

See Also

Concepts

XAML Errors and Help

Reference

xml:space Handling in XAML

xml:lang Handling in XAML

Other Resources

XAML

XML Standards Reference

Attributes [XML Standards]