Author: gnichols
Date: 2011-02-15 15:58:45 +0000 (Tue, 15 Feb 2011)
New Revision: 782
Added:
trunk/test-env/www/cgi/xsl/device.xsl
Log:
XSLT processing of results.xml prototype
Added: trunk/test-env/www/cgi/xsl/device.xsl
===================================================================
--- trunk/test-env/www/cgi/xsl/device.xsl (rev 0)
+++ trunk/test-env/www/cgi/xsl/device.xsl 2011-02-15 15:58:45 UTC (rev 782)
@@ -0,0 +1,46 @@
+<?xml version="1.0"?>
+
+<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+ <xsl:param name="udi" select="'all'"/>
+
+ <xsl:template match="@*|node()">
+ <xsl:copy>
+ <xsl:apply-templates select="@*|node()"/>
+ </xsl:copy>
+ </xsl:template>
+
+ <xsl:template match="/certification-test/device-class">
+ <xsl:if test="@name = 'system'">
+ <xsl:copy>
+ <xsl:apply-templates select="@*|node()"/>
+ </xsl:copy>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template match="/certification-test/device-class/device">
+ <xsl:choose>
+ <xsl:when test="$udi = 'all'">
+ <xsl:copy>
+ <xsl:apply-templates select="@*|node()"/>
+ </xsl:copy>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:if test="contains(@udi, $udi)">
+ <xsl:copy>
+ <xsl:apply-templates select="@*|node()"/>
+ </xsl:copy>
+ </xsl:if>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template match="/certification-test/device-class/test">
+ <!-- hide tests -->
+ </xsl:template>
+
+ <xsl:include href="filter.xsl"></xsl:include>
+
+</xsl:stylesheet>
+
+