I have two sections of code that I think should do the same thing but one does not work.
This returns a value
<xsl:variable name="x" select="sources/source[@type='A']"></xsl:variable>
<xsl:value-of select="$x/name"></xsl:value-of>
This does not return a value
<xsl:function name="eul:xx">
<xsl:param name="root"></xsl:param>
<xsl:variable name="a" select="$root/sources/source[@type='A']"/>
<xsl:value-of select="$a" separator=" "></xsl:value-of>
</xsl:function>
<xsl:variable name='x2' select="eul:xx(/)"></xsl:variable>
<xsl:value-of select="$x2/name"></xsl:value-of>
I would like to be able to return something that I can query just like anything I create in the main template. What is funny is that if I select the name element in the function and not after the function is called it also works:
<xsl:value-of select="$a/name" separator=" "></xsl:value-of>
So it looks like something is happening when the value is returned.