I am using Saxon 9 and my 3rd edition of XSLT 2.0 is looking mighty dog-eared :)
I must be interpreting the passages (paraphrased):
Quote:
|
The <xsl:sequence> element is used to deliver an arbitrary sequence[..]. It is [one of] the only XSLT function(s) [..] that can return references to existing nodes [..].
|
to mean what I'd like them to mean, rather than what they really mean. That, or I'm just using <xsl:sequence> incorrectly.
I would like to replace:
Code:
<xsl:variable name="myPMTable" select="$repoSubTree//pmtable[./pmtitle/@Id eq $myIDRef]"/>
with:
Code:
<xsl:variable name="myPMTable" select="nmirepo:findPMTable($repoSubTree, $myIDRef)"></xsl:variable>
and use:
Code:
<xsl:function name="nmirepo:findPMTable">
<xsl:param name="basenode"></xsl:param>
<xsl:param name="idref"></xsl:param>
<xsl:sequence select="$basenode//pmtable[./pmtitle/@Id eq idref]"/>
</xsl:function>
as the function so I can use it is multiple places in the stylesheet, and in other stylesheets.
Seems logical to me, returning a reference to existing nodes. But I don't get anything back from the function. Certainly not a pointer to the table I'm looking for.
So, what am I missing with <xsl:sequence>?
Thanks,