[PATCH 1/4] new transform to add counter/placeholder for Vuln-ID into html table

Jeffrey Blank blank at eclipse.ncsc.mil
Mon Oct 22 13:52:16 UTC 2012


Signed-off-by: Jeffrey Blank <blank at eclipse.ncsc.mil>
---
 RHEL6/transforms/table-add-vulnids.xslt |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)
 create mode 100644 RHEL6/transforms/table-add-vulnids.xslt

diff --git a/RHEL6/transforms/table-add-vulnids.xslt b/RHEL6/transforms/table-add-vulnids.xslt
new file mode 100644
index 0000000..5beb5cd
--- /dev/null
+++ b/RHEL6/transforms/table-add-vulnids.xslt
@@ -0,0 +1,16 @@
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xhtml="http://www.w3.org/1999/xhtml">
+
+<!-- this transform inserts a counter into the first column, as Vuln-ID placeholder -->
+
+<xsl:template match="table/tr/td[1]" >
+	<td>V-<xsl:value-of select="count(../preceding-sibling::*)"/></td>
+</xsl:template>
+
+
+<xsl:template match="@*|node()" >
+	<xsl:copy>
+		<xsl:apply-templates select="@*|node()"/>
+	</xsl:copy>
+</xsl:template>
+
+</xsl:stylesheet>
-- 
1.7.1



More information about the scap-security-guide mailing list