Spelling and Grammar
A spelling and grammar error is an annotation used to specify the locations of an existing spelling and/or grammatical error within the contents of a document. Spelling and grammar errors use the cross-structure annotation format.
Rationale: When a WordprocessingML document is saved, applications may choose to save currently flagged spelling and grammar errors, for two reasons:
In order to increase the performance subsequent loads of the document (as those load operations can rely on the persisted proofing state of the document)
In order to store words which shall not be marked as proofing errors regardless of how they would normally be flagged by the proofing tools engine (i.e., to store spelling and grammar exceptions).
Consider the following paragraph consisting of two misspelled words, where the second word has been explicitly flagged as not being a spelling error. This paragraph would consist of the following WordprocessingML markup:
<w:p> <w:proofErr w:val="spellStart"/> <w:r> <w:t>erqwt</w:t> </w:r> <w:proofErr w:val="spellEnd"/> <w:r> <w:t xml:space="preserve"> werewr</w:t> </w:r> </w:p>
The <proofErr>
elements, with a @val
attribute value of spellStart
and spellEnd
, respectively, delimit the start and end of the content in this paragraph that is stored as a spelling error. Since the second word is not included in that range, it is not stored as a spelling error.