Fixing XHTML syntax errors

Aggiorno corrects many syntactical and structural errors in an XHTML/ASP.NET page, lowering validation errors and warnings, while maintaining rendering behavior. The Fixing XHTML syntax errors aggiorning assumes the structure of the document is correct and focuses on fixing common errors and malpractices. This aggiorning uses the XHTML 1.0 Transitional DOCTYPE as a reference. You can find detailed examples below

Fix malformed entities

XHTML entities should always begin with an & and finish with a ; character. Some browsers render them even when they are not correctly defined, leading to inconsistencies.

Replace characters with entities

Non-standard characters such as á, ñ or @ should be defined using either named or numerical entities, and not directly using the underlying encoding. Depending on what value you choose for this option, encodable entities will be represented using a numbered (if you select NumberedEntities) or a named (when option is set to NamedEntities) XHTML-based representation. This transformation can come in really useful not only when pasting code from an external source, such as a word processor, but also when writing content for the first time using Visual Studio's code editor: you can write it as usual, and Aggiorno will convert characters to entities in a snap.

Make attributes' values quoted

Attribute values should always be surrounded by either single or double quotes. Some browsers do not enforce this restriction, but the resulting behavior is not predictable. This Aggiorning resolves these ambiguities by correctly quoting all values.

Make attributes lowercase

In order to simplify page processing and reduce potential ambiguity, XHTML requires that all attributes be in lower case. This Aggiorning will detect and transform all attributes names that are not fully in lower case.

Make tags lowercase

Even though most browsers ignore this, XHTML defines that all tags should be in lower case. Failure to comply with this standard is reason enough for an XHTML page not to be a valid XHTML Web Page.

Use default attribute value

When an attribute does not have a value assigned, most browsers use its default value. XHTML requires that this should be assigned explicitly.