-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathListRootElements.xslt
More file actions
33 lines (33 loc) · 921 Bytes
/
ListRootElements.xslt
File metadata and controls
33 lines (33 loc) · 921 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
29
30
31
32
33
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:template match="/">
<html>
<head>
<title>Root elements of the schema</title>
</head>
<style type="text/css">
table {border: none; border-collapse: collapse}
th, td {border: 1px solid black}
th {background: #E6E6E6}
</style>
<body>
<table>
<tbody>
<tr>
<th>Root element</th>
<th>Annotation</th>
</tr>
<xsl:apply-templates select="/xs:schema/xs:element"/>
</tbody>
</table>
</body>
</html>
</xsl:template>
<xsl:template match="xs:element">
<tr>
<td><xsl:value-of select="@name"/></td>
<td><xsl:apply-templates select="xs:annotation"/></td>
</tr>
</xsl:template>
</xsl:stylesheet>