• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

jason-fox / com.here.validate.svrl / #75

pending completion
#75

push

jason-fox
Remove dependency.

735 of 961 relevant lines covered (76.48%)

25.78 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

53.85
/Customization/xsl/codeblock.xsl
1
<?xml version="1.0" encoding="utf-8"?>
2
<!--
3
  This file is part of the DITA Validator project.
4
  See the accompanying LICENSE file for applicable licenses.
5
-->
6
<xsl:stylesheet
7
  exclude-result-prefixes="java"
8
  version="2.0"
9
  xmlns:java="http://www.java.com/"
10
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
11
>
12
        <!-- Apply Rules which        apply to codeblock nodes only -->
13
        <xsl:template match="codeblock" mode="codeblock-pattern">
2✔
14
                <!-- style rules -->
15
                <xsl:call-template name="fired-rule">
2✔
16
                        <xsl:with-param name="context">codeblock</xsl:with-param>
2✔
17
                        <xsl:with-param name="role">style</xsl:with-param>
2✔
18
                </xsl:call-template>
19
                <xsl:call-template name="codeblock-style-rules"/>
2✔
20
        </xsl:template>
21

22
        <!-- Apply Rules which        apply to coderef nodes only -->
23
        <xsl:template match="coderef" mode="coderef-pattern">
×
24
                <!-- structure rules -->
25
                <xsl:call-template name="fired-rule">
×
26
                        <xsl:with-param name="context">coderef</xsl:with-param>
×
27
                        <xsl:with-param name="role">structure</xsl:with-param>
×
28
                </xsl:call-template>
29
                <xsl:call-template name="coderef-structure-rules"/>
×
30
        </xsl:template>
31
        <!--
32
                Special Style Rules for <codeblock>elements
33
        -->
34
        <xsl:template name="codeblock-style-rules">
2✔
35
                <!--
36
                        codeblock-scale-missing <codeblock> must have a scale attribute
37
                -->
38
                <xsl:if test="not(@scale)">
1✔
39
                        <xsl:call-template name="failed-assert">
1✔
40
                                <xsl:with-param name="rule-id">codeblock-scale-missing</xsl:with-param>
1✔
41
                                <xsl:with-param name="test">not(@scale)</xsl:with-param>
1✔
42
                        </xsl:call-template>
43
                </xsl:if>
44
                <!--
45
                        codeblock-outputclass-missing <codeblock> must have a output class attribute
46
                -->
47
                <xsl:if test="not(@outputclass)">
1✔
48
                        <xsl:call-template name="failed-assert">
1✔
49
                                <xsl:with-param name="rule-id">codeblock-outputclass-missing</xsl:with-param>
1✔
50
                                <xsl:with-param name="test">not(@outputclass)</xsl:with-param>
1✔
51
                        </xsl:call-template>
52
                </xsl:if>
53
        </xsl:template>
54
        <!--
55
                Special Structural Rules for <coderef> elements (e.g. missing links)
56
        -->
57
        <xsl:template name="coderef-structure-rules">
×
58
                <xsl:variable name="filePath" select="resolve-uri(@href, resolve-uri('.', document-uri(/)))"/>
×
59
                <xsl:variable name="isCodeRefAndFileExists" select="java:file-exists($filePath, base-uri())"/>
×
60
                <!--
61
                        coderef-href-ref-file-not-found - <coderef>- the file linked to must exist
62
                -->
63
                <xsl:if test="not($isCodeRefAndFileExists)">
×
64
                        <xsl:call-template name="failed-assert">
×
65
                                <xsl:with-param name="rule-id">coderef-href-ref-file-not-found</xsl:with-param>
×
66
                                <xsl:with-param name="test">&quot;not($isCodeRefAndFileExists)</xsl:with-param>
×
67
                        </xsl:call-template>
68
                </xsl:if>
69
        </xsl:template>
70
</xsl:stylesheet>
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc