A well-formed expression is one that is consistent with a known set of rules for syntax, structure, or any of various constraints of a formal system. A common example is that of a well-formed XML document, where the syntax of the document is capable of being parsed and recognized as XML, even though the content of the document may not be meaningful or accurate.
Overview
A well-formed expression is one that is consistent with a known set of rules for syntax, structure, or any of various constraints of a formal system.
The formal system under consideration may be a programming language specification, a file-format specification, or any set of rules for the establishment of claims, statements, expressions or theorems capable of unambiguous encoding, decoding, and interpretation.
Example
A common example is that of a well-formed XML document, where the syntax of the document is capable of being parsed and recognized as XML, even though the content of the document may not be meaningful or accurate.