Add a DSSSL stylsheet to enable more efficient spellchecking. This
stylesheet omits the contents of <filename>, <devicename>, <programlisting>, and other tags that are likely to not contain real English words. The output of this stylesheet can then be checked with 'make spellcheck' with far fewer false positives.
This commit is contained in:
parent
33f2fcfd0a
commit
551eaf5b40
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/head/; revision=21487
2 changed files with 73 additions and 0 deletions
|
@ -58,6 +58,12 @@
|
|||
# CSS_SHEET Full path to a CSS stylesheet suitable for DocBook.
|
||||
# Default is ${DOC_PREFIX}/share/misc/docbook.css
|
||||
#
|
||||
#
|
||||
# SPELLCHECK Use the special spellcheck.dsl stylesheet to render
|
||||
# HTML that is suitable for processing through a
|
||||
# spellchecker. For example, PGP keys and filenames
|
||||
# will be ommitted from this output.
|
||||
#
|
||||
# Print-output options :
|
||||
#
|
||||
# NICE_HEADERS If defined, customized chapter headers will be created
|
||||
|
@ -120,6 +126,10 @@ STYLESHEET_TYPE?= dsssl
|
|||
OPENJADE= yes
|
||||
.endif
|
||||
|
||||
.if defined(SPELLCHECK)
|
||||
DSLHTML?= ${DOC_PREFIX}/share/sgml/spellcheck.dsl
|
||||
.endif
|
||||
|
||||
.if defined(OPENJADE)
|
||||
JADE?= ${PREFIX}/bin/openjade
|
||||
JADECATALOG?= ${PREFIX}/share/sgml/openjade/catalog
|
||||
|
|
63
share/sgml/spellcheck.dsl
Normal file
63
share/sgml/spellcheck.dsl
Normal file
|
@ -0,0 +1,63 @@
|
|||
<!-- $FreeBSD$ -->
|
||||
|
||||
<!--
|
||||
|
||||
The current generation of open source SGML aware spellcheckers are
|
||||
insufficient for our needs. They produce far too many false positives
|
||||
since they just ignore the tags themselves but still spellcheck the
|
||||
contents of all tags. This stylesheet specifically omits the output
|
||||
of tags that may contain data that should not be spellchecked. For
|
||||
example, the contents of <filename> tags should not be spellchecked.
|
||||
|
||||
-->
|
||||
|
||||
<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
|
||||
<!ENTITY freebsd.dsl PUBLIC "-//FreeBSD//DOCUMENT DocBook Stylesheet//EN" CDATA DSSSL>
|
||||
<!ENTITY % output.print "IGNORE">
|
||||
<!ENTITY % output.html "IGNORE">
|
||||
|
||||
]>
|
||||
|
||||
<style-sheet>
|
||||
<style-specification use="docbook">
|
||||
<style-specification-body>
|
||||
|
||||
<![ %output.html; [
|
||||
|
||||
|
||||
<!--
|
||||
(element programlisting
|
||||
(if (equal? (normalize "pgpfingerprint") (attribute-string "role"))
|
||||
(empty-sosofo)
|
||||
(if (equal? (normalize "pgpkey") (attribute-string "role"))
|
||||
(empty-sosofo)
|
||||
(next-match))))
|
||||
-->
|
||||
|
||||
(element programlisting
|
||||
(empty-sosofo))
|
||||
|
||||
(element screen
|
||||
(empty-sosofo))
|
||||
|
||||
(element hostid
|
||||
(empty-sosofo))
|
||||
|
||||
(element filename
|
||||
(empty-sosofo))
|
||||
|
||||
(element devicename
|
||||
(empty-sosofo))
|
||||
|
||||
(element otheraddr
|
||||
(empty-sosofo))
|
||||
|
||||
(element command
|
||||
(empty-sosofo))
|
||||
|
||||
]]>
|
||||
</style-specification-body>
|
||||
</style-specification>
|
||||
|
||||
<external-specification id="docbook" document="freebsd.dsl">
|
||||
</style-sheet>
|
Loading…
Reference in a new issue