File: TestNames.xsl

package info (click to toggle)
glassfish 1:2.1.1-b31g+dfsg1-4
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 126,652 kB
  • ctags: 163,798
  • sloc: java: 1,035,921; xml: 48,060; jsp: 4,922; ansic: 1,442; perl: 1,200; sh: 562; makefile: 352; cpp: 336; sql: 78; haskell: 76; awk: 69; sed: 21; lisp: 5
file content (24 lines) | stat: -rw-r--r-- 954 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:template match="/">
        <xsl:element name="tests">
    <!-- add the description element and it's child to the output  -->
            <xsl:element name="description">
                <xsl:value-of select="tests/description"/>
            </xsl:element>
    <!-- loop for every test in the xml -->
            <xsl:for-each select="tests/test">
                <xsl:choose>
                    <xsl:when test = "avk">
        <!-- if avk tag is found then do nothing -->
                    </xsl:when>
                    <xsl:otherwise>
        <!-- if avk tag is not found then add this test to the output -->
                        <xsl:copy-of select="."/>
                    </xsl:otherwise>
                </xsl:choose>  
            </xsl:for-each> 
        </xsl:element>
    </xsl:template>
</xsl:stylesheet>