forked from smurav/test1
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtask23.xsl
31 lines (29 loc) · 850 Bytes
/
task23.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
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text"/>
<xsl:template match="/">
<html>
<body>
<xsl:for-each select="//book">
<xsl:value-of select="title"/>
<xsl:choose>
<xsl:when test="price > 30">
<xsl:text> > 30</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:choose>
<xsl:when test="price < 30">
<xsl:text> < 30</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text> =30 </xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
<xsl:text>   </xsl:text>
</xsl:for-each>
</body>
</html>
</xsl:template>
</xsl:stylesheet>