NAME
Apache::AxKit::Language::SpellCheck - XML Text Spell Checker
SYNOPSIS
AxAddStyleMap text/x-spell-check Apache::AxKit::Language::SpellCheck
Alias /spell/ /path/to/docroot
<Location /spell/>
SetHandler axkit
AxResetProcessors
AxAddProcessor text/x-spell-check NULL
</Location>
SetHandler axkit
AxAddProcessor text/xsl /stylesheets/scrub-xml.xsl
AxAddProcessor text/x-spell-check NULL
AxAddProcessor text/xsl /stylesheets/display-html.xsl
DESCRIPTION
This language module processes an incoming XML document, either loaded from disk or returned from the previous pipeline stage, and processes its text nodes with Text::Aspell. It injects additional XML elements in the document representing which words are incorrectly spelled, and optionally offers spelling suggestions.
The XML elements injected into the source document appear similar to the following, though without the exta whitespace.
<sp:incorrect xmlns:sp="http://axkit.org/2004/07/17-spell-check#">
<sp:suggestion>CASS</sp:suggestion>
<sp:suggestion>CUSS</sp:suggestion>
<sp:word>CSS</sp:word>
</sp:incorrect>
OPTIONS
The following options can be used to change the default behavior of this language module:
AxSpellLanguage
PerlSetVar AxSpellLanguage fr
Use this directive to change the language you wish to use when checking spelling. Defaults to "en_US".
AxSpellSuggestions
PerlSetVar AxSpellSuggestions 5
Indicates the maximum number of spelling suggestions to return. This defaults to 3. If set to 0, then no suggestions are ever returned.
AxSpellSkipElements
PerlSetVar AxSpellSkipElements "h1 title {http://www.w3.org/1999/02/22-rdf-syntax-ns#}RDF"
Informs the spell checking processor to skip any text contained within the specified XML elements. If you need to specify a namespace URI for an element, then prefix the element's local name with the namespace URI, enclosed in curly-braces "{}".
BUGS
Doesn't process attribute text
Has no facility for specifying alternate spelling databases