summaryrefslogtreecommitdiff
path: root/tests/exslt/functions/function.11.xsl
blob: 7a3437a6cd20b289bcf75d4a4f46d8cd0f7ed055 (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
31
32
<?xml version="1.0"?>

<xsl:stylesheet
    version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:func="http://exslt.org/functions"
    xmlns:test="test"
    extension-element-prefixes="func"
>
    <func:function name="test:fragment">
        <func:result>
            <a>
                <b/>
            </a>
        </func:result>
    </func:function>

    <func:function name="test:func1">
        <xsl:variable name="var" select="test:fragment()"/>
        <func:result select="$var"/>
    </func:function>

    <func:function name="test:func2">
        <xsl:variable name="var" select="test:func1()"/>
        <func:result select="$var"/>
    </func:function>

    <xsl:template match="/">
        <xsl:copy-of select="test:func2()"/>
    </xsl:template>
</xsl:stylesheet>