1<?xml version="1.0"?>
2<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
3
4  <xsl:output encoding="utf-8"/>
5
6  <xsl:template match="EIGHT">
7      <FOLLOWING>
8          <xsl:value-of select="following::*[2]"/>
9      </FOLLOWING>
10      <PRECEDING>
11          <xsl:value-of select="preceding::THREE"/>
12      </PRECEDING>
13      <EMPTY>
14          <xsl:value-of select="preceding::TEN"/>
15          <xsl:value-of select="preceding::ELEVEN"/>
16          <xsl:value-of select="preceding::TOP"/>
17      </EMPTY>
18      <EMPTY>
19          <xsl:value-of select="following::TWO"/>
20          <xsl:value-of select="following::FOUR"/>
21          <xsl:value-of select="following::ONE"/>
22      </EMPTY>
23      <ANCESTOR2>
24          <xsl:value-of select="ancestor::*[2]"/>
25      </ANCESTOR2>
26      <TRICKY>
27          <xsl:value-of select="parent::*/descendant::*[3]"/>
28      </TRICKY>
29  </xsl:template>
30  <xsl:template match="NINE">
31      <FOLLOWINGSIBLING1>
32          <xsl:value-of select="following-sibling::*[1]"/>
33      </FOLLOWINGSIBLING1>
34      <FOLLOWINGSIBLING2>
35          <xsl:value-of select="following-sibling::*[2]"/>
36      </FOLLOWINGSIBLING2>
37      <FOLLOWINGSIBLING3>
38          <xsl:value-of select="following-sibling::*[3]"/>
39      </FOLLOWINGSIBLING3>
40  </xsl:template>
41</xsl:stylesheet>
42
43