From e9164a19caf466657b8b654e294a716a2586d3c4 Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Sat, 8 Mar 2008 17:50:28 +0000 Subject: [PATCH] Added new param man.base.url.for.relative.links .. specifies a base URL for relative links (for ulink, @xlink:href, imagedata, audiodata, videodata) shown in the generated NOTES section of man-page output. The value of man.base.url.for.relative.links is prepended to any relative URI that is a value of ulink url, xlink:href, or fileref attribute. If you use relative URIs in link sources in your DocBook refentry source, and you leave man.base.url.for.relative.links unset, the relative links will appear "as is" in the NOTES section of any man-page output generated from your source. That's probably not what you want, because such relative links are only usable in the context of HTML output. So, to make the links meaningful and usable in the context of man-page output, set a value for man.base.url.for.relative.links that points to the online version of HTML output generated from your DocBook refentry source. For example: http://www.kernel.org/pub/software/scm/git/docs/ --- xsl/manpages/endnotes.xsl | 38 ++++++++-- xsl/manpages/param.ent | 1 + xsl/manpages/param.xweb | 2 + .../man.base.url.for.relative.links.xml | 76 +++++++++++++++++++ 4 files changed, 109 insertions(+), 8 deletions(-) create mode 100644 xsl/params/man.base.url.for.relative.links.xml diff --git a/xsl/manpages/endnotes.xsl b/xsl/manpages/endnotes.xsl index 1b81be54e..c78f95885 100644 --- a/xsl/manpages/endnotes.xsl +++ b/xsl/manpages/endnotes.xsl @@ -42,8 +42,8 @@ - - + + @@ -68,8 +68,8 @@ - - + + @@ -481,13 +481,15 @@ - + - + - + + + @@ -520,7 +522,9 @@ \% - + + + .RE @@ -529,4 +533,22 @@ + + + + + + + + + + + + + + + + + diff --git a/xsl/manpages/param.ent b/xsl/manpages/param.ent index 87f5a442b..034b3ca2d 100644 --- a/xsl/manpages/param.ent +++ b/xsl/manpages/param.ent @@ -1,5 +1,6 @@ + diff --git a/xsl/manpages/param.xweb b/xsl/manpages/param.xweb index d297664a7..b2b8f51fe 100644 --- a/xsl/manpages/param.xweb +++ b/xsl/manpages/param.xweb @@ -68,6 +68,7 @@ &man.endnotes.list.enabled; &man.endnotes.list.heading; &man.endnotes.are.numbered; +&man.base.url.for.relative.links; &man.links.are.underlined; @@ -152,6 +153,7 @@ + diff --git a/xsl/params/man.base.url.for.relative.links.xml b/xsl/params/man.base.url.for.relative.links.xml new file mode 100644 index 000000000..a802ec80a --- /dev/null +++ b/xsl/params/man.base.url.for.relative.links.xml @@ -0,0 +1,76 @@ + + + man.base.url.for.relative.links + string + + + man.base.url.for.relative.links + Specifies a base URL for relative links + + + + [set $man.base.url.for.relative.links]/ + + + Description + + For any “notesource” listed in the auto-generated + “NOTES” section of output man pages (which is generated when + the value of the + man.endnotes.list.enabled parameter + is non-zero), if the notesource is a link source with a + relative URI, the URI is displayed in output with the value + of the + man.base.url.for.relative.links + parameter prepended to the value of the link URI. + + + A link source is an notesource that references an + external resource: + + + a ulink element with a url attribute + + + any element with an xlink:href attribute + + + an imagedata, audiodata, or + videodata element + + + + + + If you use relative URIs in link sources in your DocBook + refentry source, and you leave + man.base.url.for.relative.links + unset, the relative links will appear “as is” in the “Notes” + section of any man-page output generated from your source. + That’s probably not what you want, because such relative + links are only usable in the context of HTML output. So, to + make the links meaningful and usable in the context of + man-page output, set a value for + man.base.url.for.relative.links that + points to the online version of HTML output generated from + your DocBook refentry source. For + example: + <xsl:param name="man.base.url.for.relative.links" + >http://www.kernel.org/pub/software/scm/git/docs/</xsl:param> + + + + + Related Parameters + man.endnotes.list.enabled + + + -- 2.40.0