From: Michael Smith Date: Fri, 19 Jan 2007 08:33:52 +0000 (+0000) Subject: Added the man.string.subst.map.local.pre and X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3b8838925f1b81e1c587f99957cd3967c25b2d4b;p=docbook-dsssl Added the man.string.subst.map.local.pre and man.string.subst.map.local.post parameters. Those parameters enable local additions and changes to string-substitution mappings without the need to change the value of man.string.subst.map parameter (which is for standard system mappings). Closes #1456738. Thanks to Sam Steingold for constructing a true stylesheet torture test (the clisp docs) that exposed the need for these params. --- diff --git a/xsl/manpages/other.xsl b/xsl/manpages/other.xsl index 27434ba7f..88394aa56 100644 --- a/xsl/manpages/other.xsl +++ b/xsl/manpages/other.xsl @@ -346,31 +346,76 @@ db:manvolnum - - - - + + + + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + - + diff --git a/xsl/manpages/param.ent b/xsl/manpages/param.ent index 28792abb6..e80096e43 100644 --- a/xsl/manpages/param.ent +++ b/xsl/manpages/param.ent @@ -15,7 +15,9 @@ + + diff --git a/xsl/manpages/param.xweb b/xsl/manpages/param.xweb index 16f6a1b76..52f61b87e 100644 --- a/xsl/manpages/param.xweb +++ b/xsl/manpages/param.xweb @@ -73,7 +73,9 @@ &man.charmap.uri; &man.charmap.use.subset; &man.charmap.subset.profile; +&man.string.subst.map.local.pre; &man.string.subst.map; +&man.string.subst.map.local.post; Refentry metadata gathering @@ -162,7 +164,9 @@ + + diff --git a/xsl/params/man.string.subst.map.local.post.xml b/xsl/params/man.string.subst.map.local.post.xml new file mode 100644 index 000000000..698e1ad93 --- /dev/null +++ b/xsl/params/man.string.subst.map.local.post.xml @@ -0,0 +1,32 @@ + + +man.string.subst.map.local.post +string + + +man.string.subst.map.local.post +Specifies “local” string substitutions + + + + + + + + +Description + +Use the man.string.subst.map.local.post +parameter to specify any “local” string substitutions to perform over +the entire roff source for each man page after +performing the string substitutions specified by the man.string.subst.map parameter. + +For details about the format of this parameter, see the +documentation for the man.string.subst.map +parameter. + + + diff --git a/xsl/params/man.string.subst.map.local.pre.xml b/xsl/params/man.string.subst.map.local.pre.xml new file mode 100644 index 000000000..b51767dff --- /dev/null +++ b/xsl/params/man.string.subst.map.local.pre.xml @@ -0,0 +1,32 @@ + + +man.string.subst.map.local.pre +string + + +man.string.subst.map.local.pre +Specifies “local” string substitutions + + + + + + + + +Description + +Use the man.string.subst.map.local.pre +parameter to specify any “local” string substitutions to perform over +the entire roff source for each man page before +performing the string substitutions specified by the man.string.subst.map parameter. + +For details about the format of this parameter, see the +documentation for the man.string.subst.map +parameter. + + + diff --git a/xsl/params/man.string.subst.map.xml b/xsl/params/man.string.subst.map.xml index 2af0ff685..fb718d9dc 100644 --- a/xsl/params/man.string.subst.map.xml +++ b/xsl/params/man.string.subst.map.xml @@ -143,7 +143,7 @@ is, before writing man-page files to disk) or, if the value of the before applying the roff character map. You can use man.string.subst.map as a -"lightweight" character map to perform "essential" substitutions -- +“lightweight” character map to perform “essential” substitutions -- that is, substitutions that are always performed, even if the value of the man.charmap.enabled parameter is zero. For example, you can use it to replace quotation @@ -155,13 +155,33 @@ particular customization of the DocBook XSL stylesheets. Do you not change value of the - man.string.subst.map parameter unless - you are sure what you are doing. If you remove any of the default - mappings, you are likely to end up with broken output. And be very - careful about adding anything to it. Because it is used for doing - string substitution over the entire roff source of each man page, it - causes target strings to be replaced in roff requests and escapes, - not just in the visible contents. + man.string.subst.map parameter unless you are + sure what you are doing. First consider adding your + string-substitution mappings to either or both of the following + parameters: + + + man.string.subst.map.local.pre + applied before + man.string.subst.map + + + man.string.subst.map.local.post + applied after + man.string.subst.map + + + By default, both of those parameters contain no + string substitutions. They are intended as a means for you to + specify your own local string-substitution mappings. + + If you remove any of default mappings from the value of the + man.string.subst.map parameter, you are + likely to end up with broken output. And be very about adding + anything to it; it’s used for doing string substitution over the + entire roff source of each man page – it causes target strings to be + replaced in roff requests and escapes, not just in the visible + contents of the page.