-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSimpleNSTest.xsl
53 lines (45 loc) · 1.27 KB
/
SimpleNSTest.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
<?xml version="1.0" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<h1>Found books</h1>
<xsl:apply-templates/>
</html>
</xsl:template>
<xsl:template match="body/catalog/author">
<xsl:apply-templates select="name"/>
<xsl:apply-templates select="book"/>
</xsl:template>
<xsl:template match="name">
Author:
<span style="color:#FF4500">
<xsl:value-of select="."/>
</span>
<br/>
</xsl:template>
<xsl:template match="book">
<ul>
<li>
Book title:
<span style="color:#000080">
<xsl:value-of select="title"/>
</span>
| was soled -
<span style="color:#000080">
<xsl:value-of select="purchased"/>
</span>
<br/>
</li>
</ul>
</xsl:template>
<xsl:template match="title">
<ul>
<li>
<span style="color:#000080">
<xsl:value-of select="."/>
</span>
<br/>
</li>
</ul>
</xsl:template>
</xsl:stylesheet>