summaryrefslogtreecommitdiff
path: root/tools/regression/xsl_reports/test/restrict_to_library.xsl
blob: 8de3354d84993374a90e696f2b6dda48b28d8782 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                version="1.0">

    <xsl:output method="xml" encoding="ascii"/>
    <xsl:param name="library"/>


    <xsl:template match="/">
        <xsl:message>
            <xsl:value-of select="$library"/>
        </xsl:message>
        <xsl:apply-templates/>
    </xsl:template>

    <xsl:template match="*">
        <xsl:copy>
            <xsl:apply-templates select="@*"/>
            <xsl:apply-templates />
        </xsl:copy>
    </xsl:template>
    
    <xsl:template match="test-log">          
      <xsl:if test="@library=$library">
          <xsl:copy>
              <xsl:apply-templates select="@*"/>
              <xsl:apply-templates/>
          </xsl:copy>
      </xsl:if>
  </xsl:template>
  
  <xsl:template match="@*">
      <xsl:copy-of select="."/>
  </xsl:template>
  
</xsl:stylesheet>