diff options
author | Rob Austein <sra@hactrn.net> | 2011-09-15 00:04:23 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2011-09-15 00:04:23 +0000 |
commit | 0c4a98c56785c2f4a6e4fba3941083fc466da893 (patch) | |
tree | 4a188735b9d63422cf8573f1efbc5ec5b8e15162 /rcynic/show.xsl | |
parent | bb6769c8315a193d7940837606951f1c2942e095 (diff) |
Merge rcynic-ng/ back into rcynic/. Used svn merge --ignore-ancestry
to minimize problems for people mirroring the repository.
svn path=/configure; revision=3985
Diffstat (limited to 'rcynic/show.xsl')
-rw-r--r-- | rcynic/show.xsl | 40 |
1 files changed, 22 insertions, 18 deletions
diff --git a/rcynic/show.xsl b/rcynic/show.xsl index c6362f78..06d69893 100644 --- a/rcynic/show.xsl +++ b/rcynic/show.xsl @@ -1,6 +1,6 @@ <?xml version="1.0"?> <!-- - - Copyright (C) 2010 Internet Systems Consortium, Inc. ("ISC") + - Copyright (C) 2010-2011 Internet Systems Consortium, Inc. ("ISC") - - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted, provided that the above @@ -17,33 +17,37 @@ <!-- $Id$ --> -<!-- - - XSL stylesheet to render rcynic's xml-summary output as tab-delimited text. - --> - <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output method="text" encoding="US-ASCII"/> + <!-- Translate rcynic XML into tab-delimited flat text --> <xsl:template match="/"> + + <!-- Write labels as two columns: <label> <tab> <text> --> <xsl:for-each select="rcynic-summary/labels/*"> - <xsl:if test="position() != 1"> - <xsl:text>	</xsl:text> - </xsl:if> - <xsl:apply-templates/> + <xsl:value-of select="name()"/> + <xsl:text>	</xsl:text> + <xsl:value-of select="."/> + <xsl:text> </xsl:text> </xsl:for-each> + + <!-- Blank line between sections --> <xsl:text> </xsl:text> - <xsl:for-each select="rcynic-summary/host"> - <xsl:sort order="descending" data-type="number" select="sum(*[not(self::hostname)])"/> - <xsl:sort order="ascending" data-type="text" select="hostname"/> - <xsl:for-each select="*"> - <xsl:if test="position() != 1"> - <xsl:text>	</xsl:text> - </xsl:if> - <xsl:apply-templates/> - </xsl:for-each> + + <!-- Write status as three colums: <timestamp> <tab> <status> <tab> <uri> --> + <xsl:for-each select="rcynic-summary/validation_status"> + <xsl:sort order="ascending" data-type="text" select="."/> + <xsl:value-of select="@timestamp"/> + <xsl:text>	</xsl:text> + <xsl:value-of select="@status"/> + <xsl:text>	</xsl:text> + <xsl:value-of select="."/> + <xsl:text>	</xsl:text> + <xsl:value-of select="@generation"/> <xsl:text> </xsl:text> </xsl:for-each> + </xsl:template> </xsl:stylesheet> |