[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
4.4.1.4 SGML Filter
The SGML filter allows you to spell check SGML, HTML, XHTML, and XML files. In most cases everything within a tag ‘<tag attrib=value attrib2="a whole sentence">’ will be skipped by the spell checker. The SGML/HTML/XML that Aspell supports is a slight superset of most DTDs (Document Type Definitions) and can spell check the often non-conforming HTML found on the web.
Two configuration options, ‘sgml-skip’ and ‘sgml-check’, allow you to control what is spell checked. The tag and attribute names specified are case insensitive.
- sgml-skip
This is a list of tags whose contents will also be skipped by the spell checker. For example, if you wish to leave a misspelling in a document and not have them flagged as misspellings, you could surround them with a <nospellcheck> tag:
<TD><FONT size=2><NOSPELLCHECK>leviosa</NOSPELLCHECK> is what Mr. Potter said</FONT></TD>
And put that word in the skip config directive:
add-sgml-skip nospellcheck
- sgml-check
-
This is a list of attributes whose values you do want spell checked. By default, ’alt’ (<img> alternate text) is a member of the check list since it is text that is seen by a web page viewer. You may also want ’value’ to be on the check list since that is the text put on buttons:
add-sgml-check value
In this case ‘<input type=button value="Donr">’ will be flagged as a misspelling.
This filter will also translate SGML characters of the form ‘&#num;’. Other SGML characters such as ‘&’ will simply be skipped over so that the word ‘amp’, for example, will not be spell checked. Eventually full support for properly translating SGML characters will be added.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |