If we have the following XML structure:

```
<Tree>
  <Apple>
    <Size>6</Size>
  </Apple>
  <Apple>
    <Size>4</Size>
  </Apple>
  <Apple>
    <Size>3</Size>
  </Apple>
</Tree>

```

It's very easy to display the size of the next-in-line apple with something like:

```
<xsl:for-each select="Tree/Apple">
  <xsl:value-of select="following-sibling::*/Size">
</xsl:for-each>

```

But what if your tree structure is slightly more complex, with branches which may hold one or more apples:

```
<Tree>
  <Branch>
    <Apple>
      <Size>6</Size>
    </Apple>
  </Branch>
  <Branch>
    <Apple>
      <Size>4</Size>
    </Apple>
    <Apple>
      <Size>3</Size>
    </Apple>
  </Branch>
</Tree>

```

How can we be sure to always select the next-in-line apple? (6-4-3)

I understand you can achieve this by checking to see if the branch has any more apple children using conditions, and then selecting from the next branch if this is not the case. But is it possible to achieve this with just one value-of select line?

Many thanks for your help.