[Home] [By Thread] [By Date] [Recent Entries]
You can keep the variable as a sequence of elements and declare a
function like this:
<xsl:function name="my:index-of" as="xs:integer*">
<xsl:param name="seq" as="node()*"/>
<xsl:param name="nodes-in-question" as="node()*"/>
<xsl:sequence select="index-of(
for $s in $seq
return generate-id($s),
for $n in $nodes-in-question
return generate-id($n)
)"/>
</xsl:function>If youbre using XSLT 3 you can use $seq ! generate-id() etc. for brevity. Then my:index-of($headings, .) will give you the position of the context node within the sequence of headings. Gerrit On 02.05.2020 12:52, Michael MC<ller-Hillebrand mmh@xxxxxxxxx wrote: Hi folks,
|

Cart



