AttributeOrderSniff
DocbookCS.AttributeOrder
Ensures that when an element carries both xml:id and an xmlns (or xmlns:*)
attribute, xml:id appears first. This is the convention in the PHP manual:
identity attributes precede namespace declarations.
Properties
| Property | Type | Default | Description |
|---|---|---|---|
severity | string | error | Override the violation severity. Accepted values: error, warning. |
What it catches
Wrong
<book xmlns="..." xml:id="manual">
Correct
<book xml:id="manual" xmlns="...">
Elements that do not have both xml:id and an xmlns attribute are not checked.