From d15e67c8cfb2b5f5defc78f04139e9f03764db6f Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Fri, 22 Jun 2007 02:25:31 +0000 Subject: [PATCH] Refined logging output of refentry metadata-gathering template; for some cases of "missing" elements (refmiscinfo stuff, etc.), the log messages now include URL to corresponding page in the Definitive Guide (TDG). --- xsl/common/refentry.xsl | 293 +++++++++++++++++++++------------------- 1 file changed, 152 insertions(+), 141 deletions(-) diff --git a/xsl/common/refentry.xsl b/xsl/common/refentry.xsl index bbe5d7265..140402c6e 100644 --- a/xsl/common/refentry.xsl +++ b/xsl/common/refentry.xsl @@ -16,7 +16,6 @@ ******************************************************************** --> - @@ -50,10 +49,8 @@ - Gathers metadata from a refentry and its ancestors - Reference documentation for particular commands, functions, etc., is sometimes viewed in isolation from its greater "context". For @@ -73,7 +70,7 @@ the releaseinfo element. Taking all that in mind, the - get.refentry.metadata function tries to gather + get.refentry.metadata template tries to gather metadata from a refentry element and its ancestor elements in an intelligent and user-configurable way. The basic mechanism used in the XPath expressions throughout this stylesheet @@ -82,14 +79,13 @@ refentry itself, or on its nearest ancestor. - The get.refentry.metadata function is - actually just sort of a "driver" function; it calls other - functions that do the actual data collection, then returns the - data as a set. + The get.refentry.metadata + template is actually just sort of a "driver" template; it + calls other templates that do the actual data collection, + then returns the data as a set. - @@ -114,7 +110,6 @@ - Returns a node set with the following elements. The descriptions are verbatim from the man(7) man @@ -156,7 +151,6 @@ - @@ -195,10 +189,8 @@ - Gets title metadata for a refentry - The man(7) man page describes this as "the title of the man page (e.g., MAN). This differs @@ -207,7 +199,6 @@ otherwise, we just use first refname in the first refnamediv in the source. - @@ -218,11 +209,9 @@ - Returns a title node. - @@ -238,10 +227,8 @@ - Gets section metadata for a refentry - The man(7) man page describes this as "the section number the man page should be placed in (e.g., @@ -252,7 +239,6 @@ default to using 1 ["Executable programs or shell commands"]. - @@ -269,7 +255,6 @@ - Returns a string representing a section number. @@ -286,9 +271,18 @@ Note - meta manvol : No manvolnum + meta manvol + + no refentry/refmeta/manvolnum + + + + Note + + meta manvol + + see http://docbook.sf.net/el/manvolnum + @@ -299,9 +293,10 @@ Note - meta manvol : Setting man section to 3 + meta manvol + + Setting man section to 3 + @@ -316,16 +311,13 @@ - Gets date metadata for a refentry - The man(7) man page describes this as "the date of the last revision". If we cannot find a date in the source, we generate one. - @@ -349,10 +341,10 @@ - - Returns a date node. + + Returns a date node. + - @@ -398,9 +390,18 @@ Note - meta date : No date. Using generated date + meta date + + no date; using generated date + + + + Note + + meta date + + see http://docbook.sf.net/el/date + @@ -427,10 +428,8 @@ - Gets source metadata for a refentry - The man(7) man page describes this as "the source of the command", and provides the following examples: @@ -491,7 +490,6 @@ probably will be no Version. - @@ -516,10 +514,10 @@ - - Returns a source node. + + Returns a source node. + - @@ -575,9 +573,10 @@ Warn - meta source : No valid fallback. Leaving empty + meta source + + no valid fallback for source; leaving empty + @@ -588,9 +587,10 @@ Warn - meta source : No fallback specified; leaving empty. + meta source + + no source fallback specified; leaving empty + @@ -598,17 +598,14 @@ - Gets source-name metadata for a refentry - A "source name" is one part of a (potentially) two-part Name Version source field. For more details, see the documentation for the get.refentry.source template. - @@ -633,12 +630,12 @@ - - Depending on what output method is used for the + + Depending on what output method is used for the current stylesheet, either returns a text node or possibly an element - node, containing "source name" data. + node, containing "source name" data. + - @@ -746,16 +743,34 @@ Note - meta source : No productname or alternative + meta source + + no *info/productname or alternative + Note - meta source : No refmiscinfo@class=source + meta source + + see http://docbook.sf.net/el/productname + + + + Note + + meta source + + no refentry/refmeta/refmiscinfo@class=source + + + + Note + + meta source + + see http://docbook.sf.net/el/refmiscinfo + @@ -767,17 +782,14 @@ - Gets version metadata for a refentry - A "version" is one part of a (potentially) two-part Name Version source field. For more details, see the documentation for the get.refentry.source template. - @@ -802,12 +814,12 @@ - - Depending on what output method is used for the + + Depending on what output method is used for the current stylesheet, either returns a text node or possibly an element - node, containing "version" data. + node, containing "version" data. + - @@ -876,16 +888,34 @@ Note - meta version: No productnumber or alternative + meta version + + no *info/productnumber or alternative + Note - meta version: No refmiscinfo@class=version + meta version + + see http://docbook.sf.net/el/productnumber + + + + Note + + meta version + + no refentry/refmeta/refmiscinfo@class=version + + + + Note + + meta version + + see http://docbook.sf.net/el/refmiscinfo + @@ -897,10 +927,8 @@ - Gets source metadata for a refentry - The man(7) man page describes this as "the title of the manual (e.g., Linux Programmer's @@ -948,7 +976,6 @@ - @@ -973,8 +1000,9 @@ - - Returns a manual node. + + Returns a manual node. + @@ -1032,16 +1060,26 @@ Note - meta manual : No ancestor with title + meta manual + + no titled ancestor of refentry + + + + Note + + meta manual + + no refentry/refmeta/refmiscinfo@class=manual + Note - meta manual : No refmiscinfo@class=manual + meta manual + + see http://docbook.sf.net/el/refmiscinfo + @@ -1072,9 +1110,10 @@ Warn - meta manual : No valid fallback. Leaving empty + meta manual + + no valid fallback for manual; leaving empty + @@ -1086,9 +1125,10 @@ Warn - meta manual : No fallback specified; leaving empty. + meta manual + + no manual fallback specified; leaving empty + @@ -1096,32 +1136,31 @@ - Gets user preferences for refentry metadata gathering - The DocBook XSL stylesheets include several user-configurable global stylesheet parameters for controlling refentry metadata gathering. Those parameters are not read directly by the - other refentry metadata-gathering functions. Instead, they - are read only by the get.refentry.metadata.prefs - function, which assembles them into a structure that is then passed to - the other refentry metadata-gathering functions. + other refentry metadata-gathering + templates. Instead, they are read only by the + get.refentry.metadata.prefs template, + which assembles them into a structure that is then passed to + the other refentry metadata-gathering + templates. So the, get.refentry.metadata.prefs - function is the only interface to collecting stylesheet parameters for + template is the only interface to collecting stylesheet parameters for controlling refentry metadata gathering. - - There are no local parameters for this function; however, it + There are no local parameters for this template; however, it does rely on a number of global parameters. - - Returns a manual node. + + Returns a manual node. + - @@ -1172,16 +1211,13 @@ - Sets content of a refentry metadata item - - The set.refentry.metadata function is + The set.refentry.metadata template is called each time a suitable source element is found for a certain metadata field. - @@ -1206,7 +1242,7 @@ context A string describing the metadata context in which the - set.refentry.metadata function was + set.refentry.metadata template was called: either "date", "source", "version", or "manual". @@ -1215,7 +1251,6 @@ Returns formatted contents of a selected source element. - @@ -1227,47 +1262,23 @@ Note - meta - - - : No + + Note - meta - - - : No refmiscinfo@class= + + + no refentry/refmeta/refmiscinfo@class= + + Note - meta - - - : Using + + -- 2.49.0