summaryrefslogtreecommitdiff
path: root/tests/XSLTMark/union.xsl
blob: 42f7eefc116f84c7c7eb636f306a6a22498fa5e6 (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
<?xml version="1.0"?> 

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:output encoding="utf-8"/>

<xsl:template match='*[starts-with(.,"a")]'>
    <A><xsl:value-of select="."/></A><xsl:text>
</xsl:text>
</xsl:template>

<xsl:template match='*[starts-with(substring(.,string-length(.)),"b")]'>
    <B><xsl:value-of select="."/></B><xsl:text>
</xsl:text>
</xsl:template>

<xsl:template match="top">
    <TOP><xsl:text>
</xsl:text>
       <xsl:apply-templates select='*[starts-with(.,"a")]|*[starts-with(substring(.,string-length(.)),"b")]'/>
    </TOP>
</xsl:template>



</xsl:stylesheet>