# The attribute is not allowed

Source: https://xmlvalid.com/errors/attribute-is-not-allowed

> An attribute the schema does not declare for this element.

Example message: `Element 'order', attribute 'vat': The attribute 'vat' is not allowed.`

## Why it happens

- An attribute from a newer or different version of the format.
- A misspelt attribute name.
- An attribute that belongs to a child element, not this one.

## How to fix it

- Remove the attribute or rename it to one the schema declares. `xmlns` and `xsi:schemaLocation` are always allowed; anything else must be declared.

## Example that fails

```xml
<order currency="EUR" vat="20">
  <id>A-1</id>
  <qty>1</qty>
</order>
```

## Fixed

```xml
<order currency="EUR">
  <id>A-1</id>
  <qty>1</qty>
</order>
```
