[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Handling position in non-atomic sequences
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,
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|