E: Function Results

Because:

  1. The function returns a sequence of text nodes.

  2. Atomization turns that into a sequence of strings.

  3. And xsl:value-of uses the default separator, “ ”, between those strings.

One way to eliminate the “extra” spaces is to explicitly set the separator to the empty string:

<xsl:value-of select="xf:compare('apple', 'apple')"
              separator=""/>