For brevity I often find I want to use XPath over XSLT, but I can’t find an elegant way to do this expect to wrap any template match with a function like this:
<xsl:function name="mgx:iso" as="xs:string*">
<xsl:param name="espTimeInstants" as="element(ESP_TIMEINSTANT)*"/>
<xsl:apply-templates mode="iso" select="$espTimeInstant"/>
</xsl:function>
<xsl:template mode="iso" match="ESP_TIMEINSTANT">
<xsl:sequence select="'foo'/>
</xsl:template>
Ideally I would be able to invoke the template directly maybe like this
<xsl:sequence select="string-join(appy-templates('iso',$foo))"/>
instead of either the above (or the standard assigning it to a var and then using the var in the xpath)