From 2b6206f815d6e08cafc26bb9df5a09206b097a0e Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Wed, 5 Mar 2008 15:16:10 +0000 Subject: [PATCH] Made reporting of missing refentry metadata more quiet: - we no longer report anything if usable-but-not-preferred metadata is found; we just quietly use whatever we manage to find - we now only report missing "source" metadata if the refentry is missing BOTH "source name" and "version" metadata; if it has one but not the other, we use whichever one it has and don't report anything as missing The above changes were made because testing with some "real world" source reveals that some authors are intentionally choosing to use "non preferred" markup for some metadata, and also choosing to omit "source name" or "version" metadata in there DocBook XML. So it does no good to give them pedantic reminders about what they already know... Also, changed code to cause "fixme" text to be inserted in output in particular cases: - if we can't manage to find any "source" metadata at all, we now put fixme text into the output - if we can't manage to find any "manual" metadata a all, we now put fixme text into the output The "source" and "manual" metadata is necessary information, so buy putting the fixme stuff in the output, we alert users to the need problem of it being missing. --- xsl/common/refentry.xsl | 219 +++++++++++++++++++++------------------- 1 file changed, 116 insertions(+), 103 deletions(-) diff --git a/xsl/common/refentry.xsl b/xsl/common/refentry.xsl index c6fa14553..54f4e46a5 100644 --- a/xsl/common/refentry.xsl +++ b/xsl/common/refentry.xsl @@ -559,8 +559,14 @@ - + + + + + + + @@ -572,13 +578,14 @@ + [FIXME: source] Warn meta source - no valid fallback for source; leaving empty + no fallback for source, so inserted a fixme @@ -586,13 +593,14 @@ + [FIXME: source] Warn meta source - no source fallback specified; leaving empty + no source fallback given, so inserted a fixme @@ -741,42 +749,6 @@ productname - - - - Note - - meta source - - no *info/productname or alternative - - - - Note - - 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 - - - - @@ -784,6 +756,44 @@ + + + + + Note + + meta source + + no *info/productname or alternative + + + + Note + + 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 + + + + + Gets version metadata for a refentry @@ -886,42 +896,6 @@ productnumber - - - - Note - - meta version - - no *info/productnumber or alternative - - - - Note - - 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 - - - - @@ -929,6 +903,44 @@ + + + + + Note + + meta version + + no *info/productnumber or alternative + + + + Note + + 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 + + + + + Gets source metadata for a refentry @@ -1109,28 +1121,29 @@ + [FIXME: manual] Warn meta manual - no valid fallback for manual; leaving empty + no fallback for manual, so inserted a fixme - + [FIXME: manual] Warn meta manual - no manual fallback specified; leaving empty + no manual fallback given, so inserted a fixme @@ -1260,31 +1273,31 @@ - - - - Note - - - - - - Note - - - - no refentry/refmeta/refmiscinfo@class= - - - - - Note - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + -- 2.40.0