Spelling & Grammar

The final type of annotation stored in a WordprocessingML document, spelling and grammar errors are annotations used to specify the locations of existing spelling and grammatical errors within the contents of a document.

[: 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).

]

example:
<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 the content in this paragraph which is stored as a spelling error. Since the second word is not included in that range, it is not stored as a spelling error. ]