-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsvrl_transform.xsl
More file actions
43 lines (39 loc) · 1.59 KB
/
svrl_transform.xsl
File metadata and controls
43 lines (39 loc) · 1.59 KB
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
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:svrl="http://purl.oclc.org/dsdl/svrl" xmlns:dct="http://purl.org/dc/terms/" version="1.0">
<xsl:template match="/">
<HTML>
<h1>Schematron Errors Report</h1>
<h3>Use `xsltproc svrl_transform.xsl svrl_report.xml <xsl:text disable-output-escaping="yes">></xsl:text> report.html</h3>
<h3>SVRL generated at: <xsl:value-of select="//dct:created/text()"/></h3>
<ul>
<xsl:apply-templates select="//svrl:failed-assert"/>
</ul>
</HTML>
</xsl:template>
<xsl:template match="svrl:failed-assert[@flag='fatal'] | svrl:failed-assert">
<li style="margin: 8px;">
<div style='color:#f93549'><xsl:value-of select="."/></div>
<ul>
<li>
<b>Location</b>: <xsl:value-of select="@location"/>
</li>
<li>
<b>test</b>: <xsl:value-of select="@test"/>
</li>
</ul>
</li>
</xsl:template>
<xsl:template match="svrl:failed-assert[@flag='warning']">
<li style="margin: 8px;">
<div style='color:#f80'><xsl:value-of select="."/></div>
<ul>
<li>
<b>Location</b>: <xsl:value-of select="@location"/>
</li>
<li>
<b>test</b>: <xsl:value-of select="@test"/>
</li>
</ul>
</li>
</xsl:template>
</xsl:stylesheet>