Imported Upstream version 1.1.30_rc1
[platform/upstream/libxslt.git] / tests / general / bug-175.xsl
1 <?xml version="1.0" encoding="UTF-8"?>
2 <xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3                xmlns:test="#test"
4                exclude-result-prefixes="test"
5                version="2.0">
6    <xsl:output method="html" encoding="iso-8859-1" version="4.0"
7                doctype-public="-//W3C//DTD HTML 4.01//EN"
8                indent="yes"/>
9
10    <xsl:template match="/">
11       <html>
12          <head>
13             <title>xsl:function</title>
14          </head>
15          <body>
16             <xsl:choose>
17                <xsl:when test="function-available('test:test')">
18                   <p>Result: <xsl:value-of select="test:test()"/></p>
19                </xsl:when>
20                <xsl:otherwise>
21                   <p><tt>xsl:function</tt> not supported, but properly handled (ignored)</p>
22                </xsl:otherwise>
23             </xsl:choose>
24          </body>
25       </html>
26    </xsl:template>
27
28    <xsl:function name="test:test">
29       <xsl:param name="x"/>
30       <xsl:text>YES</xsl:text>
31    </xsl:function>
32
33 </xsl:transform>