Subject: Re: [xsl] xpath index-of function using xslt 3.0 From: "Mukul Gandhi mukulg@xxxxxxxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Sat, 4 Oct 2025 04:54:32 -0000 |
Hi Martin, Thanks for insightful discussion about this mail thread. On Fri, Oct 3, 2025 at 7:55b/PM Martin Honnen martin.honnen@xxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: >https://www.w3.org/TR/xpath-functions-31/#func-index-of says >The items in the sequence $seq are compared with $search under the rules for the eq operator. Values of type xs:untypedAtomic are compared as if they were of type xs:string. Values >that cannot be compared, because the eq operator is not defined for their types, are considered to be distinct. If an item compares equal, then the position of that item in the sequence >$seq is included in the result. >So if you use = instead of eq you are not implementing the XPath 3.1 function 'index-of' I've tested my XSL stylesheet written previously within this mail thread, with following changes as suggested by you, <xsl:if test=". eq $srch1"> <!-- code --> </xsl:if> and also with not(. ne $srch1) <!-- for my interest --> With both of these XSL stylesheet code modifications, an XSL stylesheet example that I've written previously, works fine with Apache Xalan XSLT 3.0's development code. Thanks, to Mike as well, for his suggestions that I'll try with little later. -- Regards, Mukul Gandhi
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] xpath index-of function u, Michael Kay michaelk | Thread | Re: [xsl] XSpec/XSLT code coverage , Amanda Galtman galtm |
Re: [xsl] xpath index-of function u, Michael Kay michaelk | Date | Re: [xsl] XSpec/XSLT code coverage , Amanda Galtman galtm |
Month |