-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathQuestion18.xsl
More file actions
28 lines (25 loc) · 1007 Bytes
/
Copy pathQuestion18.xsl
File metadata and controls
28 lines (25 loc) · 1007 Bytes
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
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="yes"/>
<xsl:template match="/students">
<students>
<xsl:apply-templates select="student"/>
</students>
</xsl:template>
<xsl:template match="student">
<student reg_no="{@reg_no}">
<name><xsl:value-of select="name"/></name>
<symbol_number><xsl:value-of select="symbol_number"/></symbol_number>
<marks>
<xsl:apply-templates select="marks/subject"/>
</marks>
<total_marks><xsl:value-of select="total_marks"/></total_marks>
<percentage><xsl:value-of select="percentage"/></percentage>
</student>
</xsl:template>
<xsl:template match="subject">
<subject name="{@name}">
<xsl:value-of select="."/>
</subject>
</xsl:template>
</xsl:stylesheet>