File: import-png-with-alpha.xsl.verify.xsl

package info (click to toggle)
swfmill 0.3.6-1
  • links: PTS
  • area: main
  • in suites: bullseye, buster
  • size: 10,168 kB
  • sloc: xml: 147,618; cpp: 15,148; sh: 4,832; ansic: 427; makefile: 386
file content (47 lines) | stat: -rwxr-xr-x 1,533 bytes parent folder | download | duplicates (2)
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
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:template match="/">
    <xsl:if test="not(/out/png)">
      <xsl:message terminate="yes">
        /out/png element is missing.
      </xsl:message>
    </xsl:if>

    <xsl:if test="/out/png/@name != 'test-alpha'">
      <xsl:message terminate="yes">
        /out/png/@name attribute is missing or has the wrong value.
      </xsl:message>
    </xsl:if>

    <xsl:if test="/out/png/@width != 5">
      <xsl:message terminate="yes">
        /out/png/@width attribute is missing or has the wrong value.
      </xsl:message>
    </xsl:if>

    <xsl:if test="/out/png/@height != 5">
      <xsl:message terminate="yes">
        /out/png/@height attribute is missing or has the wrong value.
      </xsl:message>
    </xsl:if>

    <xsl:if test="/out/png/@format != 5">
      <xsl:message terminate="yes">
        /out/png/@format attribute is missing or has the wrong value.
      </xsl:message>
    </xsl:if>

    <xsl:if test="not(/out/png/data)">
      <xsl:message terminate="yes">
        /out/png/data element is missing.
      </xsl:message>
    </xsl:if>

    <xsl:if test="string(/out/png/data/text()) != 'eNpTVWBm3s/AwPDjurg4iFYF8TuXCf4Hsv9vvycBokH8H+LXU/5L3EuHYRAfpP6/RPo9GAbrl2ZWAJsH0gflAwBaZyQw'">
      <xsl:message terminate="yes">
        PNG data was not imported correctly.
      </xsl:message>
    </xsl:if>
  </xsl:template>
</xsl:stylesheet>