From 4198b0a54f74cb7c24c3052793a0b878cf9d7553 Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Thu, 21 Jun 2007 23:30:53 +0000 Subject: [PATCH] Improved general logging template to parameterize some parts that were hardcoded previously. --- xsl/common/common.xsl | 139 ++++++++++++++++++++++++++++++++++++------ 1 file changed, 119 insertions(+), 20 deletions(-) diff --git a/xsl/common/common.xsl b/xsl/common/common.xsl index 8edb30d4b..55ed906d5 100644 --- a/xsl/common/common.xsl +++ b/xsl/common/common.xsl @@ -1966,7 +1966,7 @@ unchanged. Evaluates an info profile - This function evaluates an "info profile" matching the XPath + This template evaluates an "info profile" matching the XPath expression given by the profile parameter. It relies on the XSLT evaluate() extension function. @@ -2033,8 +2033,8 @@ engine does not support it. Logs/emits formatted notes and warnings - The log.message function is a utility - function for logging/emitting formatted messages â€“ that is, + The log.message template is a utility + template for logging/emitting formatted messages â€“ that is, notes and warnings, along with a given log "level" and an identifier for the "source" that the message relates to. @@ -2044,7 +2044,8 @@ engine does not support it. level - Text to indicate the message level + Text to log/emit in the message-level field to + indicate the message level (Note or Warning) @@ -2052,20 +2053,64 @@ engine does not support it. source - Text to identify source element the - notification/warning relates to + Text to log/emit in the source field to identify the + “source” to which the notification/warning relates. + This can be any arbitrary string, but because the + message lacks line and column numbers to identify the + exact part of the source document to which it + relates, the intention is that the value you pass + into the source parameter should + give the user some way to identify the portion of + their source document on which to take potentially + take action in response to the log message (for + example, to edit, change, or add content). + So the source value should be, + for example, an ID, book/chapter/article title, title + of some formal object, or even a string giving an + XPath expression. + + + + context-desc + + Text to log/emit in the context-description field to + describe the context for the message. + + + + context-desc-field-length + + Specifies length of the context-description field + (in characters); default is 12 + If the text specified by the + context-desc parameter is longer + than the number of characters specified in + context-desc-field-length, it is + truncated to context-desc-field-length + (12 characters by default). + If the specified text is shorter than + context-desc-field-length, + it is right-padded out to + context-desc-field-length (12 by + default). + If no value has been specified for the + context-desc parameter, the field is + left empty and the text of the log message begins with + the value of the message + parameter. message - Message to lot/emit + Text to log/emit in the actual message field - message-width + message-field-length - Expected maximum message width + Specifies length of the message + field (in characters); default is 45 @@ -2077,18 +2122,72 @@ engine does not support it. + + 12 + + + + right + + + + + - 50 - : - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + right + + + + + + + + + : + + + + : + + + + + -- 2.40.0