-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtestcase.xsl
70 lines (70 loc) · 1.81 KB
/
testcase.xsl
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:template name="br">
<xsl:param name="text"/>
<xsl:choose>
<xsl:when test="contains($text,'
')">
<xsl:value-of select="substring-before($text,'
')"/>
<br/>
<xsl:call-template name="br">
<xsl:with-param name="text">
<xsl:value-of select="substring-after($text,'
')"/>
</xsl:with-param>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$text"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="/">
<html>
<body>
<xsl:for-each select="chapter/sect1">
<div>
<H2><font color="blue"><xsl:value-of select="title"/></font></H2>
</div>
<table border="1">
<tr bgcolor="#9acd32">
<th align="left">Attribute</th>
<th align="left">Value</th>
</tr>
<xsl:for-each select="formalpara">
<tr>
<td>
<xsl:value-of select="title"/>
</td>
<td>
<xsl:call-template name="br">
<xsl:with-param name="text" select="para"/>
</xsl:call-template>
<xsl:call-template name="br">
<xsl:with-param name="text" select="screen"/>
</xsl:call-template>
</td>
</tr>
</xsl:for-each>
</table>
<div>SRS</div>
<table border="1">
<tr bgcolor="#9acd32">
<th align="left">SRSID</th>
<th align="left">Description</th>
</tr>
<xsl:for-each select="sect2/sect3">
<tr>
<td>
<xsl:value-of select="title"/>
</td>
<td>
<xsl:value-of select="formalpara/para"/>
</td>
</tr>
</xsl:for-each>
</table>
</xsl:for-each>
</body>
</html>
</xsl:template>
</xsl:stylesheet>