summaryrefslogtreecommitdiff
path: root/tests/general/bug-175.xsl
blob: f25e4c94701e0dfbb9390d4cae1312438bdbf049 (plain)
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
<?xml version="1.0" encoding="UTF-8"?>
<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
               xmlns:test="#test"
               exclude-result-prefixes="test"
               version="2.0">
   <xsl:output method="html" encoding="iso-8859-1" version="4.0"
               doctype-public="-//W3C//DTD HTML 4.01//EN"
               indent="yes"/>

   <xsl:template match="/">
      <html>
         <head>
            <title>xsl:function</title>
         </head>
         <body>
            <xsl:choose>
               <xsl:when test="function-available('test:test')">
                  <p>Result: <xsl:value-of select="test:test()"/></p>
               </xsl:when>
               <xsl:otherwise>
                  <p><tt>xsl:function</tt> not supported, but properly handled (ignored)</p>
               </xsl:otherwise>
            </xsl:choose>
         </body>
      </html>
   </xsl:template>

   <xsl:function name="test:test">YES</xsl:function>

</xsl:transform>